-
Notifications
You must be signed in to change notification settings - Fork 12
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Use metadata for file data #3
Comments
The files generated aren't namespaced per se but you do provide it with a pattern to generate the "filename" in the metalsmith files object. I suppose you could add files to the object with a random hash if you didn't want to create files with meaningful names.
(I updated your comment with a numbered list) |
Hmm, so if I was to use a config.yaml for global site pages for example and do something like this: index:
title: 'Home'
heading: 'Welcome to this site'
about:
title: 'About us'
heading: 'More about us'
services:
web-design:
title: 'Web Design'
heading: 'We build websites'
seo:
title: 'SEO'
heading: 'We optimize websites' Then have posts in another posts.json, like this: [{
'date': '2016-07-22',
'title': 'How to use Metalsmith',
'layout': 'post.liquid',
'contents': '# This is Markdown',
},
{
'date': '2016-07-23',
'title': 'How to use Liquid',
'layout': 'post.liquid',
'contents': '# This is Markdown',
}
] Would that potentially work? |
Thoughts on that config? |
I haven't looked too much into the code, but I think I may have seen that the JSON files are being named-spaced in a certain permalinking naming convention? I don't really think that would be necessary.
For both yaml and json here's an ideal use case that I was considering:
"_path": "/some/path/:id"
. This would mimic a directory path to the file for example. Otherwise, it could be simply indexed by key.metalsmith-permalinks
, etc.Thoughts?
The text was updated successfully, but these errors were encountered: