@hutusi/amytis 1.11.0 → 1.13.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 (95) hide show
  1. package/AGENTS.md +7 -4
  2. package/CHANGELOG.md +36 -0
  3. package/CLAUDE.md +11 -0
  4. package/README.md +76 -21
  5. package/README.zh.md +189 -81
  6. package/bun.lock +9 -0
  7. package/content/books/notes-on-thinking/cost-of-certainty.mdx +9 -0
  8. package/content/books/notes-on-thinking/index.mdx +16 -0
  9. package/content/books/notes-on-thinking/mental-models.mdx +9 -0
  10. package/content/books/the-pragmatic-writer/finding-your-voice.mdx +9 -0
  11. package/content/books/the-pragmatic-writer/index.mdx +18 -0
  12. package/content/books/the-pragmatic-writer/the-editing-loop.mdx +9 -0
  13. package/content/books/the-pragmatic-writer/why-writing-matters.mdx +9 -0
  14. package/content/flows/2026/03/01.md +9 -0
  15. package/content/flows/2026/03/03.md +9 -0
  16. package/content/flows/2026/03/05.md +9 -0
  17. package/content/flows/2026/03/07.md +9 -0
  18. package/content/posts/2026-01-12-the-art-of-algorithms.mdx +3 -0
  19. package/content/posts/2026-01-21-kitchen-sink/index.mdx +2 -2
  20. package/content/posts/images/vibrant-waves.jpg +0 -0
  21. package/content/posts/multimedia-showcase/index.mdx +4 -6
  22. package/content/posts/welcome-to-amytis.mdx +3 -0
  23. package/content/series/markdown-showcase/index.mdx +2 -1
  24. package/content/series/markdown-showcase/mathematical-notation.mdx +8 -4
  25. package/content/series/markdown-showcase/syntax-highlighting.mdx +9 -5
  26. package/content/series/markdown-showcase/visuals-and-diagrams.mdx +8 -4
  27. package/content/{posts → series/markdown-showcase}//344/270/255/346/226/207/346/265/213/350/257/225/346/226/207/347/253/240.mdx +12 -7
  28. package/content/series/modern-web-dev/index.mdx +13 -0
  29. package/content/series/nextjs-deep-dive/01-getting-started.mdx +1 -1
  30. package/docs/ARCHITECTURE.md +3 -0
  31. package/docs/CONTRIBUTING.md +29 -0
  32. package/docs/TROUBLESHOOTING.md +31 -0
  33. package/next.config.ts +8 -2
  34. package/nginx.conf.example +156 -0
  35. package/package.json +6 -2
  36. package/packages/create-amytis/src/index.test.ts +2 -2
  37. package/playwright.config.ts +199 -0
  38. package/public/images/vibrant-waves.jpg +0 -0
  39. package/public/next-image-export-optimizer-hashes.json +3 -2
  40. package/scripts/add-series-redirects.ts +192 -0
  41. package/scripts/import-obsidian.ts +319 -0
  42. package/site.config.example.ts +17 -3
  43. package/site.config.ts +20 -6
  44. package/src/app/[slug]/[postSlug]/page.tsx +81 -10
  45. package/src/app/[slug]/page/[page]/page.tsx +26 -5
  46. package/src/app/[slug]/page.tsx +71 -13
  47. package/src/app/flows/[year]/[month]/[day]/page.tsx +7 -1
  48. package/src/app/layout.tsx +1 -2
  49. package/src/app/notes/[slug]/page.tsx +31 -7
  50. package/src/app/page.tsx +6 -8
  51. package/src/app/posts/[slug]/page.tsx +60 -9
  52. package/src/app/series/[slug]/page/[page]/page.tsx +6 -5
  53. package/src/app/series/[slug]/page.tsx +54 -11
  54. package/src/app/tags/[tag]/page.tsx +6 -1
  55. package/src/components/CoverImage.tsx +3 -1
  56. package/src/components/CuratedSeriesSection.tsx +11 -14
  57. package/src/components/FeaturedStoriesSection.tsx +13 -12
  58. package/src/components/Footer.tsx +6 -6
  59. package/src/components/Hero.tsx +2 -2
  60. package/src/components/HorizontalScroll.tsx +5 -14
  61. package/src/components/KatexStyles.tsx +8 -0
  62. package/src/components/LatestWritingSection.tsx +5 -9
  63. package/src/components/MarkdownRenderer.test.tsx +3 -0
  64. package/src/components/MarkdownRenderer.tsx +7 -2
  65. package/src/components/Navbar.tsx +11 -10
  66. package/src/components/PostList.tsx +22 -38
  67. package/src/components/PostNavigation.tsx +39 -14
  68. package/src/components/PostSidebar.tsx +39 -19
  69. package/src/components/RecentNotesSection.tsx +3 -6
  70. package/src/components/RedirectPage.tsx +27 -0
  71. package/src/components/SelectedBooksSection.tsx +67 -27
  72. package/src/components/SeriesCatalog.tsx +16 -11
  73. package/src/components/SeriesList.tsx +38 -22
  74. package/src/components/TagSidebar.tsx +3 -3
  75. package/src/components/TagsIndexClient.tsx +1 -1
  76. package/src/i18n/translations.ts +6 -0
  77. package/src/layouts/BookLayout.tsx +11 -0
  78. package/src/layouts/PostLayout.tsx +37 -19
  79. package/src/layouts/SimpleLayout.tsx +16 -4
  80. package/src/lib/comments.test.ts +50 -0
  81. package/src/lib/comments.ts +25 -0
  82. package/src/lib/markdown.ts +142 -24
  83. package/src/lib/remark-wikilinks.test.ts +86 -0
  84. package/src/lib/remark-wikilinks.ts +1 -1
  85. package/src/lib/urls.ts +57 -1
  86. package/tests/e2e/mobile/mobile-compat.spec.ts +465 -0
  87. package/tests/integration/collections.test.ts +129 -0
  88. package/tests/integration/markdown-features.test.ts +3 -3
  89. package/tests/integration/reading-time-headings.test.ts +2 -2
  90. package/tests/tooling/add-series-redirects.test.ts +110 -0
  91. package/tests/tooling/import-obsidian.test.ts +96 -0
  92. package/tests/unit/static-params.test.ts +236 -8
  93. package/tests/unit/urls.test.ts +28 -0
  94. package/public/images/vibrant-waves.avif +0 -0
  95. /package/content/posts/{multilingual-test.mdx → multilingual-test-/344/270/255/346/226/207/351/225/277/346/240/207/351/242/230.mdx"} +0 -0
package/AGENTS.md CHANGED
@@ -6,8 +6,10 @@
6
6
  - `src/lib/`: Content parsing and shared logic (`markdown.ts`, feed helpers, URL helpers, rehype/remark utilities).
7
7
  - `content/`: Markdown/MDX source content for posts, series, books, notes, flows, and static pages. Use folder posts (`index.mdx` + `images/` or `assets/`) when media is co-located.
8
8
  - `tests/`: Integration/e2e/tooling suites; keep focused utility tests near source (example: `src/lib/markdown.test.ts`).
9
- - `scripts/`: Bun-based authoring/import tooling.
9
+ - `scripts/`: Bun-based authoring/import/build tooling.
10
+ - `imports/`: Local-only staging area for chat logs, PDFs, and image folders consumed by import scripts; see `imports/README.md`.
10
11
  - `packages/create-amytis/`: The `bun create amytis` scaffold CLI; keep its tests aligned with repo scaffolding behavior.
12
+ - `site.config.ts` is the live site configuration; `site.config.example.ts` is the fuller reference template.
11
13
 
12
14
  ## Build, Test, and Development Commands
13
15
  - `bun install`: Install dependencies.
@@ -18,8 +20,8 @@
18
20
  - `bun run validate`: Run the recommended pre-PR validation sequence (`lint`, `test`, `build:dev`).
19
21
  - `bun run clean`: Remove generated outputs (`.next`, `out`, `public/posts`, `public/books`, `public/flows`).
20
22
  - `bun run lint`: Run ESLint.
21
- - `bun test` / `bun run test:unit` / `bun run test:int` / `bun run test:e2e`: Run all or scoped tests.
22
- - Content tooling: `bun run new`, `bun run new-weekly`, `bun run new-series`, `bun run new-note`, `bun run new-flow`, `bun run new-flow-from-chat`, `bun run new-from-pdf`, `bun run new-from-images`, `bun run import-book`, `bun run sync-book`, `bun run series-draft`.
23
+ - `bun test` / `bun run test:unit` / `bun run test:int` / `bun run test:e2e` / `bun run test:mobile`: Run all or scoped tests.
24
+ - Content tooling: `bun run new`, `bun run new-weekly`, `bun run new-series`, `bun run new-note`, `bun run new-flow`, `bun run new-flow-from-chat`, `bun run new-from-pdf`, `bun run new-from-images`, `bun run import-obsidian`, `bun run import-book`, `bun run sync-book`, `bun run series-draft`, `bun run add-series-redirects`.
23
25
 
24
26
  ## Coding Style & Naming Conventions
25
27
  - Use TypeScript for app and utility code; MDX/Markdown for content.
@@ -31,7 +33,8 @@
31
33
  - Project uses `output: "export"` and `trailingSlash: true` in `next.config.ts`.
32
34
  - In `generateStaticParams()`, return raw segment values; do not pre-encode with `encodeURIComponent`.
33
35
  - Never link to route placeholders like `/posts/[slug]`; always link to concrete slugs (for example, `/posts/中文测试文章`).
34
- - Posts may also resolve through custom top-level paths via `series.customPaths` and `[slug]/[postSlug]`; preserve those URL helpers instead of hardcoding paths.
36
+ - Posts default to `/<posts.basePath>/<slug>`, but may also resolve through `series.autoPaths`, `series.customPaths`, and `[slug]/[postSlug]`; preserve URL helpers instead of hardcoding paths.
37
+ - Before moving series posts away from the default posts path, run `bun run add-series-redirects --dry-run` and then `bun run add-series-redirects` so legacy URLs keep resolving.
35
38
  - When touching dynamic routes, verify both ASCII and Unicode paths.
36
39
 
37
40
  ## Testing Guidelines
package/CHANGELOG.md CHANGED
@@ -5,6 +5,42 @@ 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.13.0] - 2026-03-25
9
+
10
+ ### Added
11
+ - **Slug Rename Redirects**: Added `redirectFrom` support for post slug renames within the same URL prefix so renamed content can keep resolving from legacy paths.
12
+ - **Series Slug Migration**: Added `redirectFrom` support for series slug renames, preserving access to older series URLs after route changes.
13
+
14
+ ### Changed
15
+ - **Series Routing Defaults**: `series.autoPaths` now defaults to `true`, making `/<series-slug>/<post-slug>` the standard route shape for series posts.
16
+ - **README Positioning**: Updated the English README to match the latest Chinese version, including the project backstory and refreshed documentation structure.
17
+
18
+ ### Fixed
19
+ - **Route Conflict Handling**: Prevented auto-path series slugs from colliding with configured `series.customPaths` values during route generation.
20
+
21
+ ## [1.12.0] - 2026-03-08
22
+
23
+ ### Added
24
+ - **Series Auto Paths**: Added `series.autoPaths` so series posts can be served directly at `/<series-slug>/<post-slug>` without manual per-series path mapping.
25
+ - **URL Migration Tooling**: Added `bun run add-series-redirects` with `--dry-run` and `--auto-paths` support to backfill `redirectFrom` entries before route migrations.
26
+ - **Collections**: Added curated cross-series collections with dedicated data-layer support, listing surfaces, and integration test coverage.
27
+ - **Static Page Comments**: Added per-category comment controls plus optional comments on book chapters, notes, and flows.
28
+ - **Obsidian Importer**: Added `bun run import-obsidian` for recursive vault import with wikilink rewriting and relative-path handling.
29
+ - **Mobile Coverage**: Added Playwright-based mobile compatibility testing and homepage/navigation assertions across real-device profiles.
30
+
31
+ ### Changed
32
+ - **Wikilink Readability**: Wikilinks now prefer rendered note titles over raw slugs where metadata is available.
33
+ - **Homepage Behavior**: Clicking the logo on the homepage now scrolls back to the top, and section spacing stays consistent when optional homepage blocks are disabled.
34
+ - **Documentation**: Refreshed repository guidance, architecture notes, and release-facing docs to match current commands, routing rules, and import workflows.
35
+
36
+ ### Fixed
37
+ - **Redirect Safety**: Prevented `redirectFrom` aliases from hijacking reserved routes or existing pages, including conflicting and single-segment alias cases.
38
+ - **Custom Route Redirects**: Fixed renamed-slug redirects for `series.customPaths` and `[slug]/[postSlug]` routes.
39
+ - **Collection Integrity**: Fixed duplicate collection entries, draft leakage in production, and prev/next navigation inconsistencies.
40
+ - **Tag URL Consistency**: Normalized mixed-case tag URLs without losing display casing and removed duplicate counting from same-document tag variants.
41
+ - **Unicode Note Routing**: Fixed dev-mode handling for percent-encoded Unicode note slugs.
42
+ - **Mobile UX**: Improved narrow-viewport layout stability, tap-target sizing, and flaky mobile test behavior.
43
+
8
44
  ## [1.11.0] - 2026-03-07
