@hutusi/amytis 1.9.0 → 1.10.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (85) hide show
  1. package/.entire/settings.json +4 -0
  2. package/CHANGELOG.md +24 -0
  3. package/CLAUDE.md +15 -1
  4. package/README.md +59 -56
  5. package/README.zh.md +172 -0
  6. package/content/books/sample-book/images/digital-garden.svg +25 -0
  7. package/content/books/sample-book/index.mdx +1 -1
  8. package/content/books/sample-book/introduction.mdx +2 -0
  9. package/content/posts/legacy-markdown.md +0 -2
  10. package/content/posts/markdown-features.mdx +1 -1
  11. package/content/posts/multilingual-test.mdx +0 -1
  12. package/content/posts/syntax-highlighting-showcase.mdx +1 -0
  13. package/content/posts/understanding-react-hooks.mdx +1 -0
  14. package/content/series/ai-nexus-weekly/index.mdx +1 -1
  15. package/content/series/digital-garden/01-philosophy.mdx +2 -0
  16. package/content/series/digital-garden/index.mdx +1 -1
  17. package/content/series/markdown-showcase/index.mdx +1 -1
  18. package/content/series/markdown-showcase/syntax-highlighting.mdx +2 -0
  19. package/content/series/nextjs-deep-dive/01-getting-started.mdx +2 -1
  20. package/content/series/nextjs-deep-dive/index.mdx +1 -1
  21. package/content/subscribe.mdx +27 -0
  22. package/docs/ARCHITECTURE.md +85 -105
  23. package/docs/CONTRIBUTING.md +9 -3
  24. package/docs/DIGITAL_GARDEN.md +5 -9
  25. package/docs/deployment.md +31 -13
  26. package/package.json +2 -1
  27. package/public/images/antelope-canyon.jpg +0 -0
  28. package/public/images/avatar.jpg +0 -0
  29. package/public/images/cappadocia.jpg +0 -0
  30. package/public/images/flowers.jpg +0 -0
  31. package/public/images/galaxy.jpg +0 -0
  32. package/public/images/lake.jpg +0 -0
  33. package/public/images/mountains.jpg +0 -0
  34. package/public/images/vibrant-waves.avif +0 -0
  35. package/public/images/wechat-qr.jpg +0 -0
  36. package/scripts/deploy.ts +77 -0
  37. package/site.config.example.ts +257 -0
  38. package/site.config.ts +67 -9
  39. package/src/app/[slug]/[postSlug]/page.tsx +148 -0
  40. package/src/app/[slug]/page/[page]/page.tsx +202 -0
  41. package/src/app/[slug]/page.tsx +162 -7
  42. package/src/app/archive/page.tsx +2 -1
  43. package/src/app/books/[slug]/[chapter]/page.tsx +9 -2
  44. package/src/app/feed.xml/route.ts +2 -1
  45. package/src/app/flows/[year]/[month]/[day]/page.tsx +1 -1
  46. package/src/app/globals.css +6 -1
  47. package/src/app/layout.tsx +12 -1
  48. package/src/app/notes/[slug]/page.tsx +1 -1
  49. package/src/app/page.tsx +71 -5
  50. package/src/app/posts/[slug]/page.tsx +2 -0
  51. package/src/app/posts/page/[page]/page.tsx +5 -3
  52. package/src/app/posts/page.tsx +5 -2
  53. package/src/app/sitemap.ts +2 -1
  54. package/src/components/AuthorCard.tsx +46 -14
  55. package/src/components/Comments.tsx +4 -3
  56. package/src/components/CoverImage.tsx +11 -3
  57. package/src/components/CuratedSeriesSection.tsx +7 -6
  58. package/src/components/FeaturedStoriesSection.tsx +119 -53
  59. package/src/components/Hero.tsx +44 -92
  60. package/src/components/LanguageProvider.tsx +7 -2
  61. package/src/components/LanguageSwitch.tsx +1 -1
  62. package/src/components/LatestWritingSection.tsx +12 -22
  63. package/src/components/MarkdownRenderer.tsx +12 -4
  64. package/src/components/Navbar.tsx +24 -15
  65. package/src/components/PostCard.tsx +2 -1
  66. package/src/components/PostList.tsx +12 -9
  67. package/src/components/PostNavigation.tsx +3 -2
  68. package/src/components/PostSidebar.tsx +2 -1
  69. package/src/components/RecentNotesSection.tsx +1 -1
  70. package/src/components/RelatedPosts.tsx +2 -1
  71. package/src/components/RssFeedWidget.tsx +36 -0
  72. package/src/components/SelectedBooksSection.tsx +11 -15
  73. package/src/components/SeriesCatalog.tsx +2 -1
  74. package/src/components/SeriesList.tsx +4 -3
  75. package/src/components/SeriesSidebar.tsx +2 -1
  76. package/src/layouts/PostLayout.tsx +31 -20
  77. package/src/layouts/SimpleLayout.tsx +3 -3
  78. package/src/lib/image-utils.ts +12 -0
  79. package/src/lib/markdown.ts +24 -3
  80. package/src/lib/rehype-image-metadata.test.ts +118 -0
  81. package/src/lib/rehype-image-metadata.ts +11 -5
  82. package/src/lib/urls.ts +36 -0
  83. package/tests/unit/static-params.test.ts +24 -0
  84. package/src/app/subscribe/page.tsx +0 -17
  85. package/src/components/SubscribePage.tsx +0 -298
