Comments (3)
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.
- Yup, provide a JSON or YAML filepath that contains the plugin options. Alternatively it accepts a JS object with the same options.
- Array of objects defining source files, file pattern, permalink style and any other frontmatter you want carried across.
- You could pass a JS function within the options to do any data transformations.
- Covered by point 2 to carry extra frontmatter over.
- Yes.
(I updated your comment with a numbered list)
from metalsmith-json-to-files.
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?
from metalsmith-json-to-files.
Thoughts on that config?
from metalsmith-json-to-files.
Related Issues (3)
- Using with partials HOT 2
- Add support for yaml files HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from metalsmith-json-to-files.