DEV Community

Cover image for Hugo #1 - Intro to Static Site Generators
Thomas Sarmis
Thomas Sarmis

Posted on • Edited on • Originally published at greekdeveloper.com

5 2

Hugo #1 - Intro to Static Site Generators

A static site generator (SSG) is an application that converts simple text files (with minimal markup) to static sites using predifend templates (Themes). They provide a middle ground between fully fledged Content Managment Systems (like wordpress or drupal) and statically build sites.

Pros

  • No server-side infrastructure except a simple http server (no database, no server-side application).
  • Simple deployment procedure (just copy the generated files).
  • Every deployment is a full deployment (no differences between local and remote site)
  • Easily to track content and theme via source code versioning system
  • Content consistency (every page looks the same due to template usage)

Cons

  • The application is required in order to alter content (ie. cannot publish frpm mobile)
  • No advanced content management or authorization model
  • There is a learning curve for doing more complex tasks (but this is true for every other option)

Use case

SSGs are a fitting option for personal or small teams, blog-style sites where any commenting is either disabled or off-loaded to another tool (ie facebook comments) - If the team member are familiar with text editing, markdown and git (like developers are) even better.

Operation & Setup

The typical steps to setup an SSG are:

  1. Download SSG binaries or script
  2. Create a new folder (project)
  3. Download a theme
  4. Configure site parametes (title, url, theme, etc)
  5. Create content (simple ascii files, using markdown)
  6. Build static files
  7. Deploy static files

Which one?

There are multiple SSGs to select from, but the 3 most used are:

  • Jekyll is the most used (partailly due to being used by github pages), but setting up RoR on a windows machine could be intimidating..
  • Hugo is build in "Go" but ships as a single executable and is a nice option
  • Hexo is build in node.

My personal preference is Hugo

Origin post at greek developer

AWS Q Developer image

Your AI Code Assistant

Generate and update README files, create data-flow diagrams, and keep your project fully documented. Built to handle large projects, Amazon Q Developer works alongside you from idea to production code.

Get started free in your IDE

Top comments (3)

Collapse
 
sarmis profile image
Thomas Sarmis

No, not yet at least

Billboard image

Create up to 10 Postgres Databases on Neon's free plan.

If you're starting a new project, Neon has got your databases covered. No credit cards. No trials. No getting in your way.

Try Neon for Free →

👋 Kindness is contagious

Please leave a ❤️ or a friendly comment on this post if you found it helpful!

Okay