Skip to content

guychouk/tmpl

Folders and files

NameName
Last commit message
Last commit date

Latest commit

ย 

History

4 Commits
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 

Repository files navigation

guychouk's templating "engine"

This is a program that I use as a templating "engine" for the notes on my website.

All tmpl does is it reads a directory with Markdown files (which may include a YAML frontmatter), maps each .md file to a Note struct, reads the HTML templates defined in the provided file, and finally generates HTML files along with a CSS file for syntax highlighting in code blocks.

Here's how I use it to generate the HTML for my notes:

./tmpl --output ./public --templates ./src/templates.html notes

This is a minimal replacement for static site generators such as hugo.

I sat down to write this thinking it's gonna be difficult, but thanks to go's excellent html/template pkg, and packages like goldmark and chroma, it was too damn easy ยฏ\(ใƒ„)/ยฏ.

read the (ugly) code and see for yourself.

About

๐Ÿ• A site generator built for my website

Resources

License

Stars

Watchers

Forks

Languages