Staticman Lab New Logos

StaticmanLab new logo

StaticmanLab's new logo

GitLab logo recreated from Wikimedia's logo by Darby under CC-BY-SA 4.0 and Staticman logo on GitHub by Erlen Masson under MIT.

The old icon for Staticman Lab was made by GIMP from Staticman’s icon in PNG in the GitHub repo. Recently, I’ve found the SVG version of this icon. To serve customers better, I’ve recreated the logo from this SVG file so that the edges in the logo become sharper.

[Read More]

Merge GitHub Pull Requests

Aim

To merge a pull request.

How?

Let’s take Staticman PR 231 as an example. I would like to test it before commiting this merget to Heroku.

$ cd ~/staticman
$ git branch -a
* deploy
  dev
  master
  ...
$ git remote -v
eduardoboucas https://github.com/eduardoboucas/staticman.git (fetch)
eduardoboucas https://github.com/eduardoboucas/staticman.git (push)
heroku  https://git.heroku.com/staticman3.git (fetch)
heroku  https://git.heroku.com/staticman3.git (push)
...
$ git pull eduardoboucas pull/231/head:deploy
remote: Enumerating objects: 10, done.
remote: Counting objects: 100% (10/10), done.
remote: Total 18 (delta 10), reused 10 (delta 10), pack-reused 8
Unpacking objects: 100% (18/18), done.
From https://github.com/eduardoboucas/staticman
 ! [rejected]        refs/pull/231/head -> deploy  (non-fast-forward)

I executed the last command on branch dev. I didn’t have time to figure out the reason for this error. The following commands should work.

[Read More]

Nested Comments in Beautiful Hugo

  1. A minimal demo site on GitLab (Source)
  2. Beautiful Hugo pull request 222
  3. Pre-release notes for this pull request

Motivation

For the mathematical ones, please see my previous post.

As a math student, it’s inefficient to reinvent the wheel like engineering students. Thanks to three existing examples, I had convinced myself that I could bring this to the theme Beautiful Hugo.

Interactive Blog on Static Web Host

Vision

  • gain autonomy: freedom is the basis of moral actions. No freedom, no morality.
  • transcend ourselves: change/improve our lives through free thoughts

Goal

Convert our free thoughts into free code.

Free code allows users around the world to run and/or improve them. This would bring real enhancement to our tools.

For example, beautiful math writing used to be a complicated process. A decade ago, this required the installation of a typesetting engine called $\LaTeX$. Thanks to freely available scripts like MathJax and $\KaTeX$, it’s now possible to write math viewable by any modern web browser by writing the content in the middle.

[Read More]

Minimal Jekyll Site with Static Comments

Setup Staticman v3 and Jekyll on GitHub Pages

Introduction

This is the GitHub Pages version to my GitLab Pages with Staticman tutorial.

I didn’t plan to test whether Staticman v3 work on GitHub since it’s proprietary. However, from Staticman issues #222 and #227, we know that the official server doesn’t respond to

GET /v2/connnect/<USERNAME>/<REPONAME>

To help others, I self-advertised my own Staticman API instance and the migration to GitLab pages. Unfortunately, nobody had managed to create a GitHub repo running on my API instance. To convince others that it’s also working on GitHub, I decided to create a minimal GitHub repo.

[Read More]

Staticman API Hosting 2018

Step-by-step guide for free-hosting on Heroku

Update: I suggest reading a newer tutorial for setting up your custom API server that works with GitHub Apps. The package maintainers suggest hosting your own API server.

Goal

To host an instance of Staticman v3 server on Heroku.

This post involves server-side setup of the commenting system. If you simply want to have a taste of this system on GitLab, you may try my demo GitLab Page.

I try to address some concerns about this API service in the introduction of this series to keep this page focused on the technical aspects of my customizations against staticman/dev branch.

[Read More]

Config GitLab Repo for Staticman

Update: I suggest reading a newer tutorial.

To keep focused on the technical setup, please refer to the introduction of this series for the reasons of choosing Staticman and GitLab.

Goal

To set up unauthenticated commenting system on GitLab pages.

GitLab Page with Staticman

Demo GitLab Page with Staticman v3

Built on 14/09/2018

This post aims at providing a walkthrough to the GitLab repo setup. If you want to host your own Staticman API instance, you may refer to the next post in this series.

[Read More]

Welcome to static comments

Staticman Powered GitLab Pages

I put some “why” questions here so as to keep focus on the technical setup of the GitLab repo and the optional Staticman API server.

Why static blogs instead of dynamic ones?

  • quicker loading time
  • better reliability (can handle more request)
  • no database needed
  • greater control on content, styles and layout

Why static comments?

  • allow feedback from visitors
  • site owner owns the comment locally (unlike WordPress, Facebook, Disqus, etc)
    • no remote database needed, so no need to worry server errors from third-party commenting services.
    • greater control over the rendering of the comments (allow additional features such as Markdown syntax, and $\KaTeX$ support)
    • more accessible since static comments are incorporated as HTML elements into the post. No JavaScript is required to retrieve the comments, contrary to most third-party commenting services.

Before Staticman’s deployment, another commenting system called Pecosys was already available. However, it’s less convenient to handle visitor’s requests as emails.

[Read More]