feat(media): hidden 标签过滤与指南 public/media 约定(T5 补)

- 首页/归档/RSS(zh+en)集合查询统一 draft+hidden 双过滤——样张
  永久保留为可访问不列出的活样例(回归测试资产)
- 写作指南视音频段更正:raw HTML 相对路径不走资产管线(实测),
  媒体放 public/media/{slug}/ 用绝对 /media/ 引用,与仓外 store
  同命名空间

验证: pnpm astro build exit 0(hidden 过滤后样张退出列表与 RSS)

Spec: 2026-10-25_add-media-and-polish

Co-authored-by: GLM-5.3
This commit is contained in:
wait4xandGLM-5.3 committed 2026-10-25 11:50:53 +08:00
1 parent dcc20e9fb3
commit 71a799bd97
9 files changed
+82 -18

No files matched your search

+1 -1
View File
@@ -7,7 +7,7 @@ import { trackOf } from '../../content.config';
// URL = /archives/{slug},slug 即文件名,与 Halo 旧结构 1:1(不可改)
export async function getStaticPaths() {
const posts = (await getCollection('posts', ({ data }) => !data.draft)).sort(
const posts = (await getCollection('posts', ({ data }) => !data.draft && !data.tags.includes('hidden'))).sort(
(a, b) => b.data.pubDate.getTime() - a.data.pubDate.getTime(),
);
return posts.map((entry, i) => ({
+1 -1
View File
@@ -4,7 +4,7 @@ import { getCollection } from 'astro:content';
import BaseLayout from '../../layouts/BaseLayout.astro';
import PostList from '../../components/PostList.astro';
const posts = (await getCollection('posts', ({ data }) => !data.draft)).sort(
const posts = (await getCollection('posts', ({ data }) => !data.draft && !data.tags.includes('hidden'))).sort(
(a, b) => b.data.pubDate.getTime() - a.data.pubDate.getTime(),
);
---