About Publican

665 words, 4-minute read

Publican is a Static Site Generator (SSG). It takes content – typically in markdown files – and puts it into HTML templates to build a site. The resulting web pages are static HTML which can usually be hosted anywhere.

This site has been generated by Publican using code in the repository at github.com/craigbuckler/publican.dev.

Why not hand-code HTML? #

Your first website probably contained a selection of pages created in HTML files. Hand-coded sites rapidly become difficult to maintain:

  1. Common components such as headers and footers must be replicated on every page.
  2. Adding a new page requires updates to the navigation on all other pages.
  3. Moving pages or directories requires updates to links, images, CSS, JavaScript, and other assets.

Why not use WordPress? #

A Content Management System (CMS) provides administrative control panels. WordPress is the most well known and used by a third of all websites.

CMS authors write content which is normally stored in a database. When a visitor requests a page, the CMS retrieves its content, renders it within a template, and returns HTML to the browser.

This usually occurs quickly and there are ways to cache pages, but the downsides are:

  1. Performance and scaling. The server does considerable work on every page view so sites get slower as traffic increases.
  2. Multiple points of failure. Software updates or database downtime can break sites.
  3. CMS security. Unauthorized users could access and change site content.
  4. Resilience complexity. Back-ups, development, and staging builds can be difficult to manage.

Why use an SSG like Publican? #

SSGs such as Publican are a compromise between hand-coded HTML and full CMS sites but retain the benefits of both. An SSG extracts content from any source – files, CMS APIs, databases, etc. – and renders it in templates to create HTML files. This build process can run anywhere just once. The resulting files can be deployed to almost any web server.

SSGs offer CMS-like templating without the problems:

Does static mean limited? #

No. A static page means it’s been pre-rendered once rather than on every page visit. It doesn’t limit the features – you can still have interactivity, animations, videos, etc.

The main difference is you may not have server-side functionality. Features such as user login, form submissions, search, shopping carts, and user comments may require a different approach than a typical WordPress site.

I want to know more! #

Refer to the core concepts and documentation pages to get started.