Hugo Updates, S3 and CloudFront

Feb 27, 2020
Hugo, S3

Two days ago I updated Hugo to version 0.65.3 before moving this site from my EC2 to S3. Then I realized that in recent updates, Hugo dropped pygments as a dependency (#4491). As a result, all SAS codes on this site lost syntax highlights, because the highlighter chroma used by Hugo had not yet supported SAS language. After trying different options like using client-side syntax highlighter, I gave up and decided to add SAS support myself for chroma. ...

Display PageViews and List of Popular Posts on a Static Site

Sep 6, 2019
Hugo, Static Site, Pageview

A static site, like this one based on Hugo, cannot easily display site statistics. But there’s a solution. When the page is loaded on the client side, a Javascript pulls the relevant statistics from my server then render it to the page. The server runs a small Python program to contact Google Analytics API in order to get the statistics and return to the frontend. We can even use it to build a list of popular posts. ...

My Server Setup

Sep 2, 2019
Hugo, Static Site

Site Setup This site is powered by Hugo, served by Apache. I moved away from WordPress because it’s too heavy for a personal site. It’s also slow and I could not find a theme that suits the purpose of the site. So, eventually I’m with Hugo and using markdown for everything. The setup is very simple: Download Hugo from GitHub. Note that we need the extended version. $ wget https://github. ...