rwv’s Blog

👋 Welcome to rwv’s Blog!

  • 👨‍💻 Here I mainly share tech-related articles, and occasionally record some life moments.
  • 🐙 This blog is open source! You can find the source code at rwv/blog.

Add Giscus Multilingual Support in Hugo PaperMod

Giscus actually supports multiple languages, as you can see in giscus/giscus/locales. However, it doesn’t automatically detect the language, so manual configuration is needed. Hugo PaperMod doesn’t have a simple way to set different comment components for different languages, so we need to configure it manually. Configure Giscus First, create a comment component at giscus.app, which looks like this: <script src="https://giscus.app/client.js" data-repo="[ENTER REPO HERE]" data-repo-id="[ENTER REPO ID HERE]" data-category="[ENTER CATEGORY NAME HERE]" data-category-id="[ENTER CATEGORY ID HERE]" data-mapping="pathname" data-strict="0" data-reactions-enabled="1" data-emit-metadata="0" data-input-position="bottom" data-theme="preferred_color_scheme" data-lang="en" crossorigin="anonymous" async ></script> Notice the data-lang attribute - this is what we use to set the language. ...

January 22, 2025 · 3 min · 611 words · rwv

Migrating Blog System from Hexo to Hugo

After four years, I’m ready to start blogging again. However, I felt the need to tinker with the system as Hexo wasn’t quite meeting my needs, so I decided to migrate to Hugo. Another important reason was that yilia hasn’t been updated for a very long time and doesn’t even support dark mode. Migration Motivation Here are the main advantages of migrating from Hexo to Hugo, along with avoiding some existing technical debt (such as messy git logs and lack of open source): ...

January 22, 2025 · 3 min · 498 words · rwv

Mounting Network UNC Paths to Drive Letters in Windows CMD

There are two methods to mount a network UNC (Universal Naming Convention) path to a local drive letter in Windows Command Prompt. While pushd is commonly used, it has a significant limitation that may affect certain scenarios. ...

April 26, 2019 · 2 min · 237 words · rwv

Create a ZeroTier Moon Node with Docker in Two Commands

While creating a ZeroTier moon node isn’t overly complex, it does involve several steps. To simplify this process, I’ve created a Docker image that lets you set up a moon node with just two commands. ...

May 13, 2018 · 2 min · 232 words · rwv

Fixing Time Synchronization Issues Between Hackintosh and Windows

By default, macOS and Windows handle the system BIOS clock differently. macOS interprets the BIOS clock as UTC (Coordinated Universal Time), while Windows reads it as local time. For example, if the BIOS clock shows 00:00, Windows will display it as 00:00 local time. However, macOS will interpret this as 00:00 UTC and adjust it to show 08:00 for users in GMT+8 time zones (like Beijing time). This difference in interpretation causes the time to appear inconsistent between the two operating systems. ...

March 4, 2018 · 1 min · 158 words · rwv

Solution for autojump_chpwd:4: nice(5) failed: operation not permitted Error in WSL

When using autojump in Windows Subsystem for Linux (WSL), you might see this error message: autojump_chpwd:4: nice(5) failed: operation not permitted While this error doesn’t affect autojump’s functionality, it can be annoying to see this message every time you use the command. ...

February 1, 2018 · 3 min · 536 words · rwv

Opening UTF-8 CSV Files with Microsoft Excel on macOS

Microsoft Excel on macOS doesn’t provide a direct way to set character encoding when opening files. This makes it challenging to properly open UTF-8 encoded CSV files. However, there’s a workaround using Excel’s Get External Data feature that allows you to successfully open UTF-8 CSV files. ...

January 26, 2018 · 1 min · 115 words · rwv