@@ -0,0 +1,4 @@
1
+ {
2
+ "enabled": true,
3
+ "telemetry": false
4
+ }
package/CHANGELOG.md CHANGED
@@ -5,6 +5,30 @@ All notable changes to this project will be documented in this file.
5
5
  The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
6
6
  and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
7
7
 
8
+ ## [1.10.0] - 2026-03-02
9
+
10
+ ### Added
11
+ - **Configurable URL Topology**: Added support for `posts.basePath` and `series.customPaths` so posts and series can be served under custom prefixes.
12
+ - **Single-Language Mode**: Added `i18n.enabled` to disable multilingual routing/UI when running a single-locale site.
13
+ - **Homepage Content Controls**: Added pinned-post support and optional post subtitles for improved featured and latest sections.
14
+ - **Author Profile Expansion**: Added configurable default authors plus optional author avatar/social images and header/card visibility toggles.
15
+ - **Publishing Controls**: Added `posts.excludeFromListing` to keep selected series posts out of the main `/posts` feed.
16
+ - **Deployment & Media**: Added one-command Linux/nginx deploy script and `images.cdnBaseUrl` support for serving images from a CDN.
17
+ - **Branding Controls**: Added configurable logo and favicon paths in `site.config.ts`.
18
+
19
+ ### Changed
20
+ - **Homepage Design System**: Refined homepage layout and card hierarchy across hero, featured content, latest writing, and series sections.
21
+ - **Subscribe Surface**: Moved `/subscribe` to content-driven authoring so users can fully edit subscription copy in Markdown/MDX.
22
+ - **Documentation**: Updated architecture, deployment, and configuration guides to reflect current routing and feature behavior.
23
+
24
+ ### Fixed
25
+ - **Static Export Stability**: Fixed `output: "export"` edge cases by returning placeholder params for empty/disabled dynamic routes.
26
+ - **Dynamic Routing Conflicts**: Resolved route naming and generation conflicts for custom prefixes and static params.
27
+ - **Navigation Consistency**: Fixed mismatch between navigation post URL and configured posts base path.
28
+ - **Book Route Safety**: Prevented invalid book chapter params by validating chapter existence before route generation.
29
+ - **Image Handling**: Fixed markdown image path resolution across content types and ensured CDN prefixing is applied consistently.
30
+ - **Rendering & Type Safety**: Fixed TypeScript handling for custom `rss-feed` element and addressed dev-time WebP 404 behavior.
31
+
8
32
  ## [1.9.0] - 2026-02-28
9
33
 
10
34
  ### Added
package/CLAUDE.md CHANGED
@@ -25,6 +25,9 @@ bun run build # Full production build (copies assets, builds Next.j
25
25
  bun run build:dev # Development build (no image optimization, faster) — also regenerates Pagefind search index in public/pagefind/
26
26
  bun run clean # Remove .next, out, public/posts directories
27
27
 
28
+ # Deploy
29
+ bun run deploy # Deploy out/ to Linux/nginx server via rsync+sshpass (reads .env.local)
30
+
28
31
  # Content creation
29
32
  bun run new "Post Title" # Create new post
30
33
  bun run new-series "Series Name" # Create new series
@@ -49,6 +52,7 @@ bun run sync-book <slug> # Sync chapters list for one book
49
52
 
50
53
  - `site.config.ts` - Site configuration (nav, social, pagination, themes, i18n, analytics, comments)
51
54
  - `src/lib/markdown.ts` - Data access layer with all content query functions
