Skip to content

MatthijsKamstra/monk

Repository files navigation

Monk

TL;DR

Monk is a photo focussed static site generator.

Tell me more!

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.

summary

more stuff to install

  • imagemagick
  • jpegoptim

WIP

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.

sources

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 structure

+ 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

folders read

  • post folder only that folder...
  • pages folder only that folder
  • photos folder and one folder deeper
+ photos
	+ folder00
	+ folder01
	+ folder02

tools

Usage

Currently I am only using Monk via haxelib

haxelib run monk
haxelib run monk generate

That might change to

  • command line
  • nodejs
  • and other target by Haxe

Config

{
	"site_title":"MONK",
	"social_button":false,
	"theme_dir":"theme0",
	"any_var_you":"want_to_use"
}

reminder!

the folder sorted as first (either alpha or 00_zebra) wil be the first images you will see on the homepage!

sort photo folders

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

Meta-data

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
-->

Post and Pages

metadata for both pages and post

  • id: an uniq value, will be generated by MONK
  • title: a short/menu title

Pages

metdate used to sort pages in navigation

  • order: used for pages sorting

Post

metadata for posts

  • date: publish date (used for sorting)
  • tags: categories where the post/page to belongs

Help

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

Ignore folder/files

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.

Haxe

This is a Haxe project, read more about it in the README_HAXE.MD!

About

Static site generator with focus on photos

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors