Customized Archetype for This Site

Background I prefer including the date into the Permalink of a post. Everytime I create a new post, I type hugo new post/$(date -I)-post-title.md to ensure that the date is correct. Problem The title field in the post’s front matter contained the date, which wasn’t something that I wanted because it’s already shown next to the icon. Observations Neither \d nor [\d] works for the PCRE character class \d. [Read More]
Hugo 

Icon in Hugo Navbar

Motivation The original navbar in words took up half of the horizontal spaces of the viewport. I couldn’t add new items like “Tags” to display the tag list. Work Thanks to the pre field in Hugo Menus, one can easily add the icon as an HTML element by some editing on the template file. {{ range .Site.Menus.main.ByWeight }} {{ if .HasChildren }} <li class="navlinks-container"> {{ if .Pre }} <a class="navlinks-parent" title="{{ . [Read More]
Hugo  icons  navbar 

Staticman With Introduction Theme

Goal To port Huginn’s Staticman integration to Introduction. Difficulties I’ve used some class names from Minimal Mistakes since the modals in the original code clashes with Introduction’s mobile responsive card display for projects. If I had know the practice of prepending a CSS class to avoid overiding the CSS properties of other components of a web site, I wouldn’t have mixed this Jekyll theme with my template for nested comments. [Read More]

More Static Nested Comments

Background I’ve made nested comment support for Beautiful Hugo, which I’ve ported to other Hugo themes like Introduction, Hyde-hyde, etc. Problem I Some of those Hugo themes that I worked with did show the HTML form, but the CSS styles were gone on the GitLab Pages. Reason I This is due to the lack of resources/_gen/ in the indexed repo for themes making use of assets/. Solution I Check that you have the required prerequisites. [Read More]

Huginn Theme With Staticman

Goal To provide Staticman support to the Hugo theme Huginn. Motivation A Framagit user tried using the public GitLab instance but failed. Finally, he removed Staticman from his site and his Hugo theme. If I had been notified, I would have explained that that was due to the constraint of gitlabBaseUrl, which could only take one GitLab instance. In response to demand for Staticman from Framagit users, I set up another GitLab instance of Staticman API and forked some Hugo/Jekyll repo under the project page Staticman et GitLab Pages. [Read More]

Improved Integration of Hugo and $\KaTeX$

Problem There’s no custom $\KaTeX$ macro in local preview since I’ve merged some recent commits from the upstream of this blog’s theme, in particular, Beautiful Hugo’s pull requests #246 and #255, which allowed self-hosting the theme’s static JS, CSS and font files. This self-hosted option is particularly useful in case of slow response from Cloudflare’s CDN. Even they do appear on the public GitLab site, the final rendered Markdown + $\TeX$ code would be succumb to syntax errors due to their absence in the preview process. [Read More]
KaTeX  Mmark  Hugo 

Replacing Deprecated Hugo Syntax in Blog Theme

Fixing Beautiful Hugo issue #261

Problem Since the recent Hugo upgrade to v0.55.3, the following messages popped up after each local site regeneration with hugo server. WARN 2019/04/24 18:07:00 Page's .URL is deprecated and will be removed in a futu re release. Use .Permalink or .RelPermalink. If what you want is the front matte r URL value, use .Params.url. WARN 2019/04/24 18:07:00 Page's .Hugo is deprecated and will be removed in a fut ure release. [Read More]

Comparaison of Two Docker Images for Hugo

Having importing the repo for the Hugo theme Introduction from GitHub to GitLab, I added the automatically generated GitLab CI config file and I ran job #135854407. $ cd exampleSite $ hugo --themesDir=../.. -d ../public hugo: /usr/lib/libstdc++.so.6: no version information available (required by hugo) hugo: /usr/lib/libstdc++.so.6: no version information available (required by hugo) The build succeeded with the above message. To suppress it, a switch to another CI runner will do. [Read More]

Staticman Lab New Logos

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]

Nested Comments in Beautiful Hugo

Quick links A minimal demo site on GitLab (Source) Beautiful Hugo pull request 222 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. Zongren’s Hexo theme (worked best) Made Mistakes Jekyll theme Network Hobo’s customization of Beautiful Hugo (inspired by the second one, but contains a logic error) [Read More]