MinoriWiki is a static Wiki site Generator
Currently under development - PRs welcome
- Install via NPM:
npm install minori -g
- Create an empty directory
minori init
- Edit
config.yml
to fit your needs - Use
minori note [filename]
to create new note or edit existing one, you can also useapi/data
for filename to create directories - Deploy your files generated under site directory (Default to
wiki
) to production environment with commandminori commit
.
source
(defaults tonotes
) directory contains all note markdown filesstatic
(defaults tostatic
) directory will be copied tosite
directory, you could store any static files that may be used in your wiki site.site
(defaults towiki
) directory contains generated site files.
If you are going to change the site
directory, just rename the wiki
folder to keep Git objects.
minori init
orminori i
- Init under current working directoryminori note [filename]
orminori n [filename]
- Create or edit noteminori done
orminori d
- Generate site filesminori commit
orminori c
- Commit changes and deploy to production environmentminori updatecfg
orminori u
- Update currentconfig.yml
file with the new version installed. New config file will written toconfig.yml.new
.
Theme is customizable. Theme directory should contain:
assets
directory to store style sheets, scripts, fonts, etc.index.ejs
is the homepage template.page.ejs
is the post page template.changes.ejs
is the changelog page template.
The following variables are passed to EJS:
config
- the parsedconfig.yml
objectcategories
- Array of category object:
[
{
"name": "uncategoried",
"pages": [
{
"title": "page title",
"link": "page-file-name",
"category": "uncategoried",
"content": "parsed html"
},
...
]
},
...
]
page
-{}
in homepage and the specified page object in post page.
When parsing changelog page, the commits object is passed:
[
{
hash: '2765ac1dea7f8080048d6f603683615b2f2c2c78',
abbrevHash: '2765ac1',
subject: 'update test.md',
committerName: 'foo bar',
committerDate: 'Tue Dec 1 15:48:53 2015 +0800',
status: [ 'M' ],
files: [ 'test.md' ]
}, {
hash: '9bf21ee34231208fd2e24469b7472b54df3954182',
abbrevHash: '9bf21ee',
subject: 'update',
committerName: 'foo bar',
committerDate: 'Tue Dec 1 15:26:06 2015 +0800',
status: [ 'M' ],
files: [ 'test.md' ]
}
]
MIT.