Entu SSG is a simple Pug, Markdown, Yaml static site generator with multi-locale support.
./build.js ./my-page/entu-ssg-config.yaml
Sites build process is configurable by Yaml file and its path must be first argument for entu-ssg.js. Required parameters are:
locales:
- en
- et
source: ./source
build: ./build
assets: ./assets
protectedFromCleanup:
- assets
- index.html
server:
port: 4000
assets: /assets/
dev:
aliases: true
paths:
- test/page1
- test/page2
Page content is generated from index.pug file. All other files are ignored, but You can use those files for Pug include/extends. You can put locale identificator to filename (like index.en.pug) for locale speciffic content.
To pass data to index.pug use data.yaml file. This data is passed to index.pug in object named self (To get property text from data.yaml use self.text in index.pug).
You can put locale identificator to filename (like data.en.yaml) for locale speciffic content.
Some page parameters will change how HTML is generated. Those are:
path: /testpage1
aliases:
- /test
- /test123
data:
news: ./datafiles/news.yaml
someOtherData:
- A
- B
To generate page CSS use .styl files. Global style.css is combined from all .styl files (from source folder) and saved to build's root folder (like /style.css).
To generate page JS use .js files. Global script.js is combined from all .js files (from source folder) and saved to build's root folder (like /script.js).
- source
|- _templates
| |- layout.pug
| |- mixins.pug
| +- somescripts.js
|
|- testpage1
| |- data.en.yaml
| |- data.et.yaml
| |- index.pug
| +- style.et.styl
|
|- testpage2
| |- index.en.pug
| |- index.et.pug
| |- data.yaml
| +- testpage2en
| |- index.en.pug
| +- data.en.yaml
|
|- index.pug
+- style.styl
- build
|- en
| |- index.html
| |- testpage1
| | +- index.html
| |
| +- testpage2
| |- index.html
| +- testpage2en
| +- index.html
|
|- et
| |- index.html
| |- testpage1
| | +- index.html
| |
| +- testpage2
| +- index.html
|- script.js
|- script.js.map
|- style.css
+- style.css.map
Find more static site generators.