Thoughts on Migrating from Hexo to xLog

发表于 2023-04-05 17:46 1443 字 8 min read

cos avatar

cos

FE / ACG / 手工 / 深色模式强迫症 / INFP / 兴趣广泛养两只猫的老宅女 / remote

作者分享了自己将 Hexo 博客迁移至 xLog 的经历,介绍了 xLog 作为一个基于区块链的开源博客系统,具备去中心化、数据所有权明确、现代化技术栈(Next.js + Tailwind CSS + TypeScript 等)和丰富的功能(如 AI 摘要、IPFS 图片存储、Web3 互动等)的优势,并提出了文章批量操作、分类、搜索等功能的改进建议。文章也强调了 Web3 不只是投机,更包含真正致力于数据主权与去中心化理想的实践者。

This article has been machine-translated from Chinese. The translation may contain inaccuracies or awkward phrasing. If in doubt, please refer to the original Chinese version.

Recently, I decided to migrate part of my Hexo blog to xLog and start writing on it, because it’s cool and its tech stack is very modern!

xLog is an open-source blogging system based on blockchain, built with Next.js + Tailwind CSS + TypeScript + TanStack Query. All blog data is signed by users and stored on the blockchain as NFTs.

Original Hexo link: https://ysx.cosine.ren/ My xLog link: https://cosine.xlog.app/

For the setup process, check out this article: https://song.xlog.app/5m-zh. If you’re already familiar with web3, it’s straightforward — just connect your wallet, enter the dashboard, and you’re done.

The Motivation

The idea came from reading this article: https://diygod.me/xlog, where the author diygod introduced xLog’s pros and cons along with usage instructions. As a web3 practitioner, I naturally had great interest in on-chain blogging, so I came to try it out. Another reason is that this blog’s tech stack closely aligns with what I love to use: Next.js + Tailwind CSS + TypeScript + TanStack Query. After cloning the repo, I also noticed prisma — impressive!

PS: I really like her signature: “Coding is passion, coding until the world is full of love!”

Advantages

Quoting the goals from the blog post, I think they’ve truly been achieved. I personally love its design philosophy and implementation.

My personal blog has been running for nearly 9 years, growing alongside me. It has essentially become my personal development history. Tinkering with blogs has been a hobby of mine for a long time, but growing increasingly dissatisfied with Hexo, I decided to create a more modern blogging system from scratch. I didn’t just want to satisfy my own needs — it needs to be open source and sufficiently open to meet more people’s needs. I didn’t want my precious data to be held hostage by centralized platforms, yet didn’t want the hassle of maintaining a database or server. It needs to balance data ownership with convenience, which is why I chose blockchain. Finally, it needs to use a relatively new tech stack, providing a better development and maintenance experience.

The advantages are roughly as follows:

  • Open source, open source, open source!
  • Decentralized, secure, clean, open, and visually appealing
  • Modern with a cutting-edge tech stack; the author maintains it actively with daily commits
  • Freely customizable, one-click deployment; doesn’t even require your own domain (though you can bind a custom domain)
  • Import/export is very convenient, with excellent Markdown support. Even when importing old Hexo articles, the timestamps don’t need changing — it recognizes the frontmatter
  • When there’s no excerpt, it provides AI-generated summaries when viewing articles (a lifesaver for those too lazy to write excerpts!)
  • I love Tailwind (shouts)
  • When I opened the settings page, I saw Google Analytics — how thoughtful!

Integrate Google Analytics into your site. You can follow the instructions here to find your Measurement ID.

  • Shadow authorization: You can authorize others to enter your dashboard, change settings, or publish articles

image

  • Image upload to IPFS: Very web3 — saves you the image hosting hassle. Just paste screenshots and upload (just be careful not to leak private info)
  • Web3 version of triple action: Like, bookmark, tip -> If you love it, mint their article as an NFT to collect~
  • The official team is adorable, and I’ve long been familiar with the author’s RSSHub

Shortcomings & Suggestions

The current xLog still has some drawbacks. Since it’s still being developed, it may not serve as my primary blog for now. But I hear the current development team is just one person — looking forward to seeing a more complete xLog.

