Featured image of post Recent Updates: Guilin, Raspberry Pi, and My RSS Feed

Recent Updates: Guilin, Raspberry Pi, and My RSS Feed

I might need to get my life back on track.

A Short Stay in Guilin

Here comes that cliché again: “Guilin’s scenery is the best under heaven.”

When it comes to Guilin, most people have either heard of it or visited it. World-class landscapes paired with a third-tier urban build. Over a decade ago, I lived in Guilin for a while: the Elephant Trunk Hill in the city, the boat tours of the Two Rivers and Four Lakes; outside the city, Yangshuo, bamboo rafting on the Li River, and barbecues on the river banks.

Tourist destinations that once intrigued me no longer do. You might have heard the jest, “He who has never been to the Great Wall is not a true man, and he who goes again is a fool,” which captures that feeling—it’s like a sugary drink, heavenly at first taste but just sickening once the novelty wears off.

I had just returned from Hong Kong and within days, I was off to Guilin, albeit reluctantly. The trip to Hong Kong had been oppressively stressful, filled with travel fatigue. It felt like I would need the entire National Day holiday just to recover.

But life is always full of bizarre twists. Somehow, I found myself embarking on a new journey to this city I had almost thoroughly explored.

A City Reflects a Mood

If Changsha is about entertainment to death, Guilin, in my eyes, is relatively laid-back: unlimited servings of Guilin rice noodles for six yuan a bowl, enough to cover three meals a day for just 18 yuan; during the off-season, the Two Rivers and Four Lakes are nearly deserted due to its overcapacity, resulting in significantly lower hotel and tourist site prices. Thus, my previous stays in Guilin were quite affordable, allowing me to enjoy its landscapes on a modest budget.

Over the National Day holiday, I stayed at a relative’s house who was away on a trip, so accommodation was free; my mother’s company covered all the fuel costs for the family car; coupled with Guilin’s generally low cost of living, this way of changing scenery was indeed very cheap economical.

So, I ended up happily staying in Guilin for five days.

A Random Hill Anything but the intended focus is in focus with this old Nikon Scholar’s Bridge No bridge for the scholar

Rice fields Flowers at a coffee stall Rice fields 2

Raspberry Pi and Cloudflare Tunnel

The Raspberry Pi was purchased with my roommate AA for a project, and after the project, it became mine. Since it’s a ready-to-use computing resource, I installed Raspberry Pi OS Lite 64bit on it, connected it to the network, and used it as a server.

Being an ARM architecture, the Raspberry Pi has very low power consumption, less than 5W in standby and 25W at peak, rarely reaching peak power, costing at most a few tens of yuan in electricity per year.

The toughest part was dealing with network issues, thanks to China’s unique internet environment. Publishing content from a home server to the public internet is a headache: ISPs typically don’t provide public IPv4 addresses by default, and even if they do, they’re dynamic; and forget about opening common ports like 80 or 443; getting a static IP isn’t impossible, but requires a business line, which not only involves various certifications but is also at least ten times more expensive than residential internet.

I didn’t have high hopes for Cloudflare Tunnel initially, given the numerous online complaints about its frequent disconnections and packet losses. However, to my surprise, it performed much better than expected. Except for the relatively long loading times for root documents, other static resources benefited greatly from Cloudflare’s powerful Edge Network, loading very quickly. And, perhaps due to regional differences or between ISPs, my Tunnel remained stable and relatively fast even during peak hours. This is a test blog I set up on the Raspberry Pi; if you’re interested in seeing the specific acceleration effects, check it out: https://rpiblog.l3zc.com.

Solving the problem of internal network penetration greatly enhanced the potential uses of the Raspberry Pi, allowing for many more interesting projects in the future. I can only hope that the ISP doesn’t arbitrarily cut off my Tunnel.

Home Raspberry Pi Lighthouse score

My RSS Feed

Joining Follow, Verifying My Blog

I first heard about Follow from DIYGod’s tweet, another open-source project by DIYGod following RSSHub, still in its Alpha stage but already quite polished.

Follow is an RSS reader that integrates deeply with RSSHub and RSS3 (For real, why??). Unlike most RSS readers, Follow uses a cloud server to fetch content, hence there’s a limit on the number of feeds you can subscribe to; currently, it also requires an invitation code during its beta phase, which fortunately isn’t too hard to get with the help of the online community.

I’ve been using Follow for a week now, and overall, the experience has been very satisfactory; it’s powerful, smooth, and features an unlimited (for now) LLM summary/translation function.

Invitation code from a netizen Follow’s main interface

Follow is unaffected by image hotlink protection Various different views, nice Videos can be played directly within the reader

Follow is also a community where feed maintainers can verify their own feeds, allowing them to receive donations. Donations are implemented using a type of ERC-20 token called Power (for real, why?? I just want to read RSS Feeds, why do I need to deal with blockchain?). Although I still see this approach as controversial, Follow has polished this feature well, making the experience enjoyable.

Fixing RSS Feed Reading Experience Issues

The default RSS Feed generated by Hugo offers a very poor reading experience

The original RSS Feed on my blog was generated using Hugo’s default template. The content pulled directly from the .Content variable included a mess of different resolution image URLs generated by built-in image processing features, and code blocks included line numbers and highlighting marks produced by chroma, which most readers can’t handle properly. So, I added a few Render Hooks to fix these issues in Hugo:

./layouts/_default/render-codeblock.rss.xml:

1
<pre><code>{{ .Inner }}</code></pre>

./layouts/_default/render-image.rss.xml:

1
2
3
4
5
6
7
{{- $url := urls.Parse .Destination -}}
{{- if not (or (eq $url.Scheme "http") (eq $url.Scheme "https")) -}}
    {{- $result := .Page.Resources.GetMatch (printf "%s" (.Destination | safeURL)) -}}
    {{- with $result -}}
        <img src="{{ .RelPermalink | absURL }}" alt="{{ $.Text }}" {{ with $.Title}} title="{{ . }}"{{ end }} />
    {{- end -}}
{{- end -}}

This way, the previously poor reading experience is no longer an issue (hopefully).

I also made some minor front-end optimizations. Now, when copying code, it’s no longer possible to accidentally select the line numbers next to the code. The font has been switched to Jet Brains Mono, and the padding has been adjusted to make copying easier.

The original code blocks made it easy to accidentally select the line numbers

Besides blogging, fixing bugs on the blog is always a pleasant task. This modification not only improved my mood but also enhanced everyone’s reading experience.

Licensed under CC BY-NC-SA 4.0
Built with Hugo
Theme Stack designed by Jimmy