Blog Migration: From Jekyll Chirpy to Hugo PaperMod

Background This blog started in late 2013, hosted on GitHub Pages with Jekyll. After several theme changes, the most recent setup was jekyll-theme-chirpy 7.1.1. After accumulating 55 articles, I decided to reassess the tech stack, looking for something simple, elegant, and developer-oriented. Static Blog Ecosystem in 2026 Before making a choice, I compared the current mainstream static site generators (SSGs): SSG Language Build Speed Highlights Jekyll Ruby Moderate Native GitHub Pages support, most mature ecosystem Hugo Go Extremely fast (<1ms/page) Single binary, zero dependencies Astro JS/TS Fast Zero JS by default, Island Architecture 11ty JS Fast Flexible, multi-template engine Zola Rust Extremely fast Single binary, built-in Sass/highlighting Why Hugo + PaperMod After evaluation, Hugo + PaperMod was the winner: ...

June 26, 2026 · 4 min · haoxiqiang

Android & Linux Tips Collection #3

Three quick tips: handling the back button in DialogFragment, chmod permission reference, and the underscore problem in SSL hostnames. DialogFragment Back Button Handling DialogFragment has no direct override for the back button. Two approaches were commonly used. Approach 1: Override in onCreateDialog 1 2 3 4 5 6 7 8 9 @Override public Dialog onCreateDialog(Bundle savedInstanceState) { return new Dialog(getActivity(), getTheme()){ @Override public void onBackPressed() { // Handle back press here } }; } Approach 2: Via onKeyListener 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 @Override public void onResume() { super.onResume(); Dialog dialog = getDialog(); if (dialog != null) { dialog.setOnKeyListener(this); } } @Override public void onPause() { super.onPause(); Dialog dialog = getDialog(); if (dialog != null) { dialog.setOnKeyListener(null); } } Modern Approach: OnBackPressedDispatcher (AndroidX) For newer versions, use AndroidX’s OnBackPressedDispatcher. Since Fragment 1.6.1, DialogFragment returns a ComponentDialog by default, which has its own OnBackPressedDispatcher: ...

April 5, 2017 · 3 min · haoxiqiang

Lorem Ipsum — Placeholder Text

A colleague asked me today what this text meant: Lorem ipsum dolor sit amet, consectetur adipisicing elit. Aliquid veniam harum quas similique quis, quisquam tempore iste. Alias soluta dolorum ratione, dolorem quia corrupti, suscipit eveniet dolor dignissimos voluptas laborum debitis ea fugiat aliquam rem ullam minus a aliquid pariatur! ...

December 4, 2015 · 2 min · haoxiqiang

Tencent Interview

I came across stormzhang’s Tencent interview questions and decided to work through them, documenting my answers and thought process. Topics covered: Android fundamentals (processes, Activities, Handler) Screen density and resource qualifiers Thread synchronization in Java System design (resumable downloads, network architecture) ...

December 8, 2014 · 3 min · haoxiqiang

Building a Blog with Jekyll

This is the first post of this blog. I referenced many Jekyll templates at the time, adapted a custom theme inspired by Pure, and hosted it on GitHub. Source code: haoxiqiang-template Jekyll Overview Jekyll is a static site generator that converts plain text (Markdown, Liquid templates) into a complete static website without requiring a database. Combined with GitHub Pages, it provides free blog hosting. Features Code Highlighting Jekyll has built-in syntax highlighting powered by Rouge: 1 2 3 4 5 def print_hi(name) puts "Hi, #{name}" end print_hi('Tom') #=> prints 'Hi, Tom' LaTeX Math Rendering Set latex: true in the page front matter to enable MathJax rendering: $$ \begin{aligned} \dot{x} &= \sigma(y-x) \ \dot{y} &= \rho x - y - xz \ \dot{z} &= -\beta z + xy \end{aligned} $$ $$ a^2 + b^2 = c^2 $$ When $a \ne 0$, there are two solutions to $ax^2 + bx + c = 0$. Excerpt Separator Use ` ...

December 21, 2013 · 1 min · haoxiqiang