@hutusi/amytis 1.5.5
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.
- package/.github/workflows/ci.yml +33 -0
- package/.github/workflows/publish.yml +53 -0
- package/AGENTS.md +41 -0
- package/CLAUDE.md +200 -0
- package/GEMINI.md +84 -0
- package/README.md +172 -0
- package/TODO.md +76 -0
- package/bun.lock +1530 -0
- package/content/about.mdx +23 -0
- package/content/books/sample-book/index.mdx +24 -0
- package/content/books/sample-book/introduction.mdx +34 -0
- package/content/books/sample-book/setup.mdx +48 -0
- package/content/books/sample-book/writing-content.mdx +49 -0
- package/content/flows/2026/02/05.md +8 -0
- package/content/flows/2026/02/10.mdx +8 -0
- package/content/flows/2026/02/15.md +8 -0
- package/content/flows/2026/02/18.mdx +14 -0
- package/content/posts/2026-01-12-the-art-of-algorithms.mdx +49 -0
- package/content/posts/2026-01-15-nested-image-test/images/test.svg +5 -0
- package/content/posts/2026-01-15-nested-image-test/index.mdx +27 -0
- package/content/posts/2026-01-21-kitchen-sink/assets/test.svg +5 -0
- package/content/posts/2026-01-21-kitchen-sink/index.mdx +169 -0
- package/content/posts/asynchronous-javascript.mdx +49 -0
- package/content/posts/draft-post.mdx +13 -0
- package/content/posts/future-post.mdx +12 -0
- package/content/posts/legacy-markdown.md +60 -0
- package/content/posts/markdown-features.mdx +78 -0
- package/content/posts/modern-css-layouts.mdx +45 -0
- package/content/posts/multilingual-test.mdx +124 -0
- package/content/posts/syntax-highlighting-showcase.mdx +528 -0
- package/content/posts/understanding-react-hooks.mdx +48 -0
- package/content/posts/welcome-to-amytis.mdx +21 -0
- package/content/posts//344/270/255/346/226/207/346/265/213/350/257/225/346/226/207/347/253/240.mdx +54 -0
- package/content/series/ai-nexus-weekly/index.mdx +10 -0
- package/content/series/ai-nexus-weekly/week-1.mdx +20 -0
- package/content/series/ai-nexus-weekly/week-10.mdx +20 -0
- package/content/series/ai-nexus-weekly/week-11.mdx +20 -0
- package/content/series/ai-nexus-weekly/week-12.mdx +20 -0
- package/content/series/ai-nexus-weekly/week-2.mdx +20 -0
- package/content/series/ai-nexus-weekly/week-3.mdx +20 -0
- package/content/series/ai-nexus-weekly/week-4.mdx +20 -0
- package/content/series/ai-nexus-weekly/week-5.mdx +20 -0
- package/content/series/ai-nexus-weekly/week-6.mdx +20 -0
- package/content/series/ai-nexus-weekly/week-7.mdx +20 -0
- package/content/series/ai-nexus-weekly/week-8.mdx +20 -0
- package/content/series/ai-nexus-weekly/week-9.mdx +20 -0
- package/content/series/digital-garden/01-philosophy/index.mdx +23 -0
- package/content/series/digital-garden/01-philosophy.mdx +30 -0
- package/content/series/digital-garden/02-architecture.mdx +19 -0
- package/content/series/digital-garden/index.mdx +11 -0
- package/content/series/markdown-showcase/index.mdx +11 -0
- package/content/series/markdown-showcase/mathematical-notation.mdx +32 -0
- package/content/series/markdown-showcase/syntax-highlighting.mdx +119 -0
- package/content/series/markdown-showcase/visuals-and-diagrams.mdx +27 -0
- package/content/series/nextjs-deep-dive/01-getting-started.mdx +66 -0
- package/content/series/nextjs-deep-dive/02-routing-mastery/assets/diagram.svg +8 -0
- package/content/series/nextjs-deep-dive/02-routing-mastery/assets/m-p-model.png +0 -0
- package/content/series/nextjs-deep-dive/02-routing-mastery/index.mdx +138 -0
- package/content/series/nextjs-deep-dive/index.mdx +12 -0
- package/docs/ARCHITECTURE.md +103 -0
- package/docs/CONTRIBUTING.md +86 -0
- package/docs/deployment.md +319 -0
- package/eslint.config.mjs +18 -0
- package/next.config.ts +25 -0
- package/package.json +81 -0
- package/postcss.config.mjs +7 -0
- package/public/file.svg +1 -0
- package/public/globe.svg +1 -0
- package/public/icon.svg +9 -0
- package/public/logo.svg +11 -0
- package/public/next-image-export-optimizer-hashes.json +7 -0
- package/public/next.svg +1 -0
- package/public/screenshot.png +0 -0
- package/public/vercel.svg +1 -0
- package/public/window.svg +1 -0
- package/scripts/copy-assets.ts +211 -0
- package/scripts/new-flow.ts +47 -0
- package/scripts/new-from-images.ts +141 -0
- package/scripts/new-from-pdf.ts +105 -0
- package/scripts/new-post.ts +98 -0
- package/scripts/new-series.ts +40 -0
- package/scripts/series-draft.ts +136 -0
- package/site.config.ts +91 -0
- package/src/app/[slug]/page.tsx +67 -0
- package/src/app/archive/page.tsx +147 -0
- package/src/app/authors/[author]/page.tsx +210 -0
- package/src/app/books/[slug]/[chapter]/page.tsx +54 -0
- package/src/app/books/[slug]/page.tsx +156 -0
- package/src/app/books/page.tsx +63 -0
- package/src/app/favicon.ico +0 -0
- package/src/app/feed.xml/route.ts +44 -0
- package/src/app/flows/[year]/[month]/[day]/page.tsx +105 -0
- package/src/app/flows/[year]/[month]/page.tsx +72 -0
- package/src/app/flows/[year]/page.tsx +82 -0
- package/src/app/flows/page/[page]/page.tsx +63 -0
- package/src/app/flows/page.tsx +38 -0
- package/src/app/globals.css +406 -0
- package/src/app/layout.tsx +114 -0
- package/src/app/page/[page]/page.tsx +60 -0
- package/src/app/page.tsx +110 -0
- package/src/app/posts/[slug]/page.tsx +119 -0
- package/src/app/posts/page/[page]/page.tsx +58 -0
- package/src/app/posts/page.tsx +40 -0
- package/src/app/search.json/route.ts +49 -0
- package/src/app/series/[slug]/page/[page]/page.tsx +141 -0
- package/src/app/series/[slug]/page.tsx +139 -0
- package/src/app/series/page.tsx +96 -0
- package/src/app/sitemap.ts +112 -0
- package/src/app/tags/[tag]/page.tsx +76 -0
- package/src/app/tags/page.tsx +37 -0
- package/src/components/Analytics.tsx +49 -0
- package/src/components/AuthorStats.tsx +34 -0
- package/src/components/BookMobileNav.tsx +171 -0
- package/src/components/BookSidebar.tsx +275 -0
- package/src/components/CodeBlock.tsx +110 -0
- package/src/components/Comments.tsx +63 -0
- package/src/components/CoverImage.tsx +93 -0
- package/src/components/CuratedSeriesSection.tsx +124 -0
- package/src/components/ExternalLinks.tsx +45 -0
- package/src/components/FeaturedStoriesSection.tsx +106 -0
- package/src/components/FlowCalendarSidebar.tsx +249 -0
- package/src/components/FlowContent.tsx +96 -0
- package/src/components/FlowTimelineEntry.tsx +34 -0
- package/src/components/Footer.tsx +104 -0
- package/src/components/Hero.tsx +126 -0
- package/src/components/HorizontalScroll.tsx +128 -0
- package/src/components/LanguageProvider.tsx +80 -0
- package/src/components/LanguageSwitch.tsx +17 -0
- package/src/components/LatestWritingSection.tsx +45 -0
- package/src/components/MarkdownRenderer.tsx +135 -0
- package/src/components/Mermaid.tsx +89 -0
- package/src/components/Navbar.tsx +243 -0
- package/src/components/PageHeader.tsx +39 -0
- package/src/components/Pagination.tsx +120 -0
- package/src/components/PostCard.tsx +30 -0
- package/src/components/PostList.tsx +104 -0
- package/src/components/PostSidebar.tsx +225 -0
- package/src/components/ReadingProgressBar.tsx +37 -0
- package/src/components/RecentNotesSection.tsx +56 -0
- package/src/components/RelatedPosts.tsx +34 -0
- package/src/components/Search.tsx +151 -0
- package/src/components/SelectedBooksSection.tsx +80 -0
- package/src/components/SeriesCatalog.tsx +112 -0
- package/src/components/SeriesList.tsx +167 -0
- package/src/components/SeriesSidebar.tsx +132 -0
- package/src/components/SimpleLayoutHeader.tsx +38 -0
- package/src/components/Skeleton.tsx +131 -0
- package/src/components/TableOfContents.tsx +158 -0
- package/src/components/Tag.tsx +47 -0
- package/src/components/TagPageHeader.tsx +38 -0
- package/src/components/ThemeProvider.tsx +12 -0
- package/src/components/ThemeToggle.tsx +68 -0
- package/src/components/TranslatedText.tsx +13 -0
- package/src/fonts/Inter-Bold.woff2 +0 -0
- package/src/fonts/Inter-Regular.woff2 +0 -0
- package/src/fonts/LibreBaskerville-Bold.ttf +0 -0
- package/src/fonts/LibreBaskerville-Italic.ttf +0 -0
- package/src/fonts/LibreBaskerville-Regular.ttf +0 -0
- package/src/i18n/translations.ts +135 -0
- package/src/layouts/BookLayout.tsx +109 -0
- package/src/layouts/PostLayout.tsx +118 -0
- package/src/layouts/SimpleLayout.tsx +31 -0
- package/src/lib/i18n.ts +35 -0
- package/src/lib/markdown.test.ts +127 -0
- package/src/lib/markdown.ts +1067 -0
- package/src/lib/rehype-image-metadata.ts +54 -0
- package/src/lib/shuffle.ts +11 -0
- package/templates/default.mdx +13 -0
- package/tests/e2e/navigation.test.ts +51 -0
- package/tests/e2e/series-routes.test.ts +63 -0
- package/tests/e2e/smoke.test.ts +19 -0
- package/tests/integration/markdown-features.test.ts +54 -0
- package/tests/integration/posts.test.ts +57 -0
- package/tests/integration/reading-time-headings.test.ts +79 -0
- package/tests/integration/series-draft.test.ts +46 -0
- package/tests/integration/series.test.ts +79 -0
- package/tests/tooling/new-from-images.test.ts +173 -0
- package/tests/tooling/new-post.test.ts +72 -0
- package/tsconfig.json +34 -0
|
@@ -0,0 +1,78 @@
|
|
|
1
|
+
---
|
|
2
|
+
title: "Markdown Features Test"
|
|
3
|
+
date: "2026-01-16"
|
|
4
|
+
excerpt: "Testing tables, task lists, and other GFM features."
|
|
5
|
+
category: "Test"
|
|
6
|
+
tags: ["markdown", "gfm"]
|
|
7
|
+
author: "Tester"
|
|
8
|
+
coverImage: "text:Markdown"
|
|
9
|
+
featured: true
|
|
10
|
+
---
|
|
11
|
+
|
|
12
|
+
# Extended Markdown Features
|
|
13
|
+
|
|
14
|
+
This post tests GitHub Flavored Markdown (GFM) support.
|
|
15
|
+
|
|
16
|
+
## Tables
|
|
17
|
+
|
|
18
|
+
| Feature | Supported | Notes |
|
|
19
|
+
| :--- | :---: | :--- |
|
|
20
|
+
| Tables | Yes | Requires remark-gfm |
|
|
21
|
+
| Task Lists | Yes | Checkboxes |
|
|
22
|
+
| Strikethrough | Yes | ~~Deleted~~ |
|
|
23
|
+
|
|
24
|
+
## Footnotes
|
|
25
|
+
|
|
26
|
+
Here is a simple footnote[^1].
|
|
27
|
+
|
|
28
|
+
## Wide Table Test
|
|
29
|
+
|
|
30
|
+
Testing horizontal scrolling for very wide tables with extensive content.
|
|
31
|
+
|
|
32
|
+
| ID | Data Column 1 | Data Column 2 | Data Column 3 | Data Column 4 | Data Column 5 | Data Column 6 | Data Column 7 | Data Column 8 | Data Column 9 | Data Column 10 | Data Column 11 | Data Column 12 | Data Column 13 | Data Column 14 |
|
|
33
|
+
| :--- | :--- | :--- | :--- | :--- | :--- | :--- | :--- | :--- | :--- | :--- | :--- | :--- | :--- | :--- |
|
|
34
|
+
| 001 | Extremely long description for testing purposes | Validating responsive behavior | Content overflow check | Column four data | Column five data | Column six data | Column seven data | Column eight data | Column nine data | Column ten data | Column eleven data | Column twelve data | Column thirteen data | Column fourteen data |
|
|
35
|
+
| 002 | Another long entry to see how it wraps or scrolls | Consistency verification | More test data here | Row two col four | Row two col five | Row two col six | Row two col seven | Row two col eight | Row two col nine | Row two col ten | Row two col eleven | Row two col twelve | Row two col thirteen | Row two col fourteen |
|
|
36
|
+
|
|
37
|
+
## Links
|
|
38
|
+
|
|
39
|
+
Standard inline link: [Next.js Website](https://nextjs.org)
|
|
40
|
+
|
|
41
|
+
Reference-style link: [Amytis GitHub][repo]
|
|
42
|
+
|
|
43
|
+
Autolinks (GFM): https://google.com and www.github.com
|
|
44
|
+
|
|
45
|
+
[repo]: https://github.com/vercel/next.js
|
|
46
|
+
|
|
47
|
+
## More Reference Links
|
|
48
|
+
|
|
49
|
+
Here are some search engines: [Google][google], [Yahoo][yahoo], and [Bing][bing].
|
|
50
|
+
|
|
51
|
+
[google]: https://google.com "Google Search"
|
|
52
|
+
[yahoo]: https://yahoo.com
|
|
53
|
+
[bing]: https://bing.com
|
|
54
|
+
|
|
55
|
+
## Footnotes(big)
|
|
56
|
+
|
|
57
|
+
And here is a longer one[^bignote].
|
|
58
|
+
|
|
59
|
+
## Task List
|
|
60
|
+
|
|
61
|
+
- [x] Install remark-gfm
|
|
62
|
+
- [x] Configure ReactMarkdown
|
|
63
|
+
- [ ] Verify rendering
|
|
64
|
+
|
|
65
|
+
## Strikethrough
|
|
66
|
+
|
|
67
|
+
This text is ~~struck through~~.
|
|
68
|
+
|
|
69
|
+
## Autolink literals
|
|
70
|
+
|
|
71
|
+
[^1]: This is the first footnote.
|
|
72
|
+
[^bignote]: Here's one with multiple paragraphs and code.
|
|
73
|
+
|
|
74
|
+
Indent paragraphs to include them in the footnote.
|
|
75
|
+
|
|
76
|
+
`{ code }`
|
|
77
|
+
|
|
78
|
+
Add as many paragraphs as you like.
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
---
|
|
2
|
+
title: "Modern CSS Layouts"
|
|
3
|
+
date: "2026-01-03"
|
|
4
|
+
category: "Design"
|
|
5
|
+
tags: ["css", "frontend", "layout"]
|
|
6
|
+
author: "UI Designer"
|
|
7
|
+
---
|
|
8
|
+
|
|
9
|
+
CSS has come a long way. Today we primarily use Grid and Flexbox.
|
|
10
|
+
|
|
11
|
+
## Flexbox
|
|
12
|
+
|
|
13
|
+
Best for **1-dimensional** layouts (rows OR columns).
|
|
14
|
+
|
|
15
|
+
```css
|
|
16
|
+
.container {
|
|
17
|
+
display: flex;
|
|
18
|
+
justify-content: center;
|
|
19
|
+
align-items: center;
|
|
20
|
+
}
|
|
21
|
+
```
|
|
22
|
+
|
|
23
|
+
## CSS Grid
|
|
24
|
+
|
|
25
|
+
Best for **2-dimensional** layouts (rows AND columns).
|
|
26
|
+
|
|
27
|
+
```css
|
|
28
|
+
.grid-container {
|
|
29
|
+
display: grid;
|
|
30
|
+
grid-template-columns: repeat(3, 1fr);
|
|
31
|
+
gap: 20px;
|
|
32
|
+
}
|
|
33
|
+
```
|
|
34
|
+
|
|
35
|
+
## Decision Tree
|
|
36
|
+
|
|
37
|
+
```mermaid
|
|
38
|
+
graph TD
|
|
39
|
+
A[Start Layout] --> B{One Direction?}
|
|
40
|
+
B -- Yes --> C[Use Flexbox]
|
|
41
|
+
B -- No --> D{Two Directions?}
|
|
42
|
+
D -- Yes --> E[Use CSS Grid]
|
|
43
|
+
C --> F[Align Content]
|
|
44
|
+
E --> F
|
|
45
|
+
```
|
|
@@ -0,0 +1,124 @@
|
|
|
1
|
+
---
|
|
2
|
+
title: "多语言测试并且要测试以下超长的标题看如何处理,如果太长的话要考虑方案: Amytis Digital Garden"
|
|
3
|
+
date: "2026-01-26"
|
|
4
|
+
excerpt: "这是一个用于测试多语言支持的文档,包含了中文、英文以及代码块。通过增加更多标题和内容,测试目录的滚动和链接功能。"
|
|
5
|
+
category: "测试"
|
|
6
|
+
tags: ["chinese", "multilingual", "test"]
|
|
7
|
+
authors: ["Amytis Team"]
|
|
8
|
+
latex: true
|
|
9
|
+
featured: true
|
|
10
|
+
coverImage: "text:Multilingual"
|
|
11
|
+
---
|
|
12
|
+
|
|
13
|
+
# 欢迎来到数字花园
|
|
14
|
+
|
|
15
|
+
这是一个结合了 **中文** 和 *English* 的测试页面。我们致力于提供最优质的阅读体验。
|
|
16
|
+
|
|
17
|
+
## 核心特性 (Core Features)
|
|
18
|
+
|
|
19
|
+
### 1. 自动生成目录 (TOC)
|
|
20
|
+
|
|
21
|
+
该部分用于测试中文标题是否能正确生成 ID 并在侧边栏中点击跳转。
|
|
22
|
+
|
|
23
|
+
### 2. 代码高亮 (Syntax Highlighting)
|
|
24
|
+
|
|
25
|
+
支持多种编程语言的高亮显示。
|
|
26
|
+
|
|
27
|
+
```typescript
|
|
28
|
+
// 这是一个 TypeScript 示例
|
|
29
|
+
function greet(name: string): string {
|
|
30
|
+
return `你好, ${name}! Welcome to Amytis.`;
|
|
31
|
+
}
|
|
32
|
+
```
|
|
33
|
+
|
|
34
|
+
```rust
|
|
35
|
+
// 这是一个 Rust 示例
|
|
36
|
+
fn main() {
|
|
37
|
+
println!("你好,世界!");
|
|
38
|
+
}
|
|
39
|
+
```
|
|
40
|
+
|
|
41
|
+
## 深入探讨 (Deep Dive)
|
|
42
|
+
|
|
43
|
+
### 3. 排版展示 (Typography)
|
|
44
|
+
|
|
45
|
+
中文排版需要考虑字符间距和行高。在 Tailwind v4 中,我们通过 `prose-emerald` 插件来优化视觉效果。
|
|
46
|
+
|
|
47
|
+
这是一段较长的中文测试文本:
|
|
48
|
+
数字花园不仅仅是一个博客,它是一个不断生长的知识库。在这里,每一个节点都可能触发新的思考。我们支持 **加粗**、*斜体*、~~删除线~~ 以及 `行内代码`。
|
|
49
|
+
|
|
50
|
+
### 4. 国际化支持 (I18n)
|
|
51
|
+
|
|
52
|
+
Amytis 旨在支持多种语言的无缝切换(虽然目前主要展示中文支持)。对于 CJK 字符,由于没有空格作为天然的分隔符,目录生成逻辑(slugify)需要特别处理。我们现在使用 `github-slugger` 来确保 ID 生成的一致性。
|
|
53
|
+
|
|
54
|
+
## 复杂图表 (Mermaid)
|
|
55
|
+
|
|
56
|
+
测试 Mermaid 图表中的中文标签是否正常显示。
|
|
57
|
+
|
|
58
|
+
```mermaid
|
|
59
|
+
flowchart LR
|
|
60
|
+
A[开始] --> B{是否成功?}
|
|
61
|
+
B -- 是 --> C[庆祝]
|
|
62
|
+
B -- 否 --> D[调试代码]
|
|
63
|
+
D --> B
|
|
64
|
+
```
|
|
65
|
+
|
|
66
|
+
## 技术实现 (Technical Implementation)
|
|
67
|
+
|
|
68
|
+
### 5. Next.js App Router
|
|
69
|
+
|
|
70
|
+
我们利用 Next.js 15 的强力特性,如静态生成 (SSG) 和 服务器组件 (Server Components)。
|
|
71
|
+
|
|
72
|
+
### 6. Tailwind CSS v4
|
|
73
|
+
|
|
74
|
+
采用最新的 Tailwind CSS v4,利用其高性能的引擎和更简洁的配置。
|
|
75
|
+
|
|
76
|
+
### 7. 静态站点导出 (Static Export)
|
|
77
|
+
|
|
78
|
+
由于我们需要将站点部署在 GitHub Pages 或类似的静态托管服务上,我们使用了 `output: 'export'`。
|
|
79
|
+
|
|
80
|
+
## 数学公式 (LaTeX)
|
|
81
|
+
|
|
82
|
+
支持行内公式 $E=mc^2$ 以及块级公式:
|
|
83
|
+
|
|
84
|
+
$$
|
|
85
|
+
\frac{-b \pm \sqrt{b^2 - 4ac}}{2a}
|
|
86
|
+
$$
|
|
87
|
+
|
|
88
|
+
## 更多测试章节 (Extended Sections)
|
|
89
|
+
|
|
90
|
+
### 8. 列表测试 (Lists)
|
|
91
|
+
|
|
92
|
+
- 无序列表项一 (Unordered Item 1)
|
|
93
|
+
- 无序列表项二 (Unordered Item 2)
|
|
94
|
+
- 嵌套项 (Nested Item)
|
|
95
|
+
- 嵌套项二 (Nested Item 2)
|
|
96
|
+
|
|
97
|
+
1. 有序列表项一 (Ordered Item 1)
|
|
98
|
+
2. 有序列表项二 (Ordered Item 2)
|
|
99
|
+
|
|
100
|
+
### 9. 引用块 (Blockquotes)
|
|
101
|
+
|
|
102
|
+
> 这是一个带有作者信息的引用块。数字花园的概念最早由 Mike Caulfield 提出,强调知识的非线性和持续演进。
|
|
103
|
+
|
|
104
|
+
### 10. 脚注测试
|
|
105
|
+
|
|
106
|
+
我们可以为某些词汇添加脚注[^1]。
|
|
107
|
+
|
|
108
|
+
[^1]: 这是一个中文脚注的示例。
|
|
109
|
+
|
|
110
|
+
## 未来展望 (Future Roadmap)
|
|
111
|
+
|
|
112
|
+
### 11. 搜索功能增强
|
|
113
|
+
|
|
114
|
+
我们将集成模糊搜索,支持中文分词,提升搜索体验。
|
|
115
|
+
|
|
116
|
+
### 12. 更多主题色
|
|
117
|
+
|
|
118
|
+
除了现在的翡翠色 (Emerald),我们还计划支持琥珀色 (Amber) 和 玫瑰色 (Rose)。
|
|
119
|
+
|
|
120
|
+
## 总结
|
|
121
|
+
|
|
122
|
+
多语言支持对于数字花园至关重要。
|
|
123
|
+
|
|
124
|
+
> "语言的边界就是世界的边界。" — 维特根斯坦
|