Open ghost opened 5 years ago
I have a similar requirement. But it seems as this is not supported yet.
The paths are hard-coded at at least two places:
I think it would be great if the paths could be configured. But it might not be that easy. So far empress-blog seems to only use run-time configuration (config/environment.js
). But this seems to be better fitted with build-time configuration. The pages are rendered at build-time and in the instance initializer @embroider/macros
could be used to resolve the configured path.
Maybe like this?
// config/empress-blog.js
module.exports = function(environment) {
return {
paths: {
author: '/a/:id',
page: '/:id',
post: '/p/:id',
tag: '/t/:id',
}
};
};
@mansona Are you open for a pull request implementing this feature? Maybe first in config/environment.js
, which could also be consumed at build-time, and discuss moving the configuration to its own file separately?
Creating a new post adds it to the root path. I have guessed at a few ways this might work, but failed.
I would like to structure my content so that
/blog/post-slug-here/
would work for blog posts. Ideally, whatever folder structure I use would be reflected in the build.I would like pages to appear without the
/page/
prefix. I think it makes sense to keep pages separate from/content/
that would be used for post listings. Is there a way to configure this?