Build sites simple.

No magic, fewer dependencies, less maintenance, more simplicity.

Get started See on GitHub

Simple sites deserve simple stacks. Litepage is an open source lightweight library to help build your static sites in Go.

Works with any static site hosting provider

Easy integration with minimal footprint

Contains zero additional dependencies

Static sites made simple.

You don't need a complex framework to build a simple site. Leverage the Go standard library to build your templates, and let Litepage build your site and provide a development environment.

Declaratively create your pages

Pass a relative file path to create your pages. Work with the standard io.Writer interface to support any Go templating library.

lp.Page("/index.html", func(w io.Writer) {
  html := "<h1>Hello, World!</h1>"
  t := template.Must(template.New("helloWorld").Parse(html))
  t.Execute(w, nil)
})

Minimal folder structure

Put all your static assets in your public folder. Your finished site will be placed in your dist folder.

my-cool-site
└── public
  ├── favicon.ico
  ├── logo.svg
  └── styles.css
└── dist

Tiny API surface

No deep dives required. Only four methods to work with to create your next project.

lp.Page(...)

lp.Build()

lp.Serve("3000")

lp.BuildOrServe()

Sitemap out of the box

Get a basic sitemap.xml of all your pages by default, out of the box. Anything to get that extra SEO boost when getting your new site out there on the web.

<urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9">
  <url>
    <loc>https://my-cool-site.dev/</loc>
  </url>
  <url>
    <loc>https://my-cool-site.dev/about</loc>
  </url>
</urlset>

Ready to learn more?

Go to the docs