metalsmith-scaffold v0.1.0
metalsmith-scaffold
A quite comprehensive setup based on Metalsmith to create a static website.
Work in progress: stay tuned
About
The goal of this project is to create a nice scaffold using Metalsmith which can then be used in multiple projects with very little configuration.
Status so far
What's planned (not everything covered right now):
- Markdown conversion
- Less conversion
- Cleaning the build directory
- Error handling to ensure that everything went well
- Error notification
Different:
- layouts
- content types
- [] collections
Dynamic loading of:
- handlebar templates
- partials
- [] Metalsmith plugins
Site features:
- Tags
- Full test coverage to ensure that everything continues to work
Configuration
Configuring the scaffold is very similar to using metalsmith-cli, but the big difference is still, that no CLI is used, everything is nicely available in a JavaScript API. Therefore much easier to deploy programmatically and output can be automatically tested.
Configuration Options
The following options needs to be defined to get the project up and running:
Source
source: "path/to/source"
Reference: metalsmith#sourcepath
Destination
destination: "path/to/destination"
Reference: metalsmith#destinationpath
Markdown
markdown: {
smartypants: true,
smartLists: true,
gfm: true,
tables: true
}
Reference: metalsmith-markdown resp. marked
Layouts
layouts: {
directory: path.join( __dirname, "./fixtures/setup/layouts" ),
partials: path.join( __dirname, "./fixtures/setup/partials" ),
engine: "handlebars",
default: "default.hbt",
pattern: "*.hbt"
}
Reference: metalsmith-layouts
Inplace
inPlace: {
engine: "handlebars",
pattern: "**/*.md"
}
Reference: metalsmith-inplace
Register helpers
Register Handlebar helpers automatically.
registerHelpers: {
"directory": path.join( __dirname, "./fixtures/setup/helpers" )
}
Reference: metalsmith-register-helpers
Drafts
Enable drafts
drafts: {
default: true
},
Reference: metalsmith-drafts (actually in the project I have used a modification of metalsmith-drafts which considers all documentes as draft by default: stefanwalther/metalsmith-drafts)
Assets
Copy assets to the output directory.
assets: {
source: path.join(__dirname, "./fixtures/content/assets"),
destination: "./assets"
}
Reference: metalsmith-assets
Author
Stefan Walther
License
Released under the MIT license.
This file was generated by verb-cli on December 26, 2015.
8 years ago