Using the Static Site Repo Example
An Archived Repo?
- The
MetalsmithExampleRepo.zip
contains our Metalsmith examples
- Unzip this somewhere on your system
- Take a look, where are the files?
- I compressed just the
.git
directory into this repo
Getting the different demos
Using git
branches to hold the different demonstrations
Branches in Demonstration Order
- basic – Just getting Metalsmith installed and trivial example
- basicPlug – Write our own basic plugin
- markdown – Processing Markdown files with plugin
- layout – Using templates (Nunjucks.js)
- yml – Using YAML and Metalsmith processing flow
- nav – Adding navigation via JSON file and template
Checkout basic
Put the repository in the proper state of the last commit to branch basic
:
git reset --hard
git checkout basic
Reset the Branch
File Tree
.
├── README.md
├── build.js
├── package-lock.json
├── package.json
└── src
├── MyTest.txt
├── anotherTest.txt
├── strange.dat1
├── test1.txt
└── weird.dat1
1 directory, 9 files
Re-populate node_modules
- We have a
package.json
for the branch
- Use
npm install
- Be patient for NPM to install modules
- You can now run demonstration
- If you switch branches you may need to run
npm install
again