55
+ - `src/lib/urls.ts` - Central URL helpers (`getPostUrl`, `getPostsBasePath`, `getSeriesCustomPaths`, etc.) — always use these instead of hardcoding `/posts/[slug]`
52
56
  - `src/lib/search-utils.ts` - Pure search utilities (URL type detection, date extraction, title cleaning, markdown stripping) shared by `Search` and the search index route
53
57
  - `src/app/globals.css` - Theme CSS variables and color palettes
54
58
  - `src/components/MarkdownRenderer.tsx` - MDX rendering with all plugins
@@ -74,7 +78,9 @@ bun run sync-book <slug> # Sync chapters list for one book
74
78
  - `/flows/[year]` - Flows filtered by year
75
79
  - `/flows/[year]/[month]` - Flows filtered by month
76
80
  - `/flows/[year]/[month]/[day]` - Single flow detail page
77
- - `/[slug]` - Static pages (about, etc.)
81
+ - `/[slug]` - Static pages (about, subscribe, etc.) and custom posts/series listing pages
82
+ - `/[prefix]/[slug]` - Posts at custom URL prefixes (e.g. `/articles/my-post`, `/weeklies/my-post`)
83
+ - `/[prefix]/page/[page]` - Paginated listing at custom URL prefixes
78
84
 
79
85
  ### Content Structure
80
86
 
@@ -96,6 +102,7 @@ Key configuration options:
96
102
  - `nav` - Navigation links with weights
97
103
  - `social` - GitHub, Twitter, email links for footer
98
104
  - `series.navbar` - Series slugs to show in navbar dropdown
105
+ - `series.customPaths` - Per-series custom URL prefix e.g. `{ 'weeklies': 'weeklies' }` → posts at `/weeklies/[slug]`
99
106
  - `pagination.posts`, `pagination.series` - Items per page
100
107
  - `themeColor` - 'default' | 'blue' | 'rose' | 'amber'
101
108
  - `hero` - Homepage hero title and subtitle
@@ -104,6 +111,12 @@ Key configuration options:
104
111
  - `featured.stories` - Scrollable stories: `scrollThreshold` (default: 1), `maxItems` (default: 5)
105
112
  - `analytics.provider` - 'umami' | 'plausible' | 'google' | null
106
113
  - `comments.provider` - 'giscus' | 'disqus' | null
114
+ - `posts.basePath` - Custom URL prefix for all posts (default: `'posts'`); e.g. `'articles'` → posts at `/articles/[slug]`
115
+ - `posts.authors.default` - Fallback authors when a post has none set in frontmatter
116
+ - `posts.authors.showInHeader` - Show author byline below post title (default: true)
117
+ - `posts.authors.showAuthorCard` - Show author card at end of post (default: true)
118
+ - `posts.excludeFromListing` - Series slugs whose posts are hidden from `/posts` listing pages
119
+ - `authors` - Per-author profiles: `bio`, `avatar` (image path), `social` (array of `{ image, description }`)
107
120
 
108
121
  ## Content Frontmatter
109
122
 
@@ -120,6 +133,7 @@ authors: ["Author Name"]
120
133
  series: "series-slug" # Link to a series
121
134
  draft: true # Hidden in production
122
135
  featured: true # Show in featured section
136
+ pinned: true # Always shown in featured section; never shuffled away (hero = most recent pinned)
123
137
  coverImage: "./images/cover.jpg" # Local or external URL
124
138
  latex: true # Enable KaTeX math
125
139
  toc: false # Hide table of contents
package/README.md CHANGED
@@ -1,11 +1,24 @@
1
1
  # Amytis
2
2
 
3
- **Amytis** is a high-performance, elegant digital garden built with Next.js 16, React 19, and Tailwind CSS v4. It is designed for cultivating thoughts, sharing knowledge, and growing ideas with a focus on typography and readability.
3
+ [English](README.md) | [简体中文](README.zh.md)
4
+
5
+ **Amytis** is an elegant, open-source framework for building a personal digital garden: a living knowledge space where ideas grow from raw notes to refined writing. It is built with Next.js 16, React 19, and Tailwind CSS v4, with a strong focus on readability, structure, and long-term content ownership.
4
6
 
