A static website generator that implements best practices for page speed. Click here for a live demo .
- input: Markup in pug, styling in Sass and Javascript with Babel
- output: deployment-ready minified, prefixed and compressed build files
Benefits:
- 🚀 100% Google Page Speed Score (view score)
- 👩💻 Use
pug,sassand the newestjswith zero setup time - 👓 SEO best practices auto-implemented
- 🇪🇺 Built-in multilanguage support
- 🌐 Built-in broken link checker through
npm test - 🧪 Advanced performance options and compatibility warnings
Dependencies:
- Clone this repository
- Run
npm start, your browser will open with a live-updating preview - Edit the source files in
src/ - Configure SEO settings in
modules/config.js
To create a production build in docs/:
npm run build- Customise auto-image compression
- Edit the
system.imageskey to include your compression preferences forjpeg,webpandavif - Use the
rimg(responsive img) mixin found insrc/pug/_helpers - Use the
cimg(compressed img) mixin found insrc/pug/_helpers - Note: images are not compressed in
NODE_ENV=developmentmode which is thenpm startdefault,npm run builddoes trigger that actual file optimisation
- Edit the
- Separate your CSS for meaningful-paint optimisation
- Use
src/css/essential-above-the-fold.sassfor essential above the fold styles - Use
src/css/styles.sassfor below the fold styles
- Use
- Set per-page SEO settings
- Every
.pugfile may contain it's own metadata and sharing image - The
pageobject can settitle,desc,url,published,featuredimgwhich are used in theheadmeta tags and the footerapplication/ld+jsonrich snipped data
- Every
- Confgure deeper browser compatibility
- By default
npm startruns a caniuse compatibility check on your SASS - Javascript backwards compatibility in
.babelrc - CSS compatibility in
modules/config.jsatbrowsers
- By default
- Enable auto-deployment
- Templates for Github pages, Firebase and AWS are available in
.github/workflows
- Templates for Github pages, Firebase and AWS are available in
- Use subpages (like
/category/people/john.html)- Any
.pugfile insrcwill be compiled except those that are in reserved folders or begin with_ src/index.pug>index.htmlsrc/pages/contact.pug>/pages/contact.htmlsrc/{ assets, content, css, js }/template.pug> not renderedsrc/pug/_footer.pug> not rendered (unless included in another pug)
- Any
Every .json or .js file in src/content will result in a duplicate of your website using the content in that file.
module.exports = {
slug: "/", // The relative URL of this language
lang: "en", // The language code of this language (use W3 compliant codes)
// You can creat any keys and access them inside pug files
hero: {
"title": "something",
"explanation": "lorem ipsum"
},
usps: [ "It's good", "It's free" ]
}The attributes can be read inside any pug template under the content variable, for example:
div.hero
p#title #{ content.hero.title }
a( href=content.slug ) home
div.usp
each usp in content.usps
p= usp