9
45
 
10
46
  ### Changed
package/CLAUDE.md CHANGED
@@ -18,6 +18,7 @@ bun test # Run all tests
18
18
  bun run test:unit # Run unit tests (src/)
19
19
  bun run test:int # Run integration tests
20
20
  bun run test:e2e # Run end-to-end tests
21
+ bun run test:mobile # Run Playwright mobile compatibility tests (requires dev server)
21
22
  bun test path/to/file.test.ts # Run a single test file
22
23
 
23
24
  # Build
@@ -34,11 +35,18 @@ bun run new-series "Series Name" # Create new series
34
35
  bun run new-from-pdf doc.pdf # Create post from PDF
35
36
  bun run new-from-images ./photos # Create post from image folder
36
37
  bun run new-flow # Create today's flow note
38
+ bun run add-series-redirects # Add redirectFrom to all series posts (for autoPaths migration)
39
+ bun run add-series-redirects <series-slug> # Add redirectFrom to one series only
40
+ bun run add-series-redirects --dry-run # Preview without writing
37
41
  bun run new-flow-from-chat # Import all new files from imports/chats/
38
42
  bun run sync-book # Sync chapters list for all books from disk
39
43
  bun run sync-book <slug> # Sync chapters list for one book
40
44
  ```
41
45
 
46
+ ## Design Principles
47
+
48
+ - **Strict build over silent runtime failure.** This is a statically exported site — all misconfiguration must be caught at build time. Prefer `throw` in `generateStaticParams` and similar build-time functions over silent skips or `console.warn`. Examples: `validateSeriesAutoPaths` throws on slug collisions; `redirectFrom` alias conflicts should throw rather than silently producing broken redirects.
49
+
42
50
  ## Architecture
43
51
 
44
52
  ### Data Flow
@@ -157,6 +165,9 @@ externalLinks: # Links to external discussions
157
165
  url: "https://news.ycombinator.com/item?id=12345"
158
166
  - name: "V2EX"
159
167
  url: "https://v2ex.com/t/123456"
168
+ redirectFrom: # Old URLs that should redirect to this post (prefix changes only)
169
+ - /posts/my-old-slug
170
+ - /old-series/my-old-slug
160
171
  ---
161
172
  ```
