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
,sass
and the newestjs
with 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.images
key to include your compression preferences forjpeg
,webp
andavif
- 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=development
mode which is thenpm start
default,npm run build
does trigger that actual file optimisation
- Edit the
- Separate your CSS for meaningful-paint optimisation
- Use
src/css/essential-above-the-fold.sass
for essential above the fold styles - Use
src/css/styles.sass
for below the fold styles
- Use
- Set per-page SEO settings
- Every
.pug
file may contain it's own metadata and sharing image - The
page
object can settitle
,desc
,url
,published
,featuredimg
which are used in thehead
meta tags and the footerapplication/ld+json
rich snipped data
- Every
- Confgure deeper browser compatibility
- By default
npm start
runs a caniuse compatibility check on your SASS - Javascript backwards compatibility in
.babelrc
- CSS compatibility in
modules/config.js
atbrowsers
- 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
.pug
file insrc
will be compiled except those that are in reserved folders or begin with_
src/index.pug
>index.html
src/pages/contact.pug
>/pages/contact.html
src/{ 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