Short answer
View my profile for a quick start, and my minimal demo site (source).
Complete answer
I recommend a static blog powered by open-source technologies Beautiful Hugo with Staticman. The former provides a blogging theme with KaTeX, whereas the later provides commenting support for static sites.
To start writing math online using Beautiful Hugo without any installation, you may
Quick start
- Clone GitLab's sample
- Follow the README from GitLab User or Group Pages. (Skip the first two sections unless you want to preview your posts before publishing.)
- (Optional: commenting support) Clone my demo GitLab site instead, and follow my guide in my profile from step 2.
Figure 1: A data analysis blog showing math equations.
Technical specifications
Abstract comparisons
- Advantages of static sites over dynamic sites (e.g. WordPress): the former concentrates on content delivery (the case of a personal blog) without handling logic from clients' requests (counterexample: library catalog search). Unlike dynamic web servers, static ones won't slow down drastically upon massive requests.
Therefore, many data analysts prefer static pages, say https://www.datascienceblog.net/post/other/staticman_comments/ Further reading: https://www.netlify.com/blog/2016/05/18/9-reasons-your-site-should-be-static/
- Advantages of static comments over dynamic comments (e.g. WordPress) and/or comments offload (e.g. Disqus): the former allows search engines to grasp the whole page as site content without an extra database. This boosts both load speed and SEO. A WordPress site requires a database, which bears a considerable maintenance cost (for the service provider and/or the end users). You may see IRZ's article about migration from WordPress (in French) for an estimate of the cost of a medium WordPress site.
- Advantages of free and open source softwares over proprietary technologies: there are plenty of discussions about this. Long story short, you can avoid being locked by proprietary licenses by switching to open source technologies. As a short example, imagine what you file would become if you saved your work in Microsoft Word ten years ago.
- Advantages of decentralized technologies over central ones: in some countries, some large web sites (e.g. Google) are banned. Despite my support of Ciro Santilli 新疆改造中心 六四事件 法轮功's attack on SE, one has to wait for an indefinitely long period for its victory. Therefore, technologies allowing the use of custom domains are preferred.
Specific comparisons
- Hugo vs Jekyll: Hugo is a static blog renderer written in Go, which is one of the fastest programming language developed by Google. I had been a Jekyll user for three years. As my old blog grew to over three hundred articles, it took me more than a minute for site regeneration due to the speed of Ruby.
- KaTeX vs MathJax: personally, speed is king 👑. To see this, load this site's MathJax tutorial. The former is less mature in terms of $\rm \LaTeX$ syntax support, but it should cover the majority of this site's $\rm \LaTeX$ code. (known exceptions: AMS-CD)
- Staticman vs Disqus: apart from point (2) in the previous section, the later has neither Markdown nor math support. Although the main Staticman API suffers from an error lasting for several months, this can be overcome by following the next point.
- GitLab vs GitHub: apart from point (3) in the above section, the former offers a convenient all-in-one CD/CI service. This allows users to remotely run scripts (i.e. build sites) without installation. Using the later, one either use other third-party CI/CD service or put the generated HTML code in a separate orphan branch. The first option is less convenient, whereas the second option implements a wrong Git model. Git only manages source code, not data, binaries nor generated code.
Variations
Since Staticman is an open-source API service converting HTML form data into Git commits to be pushed to the remote Git repository, users can incorporate it with any (or even none) static site generator.
Jekyll + Staticman v3
Despite Hugo's faster site regeneration, some users might want to stick with Jekyll. Here're two examples.
- GitHub Pages: https://github.com/daattali/beautiful-jekyll#features
- GitLab Pages: https://staticman-gitlab-pages.frama.io/jekyll/
Use Framagit instead of GitLab.com
Framagit generates pages in half of the time of GitLab.com.
Since Framagit is a self-hosted GitLab instance, the setup follows the same logic, except that you have to use a different GitLab bot, Heroku app name and specify your API parameter to be GITLAB_BASE_URL = "https://framagit.org/"
.
Note: It's suggested that every Staticman user use his/her own API instance.