import { defineCollection, reference } from 'astro:content'
import { glob } from 'astro/loaders'
import { z } from 'astro/zod'
const blog = defineCollection({
loader: glob({
base: './src/content/blog',
pattern: '**/*.{md,mdx}',
}),
schema: z.object({
title: z.string(),
description: z.string(),
publishedAt: z.coerce.date(),
updatedAt: z.coerce.date().optional(),
category: z.string(),
tags: z.array(z.string()).default([]),
project: reference('projects').optional(),
draft: z.boolean().default(false),
}),
})
节选自 Aster 已有的 Blog 集合。完整的 src/content.config.ts 还定义了 Projects;保留这两个集合及其文件路径。
亲自走一遍 Astro CMS 流程。
连接你自己的 Aster 仓库,确认识别出的集合,编辑文章,再审阅文件并发布。
Prosefly/仓库连接
连接仓库
选择已授权给 Prosefly 的 GitHub 仓库。
GitHub App 授权
1.连接 GitHub 账户
连接 GitHub 账号,让 Prosefly 确认你有权访问仓库。
2.授权 GitHub 仓库
请先连接 GitHub 账号,再选择要授权给 Prosefly 的仓库。
没有找到可连接的仓库
先安装 Prosefly GitHub App,再返回选择仓库。
3. 选择仓库
选择要连接到这个组织的仓库。
没有找到匹配的仓库
下一步:扫描各个仓库,确认其中的内容空间。
prosefly/astro-template-aster
目标分支: main
只读取仓库内容,不会修改 Git 文件。
确认内容空间
只读取仓库内容,不会修改 Git 文件。
.AstroProsefly
BlogProseflyMD / MDX
src/content/blog
属性来自内容 schema · src/content.config.ts
属性(8)
title必填
string
description必填
string
publishedAt必填
date
updatedAt
date
category必填
string
tags
string[]
project
Reference → projects
draft
boolean
ProjectsProseflyMD / MDX
src/content/projects
属性来自内容 schema · src/content.config.ts
属性(10)
title必填
string
description必填
string
year必填
number
status必填
enum
tags
string[]
website
string (url)
repository
string (url)
featured
boolean
order
number
draft
boolean
astro-template-aster
查看此空间所有内容集合中的内容和草稿。
prosefly/astro-template-astermain.
内容
内容集合
状态
最近更新
操作
Astro Theme Lotuslotus.mdx
Projects
已同步
刚刚
Astro Theme Dahliadahlia.mdx
Projects
已同步
刚刚
Astro OpenAPIastro-openapi.mdx
Projects
已同步
刚刚
Astro Componentsastro-components.mdx
Projects
已同步
刚刚
Asteraster.mdx
Projects
有草稿
刚刚
Treating OpenAPI as Astro Contentopenapi-as-astro-content.mdx
Blog
已同步
刚刚
One Component Layer, Two Astro Themesone-component-layer-two-themes.mdx
Blog
有草稿
刚刚
Defaults With an Exitdefaults-with-an-exit.mdx
Blog
已同步
刚刚
没有匹配的内容
---
title: Defaults With an Exit
description: Good theme defaults shorten the first week without limiting what the site can become.
publishedAt: 2026-08-14
category: Design
tags:
- Documentation
- Design systems
- Theming
project: aster
---
import { Callout, Card, CardGrid, Steps } from '@prosefly/astro-components';
A documentation theme earns its place by resolving repetitive work: page structure, navigation, search, readable prose, responsive behavior, and accessible interaction states. A new project should feel coherent before it has a custom design system.
The same theme becomes a liability when those early decisions harden into permanent constraints. Real products eventually need their own type, color, density, navigation, and component behavior. The question is not whether a theme has opinions. It is whether the product can outgrow them without rewriting its content.
## Start complete
Defaults are most useful when they form a system rather than a collection of placeholders.
<CardGrid>
<Card title="A readable page">
Type scale, line length, heading rhythm, code treatment, and focus states should work together on day one.
</Card>
<Card title="A navigable site">
Desktop and mobile navigation, search, current-page state, and table of contents should already agree about the information architecture.
</Card>
<Card title="A responsive shell">
The theme should decide how those parts collapse before every project invents a different set of breakpoints.
</Card>
</CardGrid>
An incomplete default shifts design work back to the adopter while still asking them to learn the theme's abstractions. A considered default lets the team begin with content and discover which parts actually need to become distinctive.
## Put exits at meaningful layers
Not every CSS value needs a configuration option. Useful escape routes correspond to decisions a product team can name.
<Steps>
1. **Tokens change the visual language.**
Accent, neutrals, fonts, radius, spacing roles, and status colors establish identity without changing component structure.
2. **Configuration changes product behavior.**
Navigation, search, locale, social links, and page metadata belong to the site rather than the theme's source code.
3. **Component overrides change composition.**
When the product genuinely needs different navigation or footer behavior, a documented component boundary is clearer than a growing collection of selectors.
4. **Content ownership makes replacement possible.**
Markdown, MDX, and Astro collections remain useful even if the shell is eventually replaced.
</Steps>
<Callout type="tip" title="A useful test">
Can a team begin with the theme, grow into its own visual system, and keep the same content throughout the transition?
</Callout>
## Avoid the other extreme
An exit does not mean exposing every internal variable. A configuration surface with hundreds of unrelated values is another kind of lock-in: adopters must understand the implementation before they can make a safe change.
Semantic choices are more durable. “Accent color” expresses intent; “third link hover border” describes an accident of the current markup. A small set of roles can be applied consistently and survive component refactors.
The same rule applies to overrides. Replacing a search control is a meaningful boundary. Overriding the wrapper around every icon usually means the underlying component contract is missing the right token or prop.
## The exit makes the default more trustworthy
Aster exposes centralized configuration, semantic color tokens, shared content components, and content that stays in ordinary Astro collections. Most projects will not replace every default. That is precisely why the boundaries matter: authors can begin with the complete template without betting that their needs will never change.
A strong default should feel like a useful starting point, not a decision the project is afraid to revisit.
---
title: Defaults With an Exit
description: Good theme defaults shorten the first week without limiting what the site can become.
publishedAt: 2026-08-14
category: Design
tags:
- Documentation
- Design systems
- Theming
project: aster
---
import { Callout, Card, CardGrid, Steps } from '@prosefly/astro-components';
A documentation theme earns its place by resolving repetitive work: page structure, navigation, search, readable prose, responsive behavior, and accessible interaction states. A new project should feel coherent before it has a custom design system.
The same theme becomes a liability when those early decisions harden into permanent constraints. Real products eventually need their own type, color, density, navigation, and component behavior. The question is not whether a theme has opinions. It is whether the product can outgrow them without rewriting its content.
## Start complete
Defaults are most useful when they form a system rather than a collection of placeholders.
<CardGrid>
<Card title="A readable page">
Type scale, line length, heading rhythm, code treatment, and focus states should work together on day one.
</Card>
<Card title="A navigable site">
Desktop and mobile navigation, search, current-page state, and table of contents should already agree about the information architecture.
</Card>
<Card title="A responsive shell">
The theme should decide how those parts collapse before every project invents a different set of breakpoints.
</Card>
</CardGrid>
An incomplete default shifts design work back to the adopter while still asking them to learn the theme's abstractions. A considered default lets the team begin with content and discover which parts actually need to become distinctive.
## Put exits at meaningful layers
Not every CSS value needs a configuration option. Useful escape routes correspond to decisions a product team can name.
<Steps>
1. **Tokens change the visual language.**
Accent, neutrals, fonts, radius, spacing roles, and status colors establish identity without changing component structure.
2. **Configuration changes product behavior.**
Navigation, search, locale, social links, and page metadata belong to the site rather than the theme's source code.
3. **Component overrides change composition.**
When the product genuinely needs different navigation or footer behavior, a documented component boundary is clearer than a growing collection of selectors.
4. **Content ownership makes replacement possible.**
Markdown, MDX, and Astro collections remain useful even if the shell is eventually replaced.
</Steps>
<Callout type="tip" title="A useful test">
Can a team begin with the theme, grow into its own visual system, and keep the same content throughout the transition?
</Callout>
## Avoid the other extreme
An exit does not mean exposing every internal variable. A configuration surface with hundreds of unrelated values is another kind of lock-in: adopters must understand the implementation before they can make a safe change.
Semantic choices are more durable. “Accent color” expresses intent; “third link hover border” describes an accident of the current markup. A small set of roles can be applied consistently and survive component refactors.
The same rule applies to overrides. Replacing a search control is a meaningful boundary. Overriding the wrapper around every icon usually means the underlying component contract is missing the right token or prop.
## The exit makes the default more trustworthy
Aster exposes centralized configuration, semantic color tokens, shared content components, and content that stays in ordinary Astro collections. Most projects will not replace every default. That is precisely why the boundaries matter: authors can begin with the complete template without betting that their needs will never change.
A strong default should feel like a useful starting point, not a decision the project is afraid to revisit.
defaults-with-an-exit.mdxProsefly / astro-template-aster / Blog