162
173
 
package/README.md CHANGED
@@ -2,22 +2,37 @@
2
2
 
3
3
  [English](README.md) | [简体中文](README.zh.md)
4
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.
5
+ **Amytis** is a powerful, elegant, and user-friendly open-source digital garden framework for building knowledge spaces, blogs, showcase sites, or internal knowledge bases. It is built with Next.js 16, Tailwind CSS v4, and Bun, emphasizing a Markdown-first, plain-text-first workflow that preserves long-term content ownership while pursuing simplicity, elegance, and performance.
6
6
 
7
7
  [**Live Demo**](https://amytis.vercel.app/)
8
8
 
9
9
  ![Amytis Screenshot](public/images/amytis-screenshot.jpg)
10
10
 
11
- ## The Knowledge Ladder
11
+ ## Why Amytis?
12
12
 
13
- Amytis is built around a simple path from rough to refined:
13
+ I have been [blogging for twenty years](https://hutusi.com/archive), starting from early blogging platforms such as MSN Space (MS Live Space) and Sina Blog, then moving to self-hosted WordPress and Drupal, and later fully adopting static blogging frameworks after GitHub Pages became available. I tried Jekyll, Hugo, and several of their themes, but none of them truly satisfied me. The feature-rich ones were often not simple or elegant enough, while the elegant ones usually lacked flexibility and customization. I kept wondering whether a blogging or knowledge platform framework could balance functionality, performance, aesthetics, and UX. That idea stayed with me for years. When I finally decided to build one myself, I found it much harder than I had expected.
14
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.
15
+ Fortunately, AI coding changed that equation. With the help of Claude Code, Gemini CLI, and Codex, it became much easier than before to turn the idea into reality. After more than 700 commits of iteration, Amytis finally took shape as the idealized knowledge platform framework I had been aiming for. It was first used in the geek community platform I built at work, and I also replaced the framework behind my Hutusi blog with it. Amytis is now open source. Independent bloggers and knowledge managers are welcome to use it, and contributions, bug reports, and pull requests are all appreciated. If you are using Amytis, feel free to leave a note in [this issue](https://github.com/hutusi/amytis/issues/49).
19
16
 
20
- Each stage builds on the previous one, so your garden can evolve naturally.
17
+ ### The Knowledge Ladder
18
+
19
+ Amytis is built around a path from fragmented thoughts to refined knowledge, helping individuals or teams build a complete digital garden system:
20
+
21
+ - **Flow**: Capture daily thoughts and brainstorming fragments.
22
+ - **Articles**: Refine a single idea into a clear article.
23
+ - **Series**: Connect related articles into a thematic narrative.
24
+ - **Books**: Distill mature knowledge into structured, chapter-based books.
25
+
26
+ Each stage builds on the one before it, so the garden can grow naturally.
27
+
28
+ ### Design Philosophy
29
+
30
+ - **Elegance by default**: Typography, spacing, and color should feel polished out of the box and remain visually consistent.
31
+ - **Content and plain text first**: Writing and publishing should happen through file-based workflows rather than a heavyweight CMS. Content lives in Markdown/MDX, can be versioned with Git, and remains portable over time.
32
+ - **Markdown-first, not markdown-limited**: Markdown and common extensions are supported by default, while math, diagrams, code, and bidirectional links remain first-class.
33
+ - **Ship what you need**: `site.config.ts` provides modular switches so you only enable the capabilities you actually need.
34
+
35
+ Further reading: [How to Get AI to Write Better Code](https://hutusi.com/weeklies/25) (Chinese)
21
36
 
22
37
  ## Features
23
38
 
@@ -65,14 +80,6 @@ Each stage builds on the previous one, so your garden can evolve naturally.
65
80
  - **Content CLI Tools:** Create posts, series, and import from PDFs or image folders.
66
81
  - **Modern Stack:** Next.js 16, React 19, Tailwind CSS v4, TypeScript 5, Bun.
67
82
 
68
- ## Design Philosophy
69
-
70
- - **Elegance by default**: Typography, spacing, and color should feel intentional out of the box.
71
- - **Content over configuration**: Writing and publishing should be simple file-based workflows, not CMS-heavy setup.
72
- - **Markdown-first, not markdown-limited**: Keep authoring portable while supporting rich output (math, diagrams, code, wikilinks).
73
- - **Ship what you need**: Features are modular through `site.config.ts`; disable sections you do not use.
74
- - **Plain text, long-term ownership**: Content stays in Markdown/MDX so it remains versionable and portable.
75
-
76
83
  ## Quick Start
77
84
 
78
85
  ### New Project (Recommended)
@@ -119,6 +126,7 @@ The scaffold command downloads the latest tagged Amytis release, installs depend
119
126
  ## Core
120
127
  bun dev
121
128
  bun run lint
129
+ bun run build:graph
122
130
  bun run validate
123
131
 
124
132
  ## Build & Deploy
@@ -132,6 +140,7 @@ bun test
132
140
  bun run test:unit
133
141
  bun run test:int
134
142
  bun run test:e2e
143
+ bun run test:mobile
135
144
 
136
145
  ## Create Content
137
146
  bun run new "Post Title"
@@ -144,9 +153,11 @@ bun run new-flow
144
153
  bun run new-from-pdf ./doc.pdf
145
154
  bun run new-from-images ./photos
146
155
  bun run new-flow-from-chat
156
+ bun run import-obsidian
147
157
  bun run import-book
148
158
  bun run sync-book
149
159
  bun run series-draft "series-slug"
160
+ bun run add-series-redirects --dry-run
150
161
  ```
151
162
 
152
163
  ### Importing Chat Logs to Flows
@@ -162,7 +173,7 @@ Import history is stored in `imports/chats/.imported`.
162
173
 
163
174
  ## Configuration
164
175
 
165
- All site settings are managed in `site.config.ts`:
176
+ Primary site settings live in `site.config.ts`. `site.config.example.ts` is the reference template used by the scaffold and is useful when reviewing new options:
166
177
 
167
178
  ```typescript
168
179
  export const siteConfig = {
@@ -182,27 +193,66 @@ export const siteConfig = {
182
193
  };
183
194
  ```
184
195
 
196
+ High-impact areas to customize first:
197
+
198
+ - Site identity: `title`, `description`, `baseUrl`, `ogImage`, `logo`
199
+ - Navigation and footer: `nav`, `footer`, `subscribe`, `social`
200
+ - Content behavior: `posts.basePath`, `posts.includeDateInUrl`, `series.autoPaths`, `series.customPaths`
201
+ - Homepage composition: `hero`, `homepage.sections`
202
+ - Integrations: `analytics`, `comments`, `feed`, `i18n`
203
+
204
+ For static hosting behind nginx, start from `nginx.conf.example`.
205
+
206
+ ## Static Export Routing Rules
207
+
208
+ Amytis is built around Next.js static export with `output: "export"` and `trailingSlash: true`.
209
+
210
+ - In `generateStaticParams()`, return raw segment values. Do not pre-encode with `encodeURIComponent`.
211
+ - Link to concrete URLs such as `/posts/中文测试文章`, not route placeholders like `/posts/[slug]`.
212
+ - Posts default to `/<posts.basePath>/<slug>` and `posts.basePath` defaults to `/posts`.
213
+ - If `series.autoPaths` is enabled, series posts move to `/<series-slug>/<post-slug>`.
214
+ - If `series.customPaths` is configured, those custom prefixes override `autoPaths`.
215
+ - Before moving series posts off the default posts path, run `bun run add-series-redirects --dry-run` and then `bun run add-series-redirects` so legacy URLs still resolve.
216
+
185
217
  ## Writing Content
186
218
 
187
219
  ### Posts
188
220
 
189
221
  Create `.md` or `.mdx` files in `content/posts/`.
190
222
 
223
+ - Flat file: `content/posts/my-post.mdx`
224
+ - Date-prefixed file: `content/posts/2026-01-01-my-post.mdx`
225
+ - Folder post with co-located media: `content/posts/my-post/index.mdx` plus `content/posts/my-post/images/*`
226
+ - CLI: `bun run new "Post Title"` or `bun run new "Post Title" --folder`
227
+
191
228
  ### Flows
192
229
 
193
- Create daily notes in `content/flows/YYYY/MM/DD.mdx` or `content/flows/YYYY/MM/DD/index.mdx`.
230
+ Create daily notes in `content/flows/YYYY/MM/DD.md` or `.mdx`.
231
+
232
+ - CLI: `bun run new-flow` creates today’s entry
233
+ - Chat import: put exports in `imports/chats/` and run `bun run new-flow-from-chat`
194
234
 
195
235
  ### Series
196
236
 
197
- Create a directory in `content/series/` with an `index.mdx`.
237
+ Create a directory in `content/series/<slug>/` with an `index.mdx`, then add posts as sibling files or folders.
238
+
239
+ - CLI: `bun run new-series "Series Name"`
240
+ - You can also create a post directly inside an existing series with `bun run new "Post Title" --series <series-slug>`
198
241
 
199
242
  ### Books
200
243
 
201
- Books are for long-form, structured content. Create a directory in `content/books/`.
244
+ Books are long-form structured content under `content/books/<slug>/`.
245
+
246
+ - Keep book metadata in `index.mdx`
247
+ - Add chapter files beside it, for example `introduction.mdx` or `setup.mdx`
248
+ - Use `bun run import-book` and `bun run sync-book` for book-oriented workflows
202
249
 
203
250
  ### Notes
204
251
 
205
- Create evergreen notes in `content/notes/` (e.g., `concept.mdx`). Use `[[wiki-links]]` to connect them.
252
+ Create evergreen notes in `content/notes/` (for example `concept.mdx`). Use `[[wiki-links]]` to connect them.
253
+
254
+ - CLI: `bun run new-note "Concept"`
255
+ - Unicode slugs are supported intentionally for notes and posts where needed
206
256
 
207
257
  ## Project Structure
208
258
 
@@ -215,7 +265,10 @@ amytis/
215
265
  notes/ # Digital garden notes
216
266
  flows/ # Daily notes (YYYY/MM/DD)
217
267
  about.mdx # Static pages
268
+ docs/ # Architecture, deployment, troubleshooting
269
+ imports/ # Local-only input files for import scripts
218
270
  public/ # Static assets
271
+ scripts/ # Bun authoring/build/import tooling
219
272
  src/
220
273
  app/ # Next.js App Router pages
221
274
  books/ # Book routes
@@ -225,6 +278,7 @@ amytis/
225
278
  components/ # React components
226
279
  lib/
227
280
  markdown.ts # Data access layer
281
+ tests/ # Unit, integration, e2e, tooling tests
228
282
  packages/
229
283
  create-amytis/ # `bun create amytis` scaffold CLI
230
284
  site.config.ts # Site configuration
@@ -236,6 +290,7 @@ amytis/
236
290
  - [Deployment Guide](docs/deployment.md)
237
291
  - [Digital Garden Guide](docs/DIGITAL_GARDEN.md)
238
292
  - [Contributing Guide](docs/CONTRIBUTING.md)
293
+ - [Troubleshooting](docs/TROUBLESHOOTING.md)
239
294
 
240
295
  ## License
241
296