Add built-in initializer plugin for external sources
Initial work towards #819, #884 ~~Fixes #704~~
This PR expands on the Source Manifest functionality so that multiple per-collection content directories can be specified. So you can load content into pages and/or other collections as you wish.
In addition, a new external_sources initializer plugin is provided so a site owner can easily add their own source manifest in order to load external content. Here's an example config/initializers.rb file:
init :external_sources do
contents do
docs File.expand_path("../../test_content/pages", __dir__)
end
end
collections do
docs { output true }
end
config.defaults << {
scope: { collection: "docs" },
values: { layout: "page" },
}
TODO:
- [ ] Add watcher for live reload
note: sorta works with
additional_watch_paths << File.expand_path("../../test_content/pages", __dir__)…just gotta make this automatic - [ ] Tests
- [ ] Documentation
Your Render PR Server URL is https://bridgetown-beta-pr-886.onrender.com.
Follow its progress at https://dashboard.render.com/static/srv-colvgh21hbls73abjps0.
Your Render PR Server URL is https://bridgetown-api-pr-886.onrender.com.
Follow its progress at https://dashboard.render.com/static/srv-colvgha1hbls73abjq20.
I hope to get this into Bridgetown 1.0 but keeping it on ice for the Beta 1 release.