marktree
v1.3.9
Published
Grow a markdown tree
Downloads
83
Readme
marktree 🔖🌳
marktree is a static site generator, using markdown. It works with GitHub pages out of the box.
Get started
create-marktree is the quickest way to start a marktree project.
Doing it manually
- Install marktree
npm i marktree
- Create a
markdown/
-folder and fill it with markdown files - Add the build script to
package.json
"scripts": {
+ "build": "marktree"
},
- Build your site
npm run build
- Host the contents of
docs/
Hot reload
- Install nodemon
npm i nodemon -D
- Add the dev script to
package.json
and updatemain
+"main": "node_modules/marktree/src/index.js",
"scripts": {
+ "dev": "nodemon marktree",
"build": "marktree"
},
- Add the
nodemon.json
config file
{
"watch": ["src/", "markdown/"],
"ext": "md, js"
}
- Run dev
npm run dev
Configuration
Configure marktree
Configure marktree by adding a marktree.config.json
config file. The following are default values.
{
"source": "markdown",
"dest": "docs",
"htmlLayout": "layout.html",
"include": [],
"exclude": [],
"autoLink": true,
"cssStyles": "styles.css",
"icon": "favicon.ico",
"insertMarkdown": "<!-- insert:markdown -->",
"insertStyles": "<!-- insert:styles -->",
"insertTitle": "<!-- insert:title -->",
"insertIcon": "<!-- insert:icon -->"
}
Styling
Add a styles.css
file to the directory you want to be styled. Styles are also applied all subdirectories.
Icon
Add a favicon.ico
file to the directory you want to include the icon. The icon is also applied to all subdirectories.
YAML
Add file metadata with YAML. THe following attributes are supported
---
title:
---