Skip to content

bennetthardwick/static-site-optimizer

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

13 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

static-site-optimizer

An optimizer for your static site. Inline css, automatically generate amp pages.

Usage

After building your site (using zola for example), point the cli to your build folder and tell it what your site's base url is:

cargo run --release -- \
  <static site folder> \
  --base-url https://<site base url> \
  --outdir <output directory> \
  --amp \
  --inline-styles

After the command runs upload your output directory to your server.

Features

Note: this is still very WIP. I'm fixing AMP issues as I see Google complain about them.

  • amp boilerplate
  • collapse styles
  • set canonical
  • remove scripts
  • amp-img (everything becomes layout="fill", so parents must be relative)
  • iframes
  • audio
  • video

About

Convert a static site into a static site + amp

Resources

Stars

Watchers

Forks

Packages

No packages published

Languages