Monk is a photo focussed static site generator.
Written in Haxe but eventually usuable for more languages.
Why Monk? Writing a website like this is complex and slower then CMS, so it feld a little like the old European Monk copying books. But they are not as cool as Shaulin Monks so there might be some references to those monks.
- Haxe The Cross-platform Toolkit for transpiling to javascript more
- Bootstrap v4.0.0 for css framework
- Fontawesome v5 for nice icons
- sass CSS with superpowers
- LiveReload chrome extension
- Neko webserver is a Haxe related web server, but any server should works
- imagemagick
- jpegoptim
I use this to generate the homepage of matthijskamstra.nl.
This fixes a very specific need I have, not fixed by others generators. That doesn't mean they aren't good, just not for my project.
I use a quick and dirty approach to get stuff done. Not readable, might change in the future. The more I work on it, the better it will become.
This first "hit" I got was Expose, so Monk is heavily inspired by the work of Jack Qiao
I have work on and with Butterfly before and because of that I use a lot from that generator:
+ folder
- config.json
+ img
+ pages
+ photo
+ post
+ theme0
+ www
- index.html
- about.html
- contact.html
- why.html
+ img
+ pages
+ photo
+ foobar1
+ foobar2
+ foobar3
+ post
+ theme0
- post folder only that folder...
- pages folder only that folder
- photos folder and one folder deeper
+ photos
+ folder00
+ folder01
+ folder02
Currently I am only using Monk via haxelib
haxelib run monk
haxelib run monk generateThat might change to
- command line
- nodejs
- and other target by Haxe
{
"site_title":"MONK",
"social_button":false,
"theme_dir":"theme0",
"any_var_you":"want_to_use"
}
the folder sorted as first (either alpha or 00_zebra) wil be the first images you will see on the homepage!
how to sort folders
create folder with 00 -> 99 and add _ to use default folder sort.
example:
+ 00_ccc
+ 01_bbb
+ 03_aaa
will create the photo menu
+ ccc
+ bbb
+ aaa
because I didn't want to show metadata in the export/preview of markdown, the meta-data is wrapped in comment <!-- ... -->
<!--
meta-id: aa
meta-title: ShortTitle
meta-date: 10-10-2016
meta-tags: foo, bar, test, json
meta-order: 1
-->metadata for both pages and post
- id: an uniq value, will be generated by MONK
- title: a short/menu title
metdate used to sort pages in navigation
- order: used for pages sorting
metadata for posts
- date: publish date (used for sorting)
- tags: categories where the post/page to belongs
haxelib run monk help
how to use:
haxelib run monk [action] [options]
[action]:
scaffold : generate a folder structure with basic helper files
generate : generate static site
clear : cleanup www folder
update : update/overwrite default "theme0" folder
[options]
-force : overwrite existing files
-optim : use jpg optimization
Folders or files you want to ignore, prefix with an _ or .
Rename folder foo to _foo and it will be ignored.
The same will happen with files: rename test.md to _test.md and it will not be used by MONK.
This is a Haxe project, read more about it in the README_HAXE.MD!