magic static page generator core
Switch branches/tags
Nothing to show
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Type Name Latest commit message Commit time
Failed to load latest commit information.

mspg - magic static page generator

NPM version Linux Build Status Windows Build Status Coverage Status Greenkeeper badge

transforms a src directory into a github hosted gh-pages branch.

npm i --save mspg/core

mspg comes as a single executable file.

mspg [TASKS]...

available tasks:
clean   - deletes the public directory
build   - builds the src dir to public
serve   - serves the public dir
zip     - gzips the public dir using zopfli
connect - connects the git repository to it's gh-pages branch
publish - publishes the current HEAD to github/gitlab pages
help    - this help text
cli usage examples:
# production build
NODE_ENV=production mspg clean build zip 
# development (build files, watch for changes, and serve them on localhost:3000)
mspg build serve watch
example app

a minimal example app is in the example directory of this repository, using config.js from the root directory

example app on

the example app is published to the gh-pages branch. it is hosted @

using html/css/javascript transpilation

writing transpilers for any kind of toolchain is pretty easy, just have a look at the examples below to get started if you want to use another toolchain. every transpiler also includes a minimal example project in the example directory.


both html toolchains below follow the same rules:

  • every *.html file in the src/ directory is a page and gets transpiled to public/

  • every includes/html/*.extension file is an include file and can be included using /filename.extension

  • every includes/html/*.extension file can also be a template file. using extend you can reuse a html template in both pug and posthtml.

  • pug

  • posthtml