5
7
  [**Live Demo**](https://amytis.vercel.app/)
6
8
 
7
9
  ![Amytis Screenshot](public/screenshot.png)
8
10
 
11
+ ## The Knowledge Ladder
12
+
13
+ Amytis is built around a simple path from rough to refined:
14
+
15
+ - **Flow**: Capture raw daily thoughts and fragments.
16
+ - **Articles**: Refine one idea into a clear essay.
17
+ - **Series**: Connect related articles into a curated narrative.
18
+ - **Books**: Distill mature knowledge into structured chapters and parts.
19
+
20
+ Each stage builds on the previous one, so your garden can evolve naturally.
21
+
9
22
  ## Features
10
23
 
11
24
  - **Digital Garden Philosophy:** Non-linear navigation through tags, series, authors, books, flows, and chronological archives.
@@ -48,6 +61,14 @@
48
61
  - **Content CLI Tools:** Create posts, series, and import from PDFs or image folders.
49
62
  - **Modern Stack:** Next.js 16, React 19, Tailwind CSS v4, TypeScript 5, Bun.
50
63
 
64
+ ## Design Philosophy
65
+
66
+ - **Elegance by default**: Typography, spacing, and color should feel intentional out of the box.
67
+ - **Content over configuration**: Writing and publishing should be simple file-based workflows, not CMS-heavy setup.
68
+ - **Markdown-first, not markdown-limited**: Keep authoring portable while supporting rich output (math, diagrams, code, wikilinks).
69
+ - **Ship what you need**: Features are modular through `site.config.ts`; disable sections you do not use.
70
+ - **Plain text, long-term ownership**: Content stays in Markdown/MDX so it remains versionable and portable.
71
+
51
72
  ## Quick Start
52
73
 
53
74
  1. **Install Dependencies:**
@@ -75,67 +96,48 @@
75
96
  ## CLI Commands
76
97
 
77
98
  ```bash
78
- # Development
79
- bun dev # Start dev server at localhost:3000
80
- bun run lint # Run ESLint
81
-
82
- # Build
83
- bun run build # Full production build (copy assets + Next.js build + image optimization)
84
- bun run build:dev # Development build (no image optimization, faster)
85
- bun run clean # Remove .next, out, public/posts directories
86
-
87
- # Testing
88
- bun test # Run all tests
89
- bun run test:unit # Run unit tests (src/)
90
- bun run test:int # Run integration tests
91
- bun run test:e2e # Run end-to-end tests
92
-
93
- # Content creation
94
- bun run new "Post Title" # Create new post (flat file)
95
- bun run new "Title" --folder # Create as folder with index.mdx
96
- bun run new "Title" --prefix weekly # Create with prefix (e.g., weekly-title)
97
- bun run new "Title" --template custom # Use custom template from templates/
98
- bun run new "Title" --md # Create as .md instead of .mdx
99
- bun run new "Title" --series my-series # Create post in a series directory
100
- bun run new-series "Series Name" # Create new series with cover image placeholder
101
- bun run new-from-pdf doc.pdf # Create post from PDF (converts pages to images)
102
- bun run new-from-pdf doc.pdf --title "My Doc" # With custom title
103
- bun run new-from-pdf doc.pdf --scale 3.0 # Higher resolution (default: 2.0)
104
- bun run new-from-images ./photos # Create post from image folder
105
- bun run new-from-images ./photos --title "Gallery" # With custom title
106
- bun run new-from-images ./photos --sort date # Sort by date (default: name)
107
- bun run new-from-images ./photos --no-copy # Reference images instead of copying
108
- bun run new-note "Concept" # Create a new atomic note
109
- bun run new-flow-from-chat # Import all new files in imports/chats/
110
- bun run sync-book # Sync book chapters with files on disk
111
- bun run series-draft "series-slug" # Set all posts in a series to draft
112
- bun run series-draft "series-slug" --undraft # Remove draft status from series posts
99
+ ## Core
100
+ bun dev
101
+ bun run lint
102
+ bun run validate
103
+
104
+ ## Build & Deploy
105
+ bun run build
106
+ bun run build:dev
107
+ bun run clean
108
+ bun run deploy # Deploy to Linux/nginx server (requires .env.local)
109
+
110
+ ## Test
111
+ bun test
112
+ bun run test:unit
113
+ bun run test:int
114
+ bun run test:e2e
115
+
116
+ ## Create Content
117
+ bun run new "Post Title"
118
+ bun run new-series "Series Name"
119
+ bun run new-note "Concept"
120
+ bun run new-flow
121
+
122
+ ## Import / Maintain
123
+ bun run new-from-pdf ./doc.pdf
124
+ bun run new-from-images ./photos
125
+ bun run new-flow-from-chat
126
+ bun run import-book
127
+ bun run sync-book
128
+ bun run series-draft "series-slug"
113
129
  ```
114
130
 
115
131
  ### Importing Chat Logs to Flows
116
132
 
117
- Amytis includes a powerful script to convert chat logs (like those from LLMs or messaging apps) into Flow entries.
133
+ Drop `.txt` or `.log` files into `imports/chats/`, then run:
118
134
 
119
- 1. Place your `.txt` or `.log` files in `imports/chats/`.
120
- 2. Ensure the format is:
121
- ```
122
- Author Name YYYY-MM-DD HH:mm:ss
123
- Message content line 1
124
- Message content line 2
125
- ```
126
- 3. Run the importer:
127
- ```bash
128
- bun run new-flow-from-chat
129
- ```
130
-
131
- Options:
132
- - `--all`: Re-import every file (ignores history).
133
- - `--dry-run`: Preview changes without writing files.
134
- - `--author "Name"`: Only include messages from a specific author.
135
- - `--append`: Append to existing flow files instead of skipping.
136
- - `--timestamp`: Include timestamps in the rendered blocks.
135
+ ```bash
136
+ bun run new-flow-from-chat
137
+ ```
137
138
 
138
- Import history is tracked in `imports/chats/.imported`.
139
+ Common flags: `--all`, `--dry-run`, `--author "Name"`, `--append`, `--timestamp`.
140
+ Import history is stored in `imports/chats/.imported`.
139
141
 
140
142
  ## Configuration
141
143
 
@@ -208,6 +210,7 @@ amytis/
208
210
  ## Documentation
209
211
 
210
212
  - [Architecture Overview](docs/ARCHITECTURE.md)
213
+ - [Deployment Guide](docs/deployment.md)
211
214
  - [Digital Garden Guide](docs/DIGITAL_GARDEN.md)
212
215
  - [Contributing Guide](docs/CONTRIBUTING.md)
213
216
 
package/README.zh.md ADDED
@@ -0,0 +1,172 @@
1
+ # Amytis
2
+
3
+ [English](README.md) | [简体中文](README.zh.md)
4
+
5
+ **Amytis** 是一个优雅的开源数字花园框架,用于构建个人知识空间。它基于 Next.js 16、React 19 和 Tailwind CSS v4,强调可读性、结构化表达与长期内容所有权。
6
+
7
+ [**在线演示**](https://amytis.vercel.app/)
8
+
9
+ ![Amytis 截图](public/screenshot.png)
10
+
11
+ ## 知识阶梯
12
+
13
+ Amytis 围绕一条从粗糙到精炼的知识路径构建:
14
+
15
+ - **Flow(随笔)**:记录每日想法与碎片。
16
+ - **Articles(文章)**:将单个想法打磨成清晰文章。
17
+ - **Series(系列)**:把相关文章串联为一条主题叙事。
18
+ - **Books(书籍)**:将成熟知识沉淀为章节化结构。
19
+
20
+ 每个阶段都建立在上一阶段之上,花园会自然生长。
21
+
22
+ ## 功能特性
23
+
24
+ - **数字花园体验**:通过标签、系列、作者、书籍、Flow 和归档进行非线性导航。
25
+ - **互联知识网络**:
26
+ - **双向链接**:支持 `[[Slug]]` 跨内容类型关联。
27
+ - **反向链接**:在笔记页自动显示“Linked References”。
28
+ - **知识图谱**:以可视化方式展示内容连接关系。
29
+ - **全文搜索**:基于 Pagefind 的静态搜索,支持 Cmd/Ctrl+K 快捷键。
30
+ - **结构化内容体系**:
31
+ - **Series**:支持手动或自动排序的多篇集合。
32
+ - **Books**:支持章节与分部的长篇阅读界面。
33
+ - **Notes**:原子化常青笔记。
34
+ - **Flows**:流式日记/微记录。
35
+ - **富文本 MDX 能力**:
36
+ - GitHub Flavored Markdown(表格、任务列表等)
37
+ - 代码高亮
38
+ - Mermaid 图表
39
+ - KaTeX 数学公式
40
+ - 原生 HTML 支持
41
+ - **阅读体验与设计**:
42
+ - 高可读排版与响应式布局
43
+ - 自动系统主题检测(明/暗)
44
+ - 四套配色主题:default、blue、rose、amber
45
+ - 吸顶目录与阅读进度跟踪
46
+ - **性能与 SEO**:
47
+ - 全静态导出与 WebP 优化
48
+ - 自动 sitemap 与 RSS
49
+ - 支持 Latin/CJK 的多语言阅读时长估算
50
+ - **集成能力**:
51
+ - 统计:Umami / Plausible / Google Analytics
52
+ - 评论:Giscus / Disqus
53
+ - i18n:`site.config.ts` 中配置多语言(en / zh)
54
+
55
+ ## 设计理念
56
+
57
+ - **默认优雅**:排版、间距、色彩开箱即用且有审美一致性。
58
+ - **内容优先**:通过文件化写作与发布流程完成创作,不依赖重型 CMS。
59
+ - **Markdown 优先但不受限**:保持可迁移写作体验,同时支持数学、图表、代码和双向链接。
60
+ - **按需启用**:`site.config.ts` 提供模块化开关,仅启用你需要的能力。
61
+ - **纯文本长期所有权**:内容存储于 Markdown/MDX,便于版本管理与长期迁移。
62
+
63
+ ## 快速开始
64
+
65
+ 1. **安装依赖**
66
+ ```bash
67
+ bun install
68
+ ```
69
+
70
+ 2. **启动开发环境**
71
+ ```bash
72
+ bun dev
73
+ ```
74
+ 打开 [http://localhost:3000](http://localhost:3000)。
75
+
76
+ 3. **生产构建(静态导出)**
77
+ ```bash
78
+ bun run build
79
+ ```
80
+ 产物位于 `out/` 目录。
81
+
82
+ 4. **开发构建(更快,无图片优化)**
83
+ ```bash
84
+ bun run build:dev
85
+ ```
86
+
87
+ ## CLI 命令
88
+
89
+ ```bash
90
+ ## Core
91
+ bun dev
92
+ bun run lint
93
+ bun run validate
94
+
95
+ ## Build & Deploy
96
+ bun run build
97
+ bun run build:dev
98
+ bun run clean
99
+ bun run deploy # 部署到 Linux/nginx 服务器(需要 .env.local 配置)
100
+
101
+ ## Test
102
+ bun test
103
+ bun run test:unit
104
+ bun run test:int
105
+ bun run test:e2e
106
+
107
+ ## Create Content
108
+ bun run new "Post Title"
109
+ bun run new-series "Series Name"
110
+ bun run new-note "Concept"
111
+ bun run new-flow
112
+
113
+ ## Import / Maintain
114
+ bun run new-from-pdf ./doc.pdf
115
+ bun run new-from-images ./photos
116
+ bun run new-flow-from-chat
117
+ bun run import-book
118
+ bun run sync-book
119
+ bun run series-draft "series-slug"
120
+ ```
121
+
122
+ ### 导入聊天记录到 Flows
123
+
124
+ 将 `.txt` 或 `.log` 文件放入 `imports/chats/` 后执行:
125
+
126
+ ```bash
127
+ bun run new-flow-from-chat
128
+ ```
129
+
130
+ 常用参数:`--all`、`--dry-run`、`--author "Name"`、`--append`、`--timestamp`。
131
+ 导入历史记录位于 `imports/chats/.imported`。
132
+
133
+ ## 配置
134
+
135
+ 所有站点配置集中在 `site.config.ts`。
136
+
137
+ ## 内容写作
138
+
139
+ - **Posts**:创建到 `content/posts/`
140
+ - **Flows**:创建到 `content/flows/YYYY/MM/DD.mdx`(或文件夹模式)
141
+ - **Series**:创建 `content/series/<slug>/index.mdx`
142
+ - **Books**:创建到 `content/books/<slug>/`
143
+ - **Notes**:创建到 `content/notes/`,支持 `[[wiki-links]]`
144
+
145
+ ## 项目结构
146
+
147
+ ```text
148
+ amytis/
149
+ content/
150
+ posts/
151
+ series/
152
+ books/
153
+ notes/
154
+ flows/
155
+ public/
156
+ src/
157
+ app/
158
+ components/
159
+ lib/
160
+ site.config.ts
161
+ ```
162
+
163
+ ## 文档
164
+
165
+ - [架构说明](docs/ARCHITECTURE.md)
166
+ - [部署指南](docs/deployment.md)
167
+ - [数字花园指南](docs/DIGITAL_GARDEN.md)
168
+ - [贡献指南](docs/CONTRIBUTING.md)
169
+
170
+ ## 许可证
171
+
172
+ MIT
@@ -0,0 +1,25 @@
1
+ <svg width="800" height="400" xmlns="http://www.w3.org/2000/svg">
2
+ <rect width="800" height="400" rx="12" fill="#f0fdf4"/>
3
+ <rect x="1" y="1" width="798" height="398" rx="12" fill="none" stroke="#86efac" stroke-width="2"/>
4
+
5
+ <!-- Decorative circles -->
6
+ <circle cx="120" cy="200" r="60" fill="#bbf7d0" opacity="0.6"/>
7
+ <circle cx="680" cy="200" r="60" fill="#bbf7d0" opacity="0.6"/>
8
+ <circle cx="400" cy="100" r="40" fill="#86efac" opacity="0.4"/>
9
+
10
+ <!-- Simple tree/plant shapes -->
11
+ <polygon points="120,220 95,270 145,270" fill="#4ade80"/>
12
+ <rect x="113" y="268" width="14" height="20" fill="#166534"/>
13
+ <polygon points="120,190 90,240 150,240" fill="#22c55e"/>
14
+
15
+ <polygon points="680,220 655,270 705,270" fill="#4ade80"/>
16
+ <rect x="673" y="268" width="14" height="20" fill="#166534"/>
17
+ <polygon points="680,190 650,240 710,240" fill="#22c55e"/>
18
+
19
+ <!-- Title text -->
20
+ <text x="400" y="175" text-anchor="middle" font-family="Georgia, serif" font-size="42" font-weight="bold" fill="#14532d">The Digital Garden</text>
21
+ <text x="400" y="225" text-anchor="middle" font-family="Georgia, serif" font-size="22" font-style="italic" fill="#166534">A place for ideas to grow</text>
22
+
23
+ <!-- Subtitle -->
24
+ <text x="400" y="310" text-anchor="middle" font-family="Arial, sans-serif" font-size="16" fill="#4ade80">✦ cultivate · connect · contribute ✦</text>
25
+ </svg>
@@ -2,7 +2,7 @@
2
2
  title: "The Digital Garden Handbook"
3
3
  excerpt: "A comprehensive guide to building and maintaining your own digital garden, from initial setup to advanced techniques."
4
4
  date: "2026-01-15"
5
- coverImage: "text:DG"
5
+ coverImage: "/images/flowers.jpg"
6
6
  featured: true
7
7
  draft: false
8
8
  authors: ["Amytis"]
@@ -3,6 +3,8 @@ title: "Introduction to Digital Gardens"
3
3
  excerpt: "Understanding the philosophy and history behind digital gardens."
4
4
  ---
5
5
 
6
+ ![The Digital Garden](./images/digital-garden.svg)
7
+
6
8
  ## What is a Digital Garden?
7
9
 
8
10
  A digital garden is a personal online space where ideas are cultivated over time. Unlike a traditional blog with polished, finished posts, a digital garden embraces the concept of learning in public.
@@ -5,8 +5,6 @@ excerpt: "Demonstrating support for standard .md files."
5
5
  category: "Meta"
6
6
  tags: ["markdown", "legacy"]
7
7
  author: "Old Timer"
8
- featured: true
9
- coverImage: "text:Legacy Markdown"
10
8
  ---
11
9
 
12
10
  # Legacy Markdown Support
@@ -5,8 +5,8 @@ excerpt: "Testing tables, task lists, and other GFM features."
5
5
  category: "Test"
6
6
  tags: ["markdown", "gfm"]
7
7
  author: "Tester"
8
- coverImage: "text:Markdown"
9
8
  featured: true
9
+ coverImage: "/images/cappadocia.jpg"
10
10
  ---
11
11
 
12
12
  # Extended Markdown Features
@@ -6,7 +6,6 @@ category: "测试"
6
6
  tags: ["chinese", "multilingual", "test"]
7
7
  authors: ["Amytis Team"]
8
8
  latex: true
9
- featured: true
10
9
  coverImage: "text:Multilingual"
11
10
  ---
12
11
 
@@ -6,6 +6,7 @@ category: "Showcase"
6
6
  tags: ["test", "code", "syntax-highlighting"]
7
7
  authors: ["Amytis Team"]
8
8
  featured: true
9
+ coverImage: "/images/antelope-canyon.jpg"
9
10
  toc: true
10
11
  externalLinks:
11
12
  - name: "Prism.js"
@@ -6,6 +6,7 @@ category: "Engineering"
6
6
  tags: ["react", "hooks", "frontend"]
7
7
  author: "Code Gardener"
8
8
  featured: true
9
+ coverImage: "/images/antelope-canyon.jpg"
9
10
  ---
10
11
 
11
12
  React Hooks revolutionized how we write components. Let's explore the core hooks.
@@ -2,7 +2,7 @@
2
2
  title: "AI Nexus Weekly"
3
3
  excerpt: "A curated weekly digest exploring the rapidly evolving landscape of Artificial Intelligence, from large language models to robotics."
4
4
  date: "2026-02-17"
5
- coverImage: "text:AI Nexus"
5
+ coverImage: "/images/galaxy.jpg"
6
6
  featured: true
7
7
  sort: "date-desc"
8
8
  ---
@@ -5,6 +5,8 @@ excerpt: "How ideas evolve from raw daily flows into articles, series, and books
5
5
  category: "Philosophy"
6
6
  tags: ["pkm", "knowledge management", "learning"]
7
7
  authors: ["Amytis Team"]
8
+ featured: true
9
+ coverImage: "/images/mountains.jpg"
8
10
  ---
9
11
 
10
12
  # The Philosophy of Digital Gardening
@@ -2,7 +2,7 @@
2
2
  title: "The Digital Garden"
3
3
  excerpt: "Exploring the philosophy and architecture of modern digital gardens. A journey from linear blogs to non-linear knowledge systems."
4
4
  date: "2026-02-11"
5
- coverImage: "text:Digital Garden"
5
+ coverImage: "/images/mountains.jpg"
6
6
  featured: true
7
7
  sort: "manual"
8
8
  posts: ["01-philosophy", "02-architecture"]
@@ -2,7 +2,7 @@
2
2
  title: "Markdown Showcase"
3
3
  excerpt: "A comprehensive tour of the rich content features supported by Amytis, from Mermaid diagrams to LaTeX math."
4
4
  date: "2026-02-13"
5
- coverImage: "text:MDX Showcase"
5
+ coverImage: "/images/lake.jpg"
6
6
  featured: true
7
7
  sort: "manual"
8
8
  posts: ["visuals-and-diagrams", "mathematical-notation", "syntax-highlighting"]
@@ -3,6 +3,8 @@ title: "Syntax Highlighting"
3
3
  date: "2026-02-15"
4
4
  category: "Engineering"
5
5
  tags: ["code", "typescript"]
6
+ featured: true
7
+ coverImage: "/images/vibrant-waves.avif"
6
8
  ---
7
9
 
8
10
  Amytis provides beautiful syntax highlighting for dozens of programming languages. Here are a few examples within the series context.
@@ -2,7 +2,8 @@
2
2
  title: "Part 1: Getting Started with Next.js 15"
3
3
  date: "2026-01-30"
4
4
  excerpt: "Setting up the environment and understanding the core philosophy."
5
- coverImage: "text:Part 1"
5
+ featured: true
6
+ coverImage: "/images/vibrant-waves.avif"
6
7
  ---
7
8
 
8
9
  # Getting Started
@@ -2,8 +2,8 @@
2
2
  title: "Next.js Deep Dive"
3
3
  excerpt: "A comprehensive guide to mastering Next.js 15, including advanced routing, data fetching, and performance optimization."
4
4
  date: "2026-01-30"
5
- coverImage: "https://images.unsplash.com/photo-1618005182384-a83a8bd57fbe?auto=format&fit=crop&w=800&q=80"
6
5
  sort: "manual"
6
+ coverImage: "/images/cappadocia.jpg"
7
7
  posts:
8
8
  - "01-getting-started"
9
9
  - "02-routing-mastery"
@@ -0,0 +1,27 @@
1
+ ---
2
+ title: "Subscribe"
3
+ excerpt: "Stay updated with new posts and notes."
4
+ ---
5
+
6
+ Choose how you'd like to follow along.
7
+
8
+ ## RSS Feed
9
+
10
+ RSS is an open standard — no account required. Paste the feed URL into any reader app, or use one of the quick-subscribe links below.
11
+
12
+ <rss-feed></rss-feed>
13
+
14
+ **Popular readers:** [Follow](https://app.follow.is) · [Feedly](https://feedly.com) · [Inoreader](https://www.inoreader.com) · [NetNewsWire](https://netnewswire.com) · [NewsBlur](https://newsblur.com)
15
+
16
+ ## Newsletter
17
+
18
+ Subscribe via email to get new posts delivered to your inbox.
19
+
20
+ [Subscribe →](https://example.com)
21
+
22
+ ## Social
23
+
24
+ Follow for updates and discussions.
25
+
26
+ - [X (Twitter)](https://twitter.com)
27
+ - [GitHub](https://github.com)