Simple template for creating static sites with no effort.
- Customizable — all configurations are exposed by default
- Zero bundle-size — build-time system, no runtime dependencies
- Create a repository from the template
- Install dependencies by
yarn install
- Start dev server by
yarn gulp dev
- You are great!
For markup use pug, just write code in ./src/index.pug
. All styles will be processed with PostCSS. All scripts will be processed with esbuild.
Warning! This template is for very small landing pages. Therefore, all scripts and styles will be inlined into the HTML by default. You can disable it.
This template has s very simple component-like system — you can create pug-file, css-file and js-file for reusable component.
Some rules:
- Use
[name].pug
filename for markup of widget and put mixin inside, then use mixin in other pug-file. - Use
[name].entry.js
filename for scripts of widget, it will be scoped by IFFE. - Use
[name].css
filename for styles of widget, use BEM Naming (or other naming-strategy) for scoping.
Build page with yarn gulp build
or use Docker. This template provide the Dockerfile — build container docker build -t my-app .
and run production application docker run -p 8080:8080 my-app
.