返回文章列表文章索引阅读全文
STARBLOG / 阅读手记
StarBlog番外

StarBlog v1.3.0 New Version, a Wave of Updates and Server Migration Deployment

Server failure forced an update, directly migrated to cloud servers. Here comes version v1.3.0, with upgrades across architecture, interface, and SEO, plus the addition of an image compression tool—finally cleaned up the code a bit. How do you feel about this big update?

曦远 (DealiAxy)约 28 分钟
目录19 个章节

Preface

It's been a while since I last updated my blog.

It's not that I don't want to update it.

In fact, I have a bunch of articles saved up and unpublished.

The main reason is that the server hosting StarBlog experienced a failure.

My articles across all platforms are distributed through StarBlog.

So during this period, article updates on all platforms have been paused.

To restore updates as soon as possible, I've decided to migrate StarBlog to a cloud server.

This will be more stable and can also reduce some maintenance costs.

Check out the result here: https://blog.deali.cn/

About StarBlog

StarBlog is a modern blog system developed based on .NET Core. Development began during the 2022 Spring Festival, and since I was learning .NET Core at the same time, it was essentially a hands-on project for practicing the framework.

After the StarBlog article series concluded and the features stabilized, I rarely touched the code for this project.

Not maintaining it for so long inevitably gives it a messy codebase feel. Moreover, it's now 2025, and looking back at the old code, I find dissatisfaction everywhere. Therefore, I'm planning to refactor a StarBlog v2. You can refer to my previous article for more details: StarBlog - (32) End of the First Phase

Since this time I'm migrating StarBlog to a cloud server, I'll take the opportunity to make some improvements. v2 is still a long way off; for now, addressing the immediate issues is more urgent.

Update

This is probably the last major update before v2.

The version has also been upgraded to v1.3.0.

PS: By the way, this update also includes some code cleanup.

This is when versioning was introduced, using the version from Conclusion of the First Series as the v1.0.0 milestone.

The brand new visit statistics feature introduced in the Extra Chapter was the main content of the v1.2.0 release.

This update primarily covers several areas:

  • Architecture and dependency upgrades
  • UI & interaction improvements
  • SEO features & search optimization
  • Performance optimization
  • Toolchain enhancements

Architecture and Dependency Upgrades

The long-awaited project upgrade is finally here 😂

This project has been developed since 2022 and has remained on .NET 6.0. This time, it’s upgraded directly to the latest version.

  • The entire project is migrated to .NET 9.0, with key dependencies updated.
  • Removed redundant features (e.g., data collection, image library, Rin logging system, etc.).
  • Frontend resources switched to production versions, with code structure cleaned up.

Interface and Interaction Improvements

Now front-end development is all done with Tailwind CSS

Haven't used Bootstrap in a long time, and looking at this interface now, it really does feel a bit dated

  • Added a Hero area style and animation to the homepage.
  • Optimized article cards, photo cards, and the navigation bar, fully localizing them into Chinese.
  • Enhanced responsive design and accessibility.

SEO Features & Search Optimization

SEO is a feature I previously overlooked, and this time I added a bunch of SEO-related features.

  • Introduced structured data, dynamic metadata, and image SEO optimization.
  • Unified Sitemap service (supporting main/image/index).
  • Added an SEO test page and robots.txt optimization.

Performance Optimization

Previously, the server deployed for StarBlog had high performance, so these optimization details weren't considered.

Now, it needs to be deployed on a cloud server where both performance and bandwidth are limited.

Therefore, I've made some optimizations to enhance the user access experience as much as possible.

  • Added response compression functionality
  • Configured static file caching strategies
  • Optimized concurrency performance to ensure that even servers with limited capacity can deliver a relatively good access experience

Toolchain Enhancement

Regarding performance optimization mentioned earlier, the main focus is still on images.

So, I developed an image compression tool based on ImageSharp to compress blog post images, photo albums, and more. This step also took quite some time 🤣

Next, I will write a few articles to introduce these newly added tools.

  • Added multi-mode image compression, format conversion (WebP/JPEG/GIF), output directory, and statistical report features.
  • Standalone BlogImageOptimizer tool with support for batch compression and Docker deployment.
  • Developed a DataProc tool specifically for data processing, supporting functions like access log processing, image compression, and AI-assisted content creation.

Homepage Redesign

As the face of the website, the importance of the homepage is self-evident.

The previous homepage now looks a bit simplistic.

This time, I've restructured the HERO section. The background features a gradient color animation, with some introductions added to the left side and random album images displayed on the right.

The button was intended to replicate the liquid glass effect of iOS 26, but it was too complicated, so I only managed to create a low-budget version, haha 🤣.

image-20250819162023561

The images below have also been enhanced with loading animations, greatly improving the user experience!

PS: Previously, without loading animations, the space would be empty if the image hadn't loaded, causing the page to flicker.

image-20250819162234359

After loading, it looks like this.

image-20250819162246260

Similarly, I've added image loading animations to the article list as well, but I won't take a screenshot for that.

Related article recommendations have been added at the bottom of the article.

This is a method to increase internal links (内链) and is very useful for improving SEO performance.

It can also increase the user's reading time.

image-20250819162513360

SEO

In terms of SEO, I'm also a beginner.

StarBlog was essentially a blank slate in this area before.

