惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

博客园 - Franky
N
Netflix TechBlog - Medium
Google Online Security Blog
Google Online Security Blog
月光博客
月光博客
量子位
酷 壳 – CoolShell
酷 壳 – CoolShell
V
V2EX
腾讯CDC
OSCHINA 社区最新新闻
OSCHINA 社区最新新闻
博客园 - 聂微东
让小产品的独立变现更简单 - ezindie.com
让小产品的独立变现更简单 - ezindie.com
M
MIT News - Artificial intelligence
Vercel News
Vercel News
The GitHub Blog
The GitHub Blog
Hugging Face - Blog
Hugging Face - Blog
博客园 - 【当耐特】
Apple Machine Learning Research
Apple Machine Learning Research
aimingoo的专栏
aimingoo的专栏
博客园 - 三生石上(FineUI控件)
CTFtime.org: upcoming CTF events
CTFtime.org: upcoming CTF events
MongoDB | Blog
MongoDB | Blog
H
Help Net Security
The Cloudflare Blog
Blog — PlanetScale
Blog — PlanetScale
F
Full Disclosure
G
Google Developers Blog
罗磊的独立博客
Jina AI
Jina AI
钛媒体:引领未来商业与生活新知
钛媒体:引领未来商业与生活新知
Y
Y Combinator Blog
H
Hackread – Cybersecurity News, Data Breaches, AI and More
J
Java Code Geeks
A
About on SuperTechFans
IT之家
IT之家
大猫的无限游戏
大猫的无限游戏
S
SegmentFault 最新的问题
有赞技术团队
有赞技术团队
GbyAI
GbyAI
雷峰网
雷峰网
T
The Blog of Author Tim Ferriss
The Register - Security
The Register - Security
U
Unit 42
D
Docker
Martin Fowler
Martin Fowler
L
LINUX DO - 热门话题
NISL@THU
NISL@THU
阮一峰的网络日志
阮一峰的网络日志
C
Cybersecurity and Infrastructure Security Agency CISA
博客园_首页
Google DeepMind News
Google DeepMind News

AstroPaper

AstroPaper 6.0 | AstroPaper How to add LaTeX Equations in Astro blog posts | AstroPaper How to integrate Giscus comments into AstroPaper | AstroPaper AstroPaper 4.0 | AstroPaper How to use Git Hooks to set Created and Modified Dates | AstroPaper AstroPaper 3.0 | AstroPaper How to update dependencies of AstroPaper | AstroPaper AstroPaper 2.0 | AstroPaper Dynamic OG image generation in AstroPaper blog posts | AstroPaper Predefined color schemes | AstroPaper Customizing AstroPaper theme color schemes | AstroPaper Adding new posts in AstroPaper theme | AstroPaper How to configure AstroPaper theme | AstroPaper Tailwind Typography Plugin | AstroPaper How Do I Develop My Terminal Portfolio Website with React | AstroPaper How Do I Develop My Portfolio Website & Blog | AstroPaper
AstroPaper 5.0 | AstroPaper
Sat Naing · 2025-03-08 · via AstroPaper

At last, the long-awaited AstroPaper v5 is finally here. AstroPaper v5 keeps the same minimal & clean look, but comes with significant updates under the hood.

AstroPaper v5

Table of contents

Open Table of contents
  • Major Changes
    • Upgrade to Astro v5 #455
    • Tailwind v4
    • Remove React + Fuse.js in favor of Pagefind search
    • Updated import alias
    • Move to pnpm
    • Replace icons/svg with Astro’s Svg Component
    • Separate Constants and Config
  • Other notable changes
  • Outtro

Major Changes

Upgrade to Astro v5 #455

AstroPaper now comes with Astro v5, bringing all the new features and improvements that come with it.

Tailwind v4

AstroPaper has been upgraded to Tailwind v4, which includes many style changes under the hood. The tailwind.config.js file has been removed, and now all the configuration is located within the src/styles/global.css file. Typography-related styles have been extracted and moved to src/styles/typography.css.

Due to the new behavior in TailwindCSS v4, styles inside <style> blocks within components have been removed and replaced with inline Tailwind classes.

Additionally, the color palette across the UI has been updated. The new palette now consists of only five colors:

:root,
html[data-theme="light"] {
  --background: #fdfdfd;
  --foreground: #282728;
  --accent: #006cac;
  --muted: #e6e6e6;
  --border: #ece9e9;
}

html[data-theme="dark"] {
  --background: #212737;
  --foreground: #eaedf3;
  --accent: #ff6b01;
  --muted: #343f60bf;
  --border: #ab4b08;
}

In previous versions, React.js and Fuse.js were used for search functionality and OG image generation. In AstroPaper v5, React.js has been removed and replaced with Pagefind, a static site search tool.

The search experience is almost identical to previous versions, but now all contents, not just titles and descriptions, are indexed and searchable, thanks to Pagefind.

The idea of using Pagefind in dev mode was inspired by this blog post.

Updated import alias

The import alias has been updated from @directory to @/directory, which means you now have to import like this:

---
import { slugifyStr } from "@/utils/slugify";
import IconHash from "@/assets/icons/IconHash.svg";
---

Move to pnpm

AstroPaper has switched from npm to pnpm, which offers faster and more efficient package management.

Replace icons/svg with Astro’s Svg Component

AstroPaper v5 replaces inline SVGs with Astro’s experimental SVG Component. This update reduces the need for predefined SVG code in the socialIcons object, making the codebase cleaner and more maintainable.

Separate Constants and Config

The project structure has been reorganized. The src/config.ts file now only contains the SITE object, which holds the main configuration for the project. All constants, such as LOCALE, SOCIALS, and SHARE_LINKS, have been moved to the src/constants.ts file.

Other notable changes

  • The blog posts directory has been updated from src/content/blog/ to src/data/blog/.
  • Collection definitions file (src/content/config.ts) is now replaced with src/content.config.ts.
  • Various dependencies have been upgraded for improved performance and security.
  • Removed IBM Plex Mono font and switched to the default system mono font.
  • The Go back button logic has been updated. Now, instead of triggering the browser’s history API, AstroPaper v5 uses the browser session to temporarily store the back URL. If no back URL exists in the session, it will redirect to the homepage.
  • There are some minor styles and layout changes as well.

Outtro

AstroPaper v5 brings many changes, but the core experience remains the same. Enjoy a smoother, more efficient blogging platform while keeping the clean and minimal design that AstroPaper is known for!

Feel free to explore the changes and share your thoughts. As always, thank you for your support!

If you enjoy this theme, please consider starring the repo. You can also support me via GitHub Sponsors or you can buy me a coffee if you’d like. However, of course, these actions are entirely optional and not required.

Enjoy!

Sat Naing