向您介绍 PaperWeave 主题

一款 Astro 主题,基于 Retypeset 进行二次修改,增加搜索、说说、统计等功能
3 min

界面预览

主页 homepage.png 随心说 casual.png 统计 stats.png 支持页面自由启用/禁用(ToDo)

介绍

基于 Retypeset 主题深度定制。为喜欢记录生活的博主增加了动态内容流和丰富的数据展示功能。

由于在魔改期间未及时进行记录,如果你喜欢的话可以直接fork我的仓库

如果能点个 🌟Star 的话就更好啦😊谢谢你

Github地址

点此访问

温馨提示

仓库内文章为本人版权所有,请fork后及时删除

Readme中部分亮点


Modifications

  • Casual Page (/casual): Fetches and displays real-time content from a public Telegram Channel.
  • Statistics Page (/stats): A dashboard featuring:
    • Timeline: Chronological archive of all posts.
    • Word Count: Total articles and words (CJK supported).
    • Top Tags: Most frequently used tags.
    • Typewriter Effect: Displays random quotes from your articles (tagged with #好词好句).
  • Search: Full-text search powered by Algolia DocSearch (free for open-source/technical blogs).

Algolia DocSearch Setup

To enable search functionality, follow these steps:

1. Apply for DocSearch

  1. Go to Algolia DocSearch and apply for free access.
  2. You’ll receive an email with your credentials once approved (usually within 24-48 hours).

2. Configure your credentials

Open src/config.ts and add your Algolia credentials in the search section:

search: {
  algolia: {
    enabled: true, // Set to true to enable search
    appId: 'YOUR_APP_ID', // Your Algolia Application ID
    apiKey: 'YOUR_SEARCH_API_KEY', // Your Search-Only API Key (NOT Admin API Key)
    indexName: 'YOUR_INDEX_NAME', // Your Algolia Index Name
  },
},

3. Alternative: Create your own Algolia index

If you don’t want to wait for DocSearch approval, you can create your own Algolia account:

  1. Sign up at Algolia
  2. Create a new application and index
  3. Use the Algolia Crawler or algolia-docsearch-scraper to index your site
  4. Use your credentials in src/config.ts

Note: The Search-Only API Key is safe to expose in client-side code. Never use your Admin API Key!

  • Post Copyright: Automatically appends copyright information and license to the end of every post.
  • Deployment Ready: Pre-configured with @astrojs/vercel for easy deployment.

Typewriter Effect

The Statistics page (/stats) features a typewriter effect that displays a random sentence from your blog posts.

  • How it works: It automatically extracts sentences from any post tagged with 好词好句
  • Default: If no posts have this tag, it will display a default inspirational quote.
  • Customization: Simply add the tag 好词好句 to any Markdown post frontmatter to include its content in the quote pool.

To-Do

  • 友链页 ✅ 2025-12-19
  • 个人CV 计划取消
  • 页面自由显示/隐藏 ✅ 2025-12-19
  • 修复打字机卡顿效果 ✅ 2025-12-19
  • 后台功能添加 ✅ 2025-12-19
  • Elog 支持
  • 语言适配 ✅ 2025-12-19
  • i18n修改 ✅ 2025-12-19
  • 站点分流
向您介绍 PaperWeave 主题
版权声明: 本博客所有文章除特别声明外,均采用 CC BY-NC-SA 4.0 许可协议。转载请注明出处!