The things I did this time are as follows:

  • Introduced structured data, dynamic metadata, and image SEO optimization.
  • Unified the Sitemap service (supporting main/image/index).
  • Added a new SEO test page and optimized robots.txt.

Here's a screenshot of the new SEO test page:

image-20250819163428039

I also added these test pages:

The Meta Tag Test will randomly open an article and display the meta tag descriptions, keywords, and so on.

image-20250819163519489

Sitemap Test:

image-20250819163454427

Summary

The specific code will not be provided here.

This article only introduces the new features added this time.

Depending on my mood, I might introduce the specific implementation details later 😄

Release Notes

Finally, the detailed release notes.

Since probably not many people will read it, it's placed at the end.

✨ Features

  • Image Optimization and Compression: Added multi-mode image compression configuration with intelligent selection, supporting different modes for article images, thumbnails, and featured images; introduced format conversion to automatically select the optimal output format (WebP/JPEG), with support for GIF compression and optimization.
  • Image Optimization Tools: Introduced the BlogImageOptimizer tool, enabling batch compression, format conversion, and Docker-based deployment.
  • Enhanced Image Optimization: Added output directory configuration, compression statistics, and reporting features, providing detailed processing progress, success rates, and space-saving analysis.
  • SEO Functionality: Added structured data, image SEO optimization, dynamic metadata generation, and a unified Sitemap service (supporting main, image, and index sitemaps), along with an SEO test page and an optimized 404 page.
  • Articles & Recommendations: Changed the related articles recommendation logic to random sorting to improve diversity in suggestions.
  • Interface & Interaction:
    • Added Hero section styling and animation effects for the homepage.
    • Optimized article card layouts and image components, adding responsive support.
    • Enhanced photo card functionality with gradient masks, title display, and accessibility improvements.
    • Updated navigation bar text to Chinese and added an SEO test entry.
  • Middleware & Caching: Added a static file debugging middleware and optimized caching strategies (caching disabled in development, short-term caching in production).
  • Data Processing: Added a FakeIpSearcher implementation supporting simulated IP lookups.

🐞 Bug Fixes

  • Fixed null reference error in SeoTestController when retrieving random articles.
  • Fixed synchronous blocking in SeoTestController queries by switching to asynchronous queries to improve performance.
  • Disallowed crawling of the /seo-test path in robots.txt.
  • Fixed exception caused by missing path during PicLibService initialization.

♻️ Refactor

  • Frontend Optimization: Unified frontend resource loading, switched to production versions of Vue.js and editormd, and cleaned up redundant code and formatting.
  • Project Structure: Moved the main project into src and tools directories, with BlogImageOptimizer modularized as a standalone tool.
  • Redundancy Removal: Removed data collection, image library, Rin logging system, and related dependencies.
  • View Optimization: Improved homepage layout, recommendation section sorting and styling; removed unused thumbnail and namespace code.
  • Service Optimization: Added logging and file checking logic to the sensitive word filtering service.

📦 Dependencies

  • Upgrade the overall project to .NET 9.0, updating dependency packages such as Markdig, MailKit, and X.PagedList.EF.
  • Update the Serilog file logging component to 6.0.0.
  • Remove the unused highlight.js dependency.
  • Add SixLabors.ImageSharp and Markdig dependencies to support image processing and Markdown enhancement.

📄 Docs

  • README updates:
    • Added gulp min command description, supplementing the complete build process.
    • Added v1.0.0 version code description and technology stack optimization description.
    • Added a disclaimer for the sensitive word library (敏感词库), clarifying it is for study and research purposes only.

🔧 Others

  • Performance Optimization:
    • Added compression level configuration for Brotli and Gzip to improve compression efficiency.
    • Optimized the concurrency logic for image compression, leveraging parallelism and thread-safe collections (线程安全集合) to enhance performance.
  • Style Optimization: Improved the background and border effects of photo cards for a more unified visual experience.
  • Build Optimization: Updated .dockerignore rules to exclude files unrelated to the development environment.

_EOF_

StarBlog v1.3.0 New Version, a Wave of Updates and Server Migration Deployment

本文作者:
程序设计实验室
版权声明:
本博客所有文章除特别声明外,均采用 BY-NC-SA 许可协议。转载请注明出处!

相关文章

StarBlog 番外篇 (1) 全新的访问统计功能,异步队列,分库存储

虽然现在工作重心以AI为主了,不过相比起各种大模型的宏大叙事,我还是更喜欢自己构思功能、写代码,享受解决问题和发布上线的过程。 之前 StarBlog 系列更新的时候我也有提到,随着功能更新,会在教程系列完结之后继续写番外,这不第一篇番外就来了。 这次是全新设计的访问统计功能。

2025-03-25 · StarBlog番外 · 约 1 分钟

StarBlog 番外篇 (2) 深入解析Markdig源码,优化ToC标题提取和文章目录树生成逻辑

本文介绍了作者在开发博客发布工具时,针对Markdown目录生成逻辑的改进。作者深入研究了Markdig源码,优化了目录生成逻辑,使用AutoIdentifiers扩展自动生成标题ID,提高了代码的可维护性和准确性。文章详细解析了Markdig的heading处理部分和ID生成机制,并提供了解决ID冲突的方法。最终,作者实现了与Markdig一致的ToC提取功能。

2025-03-25 · StarBlog番外 · 约 1 分钟

讨论

共 0 条

良言一句三冬暖,恶语伤人六月寒。

加载评论中…