Some drawbacks I’ve personally experienced and those noted officially:

  • Batch operations on articles are currently lacking
    • For example, when I made an import mistake and wanted to batch delete articles, I found this couldn’t be done quickly
    • Once this is supported, I’ll immediately delete those articles with broken formatting from my earlier import attempts QAQ
  • All my operations are visible on the official Activity Feed
    • The good side: articles get seen by many people
    • The less ideal side: although you can’t truly delete, would it be possible to add a feature to hide certain articles from the official feed?

      After all, when migrating, having a flood of your articles suddenly appear in the latest feed is quite startling Or perhaps add sorting options? Currently it seems sorted by transaction date rather than article date

  • The article editor experience needs improvement, though most of the time I edit Markdown locally and paste it in or import directly
    • Would love to see a table of contents preview within the editor
    • Perhaps the plugin system will bring many improvements when it launches
  • Category functionality is not yet supported — can only use tags to organize articles?
  • Search functionality is not yet supported — might need third-party services?
  • Some article formatting isn’t fully supported yet — looking forward to future theme & plugin systems
    • For example, Markdown parser plugins~
  • Is it possible to delete a character/persona? I initially chose the wrong handle and really want to delete it rather than just switch characters

Conclusion

Finally, almost every web3 article aimed at the general public ends with expressing dissatisfaction toward speculators in this field, tirelessly explaining that web3 is not just about crazy investors and those being taken advantage of. Web3 is an interesting and challenging field with tremendous potential and many problems. Don’t ignore web3’s profound impact on the internet and society, and don’t underestimate those in web3 who are truly creative and visionary.

Here’s a quote from the blog setup tutorial mentioned above:

You might want to say that blockchain, IPFS, and Web3 — these terms sound far removed from us ordinary users, and are often equated with the nebulous scam of “crypto.” But in reality, in this field, speculators are just the noisy part. We should see that there are more people truly working for the “Web3 ideal” and the things they’re building. As a fully open-source social ecosystem product focused on Web3 data ownership by users, the Crossbell blockchain and xLog are among them.

Regarding gas fees, there’s a faucet where you can claim them for free, but I found this passage very interesting:

Just as activities in the real world require money, activities (transactions) on the blockchain require fees. The Crossbell blockchain’s transaction fee is $CSB. You might ask, why don’t Web2 websites require fees for activities? The answer is that your “data privacy” has unknowingly been traded as a substitute fee.

Here are some articles worth reading that may give interested readers a window into web3. Descriptions were generated by ChatGPT and accuracy is not guaranteed.

  • What is Web3? The Decentralized Internet of the Future Explained This article provides a detailed account of web3’s development history and future vision, as well as how it addresses some of web2’s problems, such as data privacy, centralization, and monopolies. It also provides real-world web3 examples and resources to help readers better understand and participate in web3.
  • The Path to Web3 This article covers web3’s development history and future vision, and how it addresses web2 issues like data privacy, centralization, and monopolies. It also introduces The Graph project, an indexing protocol for querying blockchain network data, making it easier for developers and users to build and use decentralized applications (DApps). It also looks ahead to The Graph’s future plans, including supporting more blockchain networks and increasing community participation and governance.
  • Web3 DApp Best Programming Practices Guide This article is a best practices guide for Web3 DApp development. The author is the renowned programmer Guo Yu, who shares problems and solutions encountered in his CodeforDAO and Checks Finance projects. He introduces basic Web3 DApp development concepts such as blockchain, smart contracts, wallets, DApps, decentralized protocols, and more. He also provides tools and resources for Web3 DApp development, including programming languages, frameworks, libraries, testing, deployment, monitoring, and more. His goal is to help more engineers transition to Web3 and contribute to Web3’s long-term development.

Thank you for reading this article. I hope you found some useful information and inspiration. If you have any suggestions or criticism for my articles, feel free to leave a comment or contact me via email. I’d be happy to hear your feedback and ideas. Wishing you a pleasant life!

喜欢的话,留下你的评论吧~

© 2020 - 2026 cos @cosine
Powered by theme astro-koharu · Inspired by Shoka