Super simple static site generator.
You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
J. David Lee 573731a154 Cleanup 3 years ago
css Documentation and example CSS files. 6 years ago
.gitignore Initial commit 6 years ago
LICENSE Initial commit 6 years ago
README.md Documentation and example CSS files. 6 years ago
main.go Cleanup 3 years ago
markdown.go Migration from github. 6 years ago

README.md

jlstatic

Simple static site generator.

Usage

  • Every page is in its own directory.
  • Relative links should point to other directories.
  • For every image, a thumbnail is created in a ./t/.
  • Files with the .md extension are turned into HTML.
  • All other files are copied.

Project Organization

./config.json   # Configuration file (see below). 
./template.html # One template used for every page. 
./src           # Root directory for source files.
./build         # Generated by program. 

Config File

The config file should be stored in the project's root directory in config.json.

type Config struct {
	RootName     string
	ThumbWidth   int
	ThumbHeight  int
	ThumbQuality int
}

Template Context

The context passed to the template contains the following:

type Context struct {
	Content     template.HTML
	Breadcrumbs []Breadcrumb
}

type Breadcrumb struct {
	FullPath string // Full path.
	Name     string // File basename.
}