A tiny static website generator for simpletons like me.
This project is a work in progress and should be used by no one (yet).
makeThe binary is created at ./bin/webgen.
webgen --init creates a .webgen file in the current working
directory. This tells webgen that you you really want to start
managing files in this directory.
webgen builds the website.
webgen --verbose builds the website and prints every operation to
stdout.
webgen --help prints the list of available commands along with
short descriptions.
.
├── layout.html
├── pkg
│ ├── otherfile.txt
│ └── index.html
└── webroot
├── otherfile.txt
└── index.html
layout.htmlcontains the layout of your website. All pages on the website inherit from the layout. It should contain all of the HTML boilerplate, header, footer, etc. Go's HTML template language is used to determine where the content (from HTML files in webroot) is embedded in the generated HTML.pkgis the destination for the compiled website.webrootcontains the website's content. HTML files are compiled intolayout.htmland copied intopkgwith the same filename. For example, the contents ofwebroot/index.htmlis copied into the defined parts oflayout.htmland saved topkg/index.html. All other files are simply copied topkgwithout any kind of compilation/interpolation. e.g.webroot/static/foo.jpgis copied topkg/static/foo.jpg.