Open thomastuts opened 8 years ago
Great idea 👍
Bad weather in Bali?
Nope, downtime before breakfast! ☀️
This is still relevant, especially for the documentation part.
As discussed - no priority. On hold. See Slack bedrock channel (today)
Some recent discussion brings this back to the table.
Please check https://github.com/usebedrock/bedrock/pull/206 for some context. This is not all but it contains a bit of info.
Maybe if the way you set up your docs is with generic iterators, (#103 ) we don't need this?
It seems that this was supported all along, and just works®. It is undocumented though, so we should document it.
Basically somehow you can put files in content/styleguide/component-group.pug
and it will use that file instead of core/styleguide/component-group.pug
3 years later I still don't understand how this feature works. Which line of code is responsible for swapping the folders when they exist?
If anybody can find out I would be grateful.
Original author of Bedrock confirmed that this works when you are developing, but not in the static build, and it's more of a bug.
Responsible lines of code are these in server.js
:
app.use(express.static(paths.compiled.path));
app.set('view engine', 'pug');
app.set('views', [
path.join(process.cwd(), './content/templates'),
path.join(process.cwd(), './core/templates')
]);
To make this behavior work for the static build you would have to implement it separately.
We can then use these templates to override the ones found in the
core/
folder, allowing us to add custom functionality to Bedrock stuff without having to mess around in thecore/
folder.