Building a Personal Website using a Static Site Generator

To start blogging about software projects, I built this site using Pelican, Sidecar, and GitHub

Static Site Generator: Pelican

Pelican’s a Python based static site generator that has built-in blogging features and a variety of community-created themes.

Building a Personal Website using a Static Site Generator

With the advent of single-page applications, an updated approach to server-side scripting was introduced, known as server-side rendering. With server-side rendering, static HTML can be sent from the server to the client, and client-side JavaScript then makes the web page dynamic by attaching event handlers to the HTML elements in a process called hydration. Examples of frameworks that support server-side rendering are Next.js, Nuxt.js, Angular, and React.

An alternative to server-side rendering is static site generation. With server-side rendering, the page is generally assembled on the server once per each request. By contrast, with static site generation, the application generates all the static HTML pages at build time. These pre-built pages are then sent to the client at each request, without having to build them again. This leads to faster rendering times, since a new page doesn’t have to be generated on every request; the server simply hands over a file it already generated in the past. The downside is that when some data on the page changes, it needs to be rebuilt. Examples of static site generation tools are Jekyll and Gatsby. Sites generated by static site generation tools are often hosted on Netlify, Vercel or GitHub pages.

https://en.wikipedia.org/wiki/Server-side_scripting#Server-side_rendering

Alternatives in other languages are:

I chose Pelican because I wanted to use my site to blog and already had a Python development environment.

After installing Pelican, you can set up a skeleton project using Pelican’s pelican-quickstart tool.

Pelican Theme: Sidecar

Pelican has built in “simple” HTML templates that can be modified and styled using CSS.

A variety of community created themes are available on GitHub

I chose to use the community created Sidecar theme because I don’t have experience with CSS.

Hosting: GitHub

To have GitHub run pelican for you and build your site, you can use a GitHub Actions workflow