create-riebeckite 0.0.19 → 0.0.21

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 (45) hide show
  1. package/README.md +3 -3
  2. package/README_ja.md +1 -1
  3. package/dist/src/index.js +24 -24
  4. package/dist/src/scaffold/index.js +24 -24
  5. package/dist/src/scaffold/version.d.ts +1 -1
  6. package/dist/src/scaffold/wrangler-defaults.d.ts +1 -1
  7. package/package.json +2 -2
  8. package/templates/scaffold/base/app/global.d.ts +9 -3
  9. package/templates/scaffold/base/app/server.ts +2 -2
  10. package/templates/scaffold/base/vite.config.ts +3 -25
  11. package/templates/scaffold/presets/empty/app/routes/_404.tsx +18 -0
  12. package/templates/scaffold/presets/empty/app/routes/_renderer.tsx +1 -1
  13. package/templates/scaffold/presets/empty/app/routes/index.tsx +1 -1
  14. package/templates/scaffold/presets/empty/app/style.css +11 -0
  15. package/templates/scaffold/presets/minimal/app/routes/[slug{.+}].tsx +13 -32
  16. package/templates/scaffold/presets/minimal/app/routes/_404.tsx +18 -0
  17. package/templates/scaffold/presets/minimal/app/routes/_renderer.tsx +17 -53
  18. package/templates/scaffold/presets/minimal/app/routes/index.tsx +9 -19
  19. package/templates/scaffold/presets/minimal/app/style.css +13 -21
  20. package/templates/scaffold/presets/minimal/content/index.en.md +16 -6
  21. package/templates/scaffold/presets/showcase/app/components/site-header.tsx +10 -64
  22. package/templates/scaffold/presets/showcase/app/routes/[slug{.+}].tsx +15 -34
  23. package/templates/scaffold/presets/showcase/app/routes/_404.tsx +18 -0
  24. package/templates/scaffold/presets/showcase/app/routes/_renderer.tsx +31 -49
  25. package/templates/scaffold/presets/showcase/app/routes/index.tsx +19 -25
  26. package/templates/scaffold/presets/showcase/app/style.css +26 -42
  27. package/templates/scaffold/presets/showcase/content/Daily/2026-09-28.md +8 -0
  28. package/templates/scaffold/presets/showcase/content/Daily/2026-09-30.md +8 -0
  29. package/templates/scaffold/presets/showcase/content/Daily/2026-10-02.md +11 -0
  30. package/templates/scaffold/presets/showcase/content/index.de.md +16 -5
  31. package/templates/scaffold/presets/showcase/content/index.en.md +16 -5
  32. package/templates/scaffold/presets/showcase/content/index.es.md +16 -5
  33. package/templates/scaffold/presets/showcase/content/index.fr.md +16 -5
  34. package/templates/scaffold/presets/showcase/content/index.ja.md +16 -5
  35. package/templates/scaffold/presets/showcase/content/index.ko.md +16 -5
  36. package/templates/scaffold/presets/showcase/content/index.zh-CN.md +16 -5
  37. package/templates/scaffold/presets/starter/app/components/site-header.tsx +10 -64
  38. package/templates/scaffold/presets/starter/app/routes/[slug{.+}].tsx +15 -34
  39. package/templates/scaffold/presets/starter/app/routes/_404.tsx +18 -0
  40. package/templates/scaffold/presets/starter/app/routes/_renderer.tsx +31 -49
  41. package/templates/scaffold/presets/starter/app/routes/index.tsx +17 -25
  42. package/templates/scaffold/presets/starter/app/style.css +26 -42
  43. package/templates/scaffold/base/app/config.ts +0 -18
  44. package/templates/scaffold/base/app/constants/paths.ts +0 -10
  45. package/templates/scaffold/base/app/content.ts +0 -12
@@ -1,3 +1,4 @@
1
+ @import "./.riebeckite/framework-styles.css";
1
2
  @import "./.riebeckite/plugin-styles.css";
2
3
  @import "./.riebeckite/theme-styles.css";
3
4
 
@@ -21,6 +22,17 @@ body {
21
22
  padding-block: var(--rb-space-8, 4rem);
22
23
  }
23
24
 
25
+ .riebeckite-main {
26
+ display: flex;
27
+ width: 100%;
28
+ flex-direction: column;
29
+ align-items: center;
30
+ }
31
+
32
+ .riebeckite-main:has(> .not-found) {
33
+ flex: 1 1 auto;
34
+ }
35
+
24
36
  .site-header {
25
37
  display: flex;
26
38
  align-items: center;
@@ -31,7 +43,7 @@ body {
31
43
 
32
44
  .site-header,
33
45
  .rb-site-footer {
34
- width: min(100% - 2rem, var(--rb-layout-article-max, 48rem));
46
+ width: min(100% - 2rem, var(--rb-layout-page-max, 80rem));
35
47
  }
36
48
 
37
49
  .site-header__home {
@@ -48,17 +60,10 @@ body {
48
60
  color: var(--rb-color-ink);
49
61
  }
50
62
 
51
- .rb-nav__list {
63
+ .rb-nav > .rb-nav__list {
52
64
  display: flex;
53
65
  align-items: center;
54
66
  gap: var(--rb-space-3, 1.5rem);
55
- margin: 0;
56
- padding: 0;
57
- list-style: none;
58
- }
59
-
60
- .rb-nav__item {
61
- position: relative;
62
67
  }
63
68
 
64
69
  .rb-nav__link {
@@ -79,23 +84,11 @@ body {
79
84
  }
80
85
 
81
86
  .rb-nav__children {
82
- display: none;
83
- position: absolute;
84
- top: 100%;
85
- left: 0;
86
- min-width: max-content;
87
87
  padding: var(--rb-space-2, 1rem);
88
88
  background: var(--rb-color-surface);
89
89
  border: 1px solid var(--rb-color-border);
90
90
  }
91
91
 
92
- .rb-nav__item:hover > .rb-nav__children,
93
- .rb-nav__item:focus-within > .rb-nav__children {
94
- display: flex;
95
- flex-direction: column;
96
- align-items: stretch;
97
- }
98
-
99
92
  .rb-nav__mobile {
100
93
  display: none;
101
94
  }
@@ -171,13 +164,6 @@ body {
171
164
  margin: 0 auto;
172
165
  }
173
166
 
174
- .rb-article-layout {
175
- display: grid;
176
- grid-template-columns: minmax(0, var(--rb-layout-article-max, 48rem));
177
- justify-content: center;
178
- column-gap: var(--rb-layout-gap, 2rem);
179
- }
180
-
181
167
  .rb-article-body,
182
168
  .site-article__footer {
183
169
  min-width: 0;
@@ -189,16 +175,6 @@ body {
189
175
  }
190
176
 
191
177
  @media (min-width: 88rem) {
192
- :is(:root, .rb-theme-root)[data-article-layout="article"] .rb-article-layout {
193
- grid-template-columns: minmax(0, var(--rb-layout-article-max, 48rem));
194
- position: relative;
195
- }
196
-
197
- :is(:root, .rb-theme-root)[data-article-layout="article"] .rb-article-body {
198
- grid-column: 1;
199
- grid-row: 1;
200
- }
201
-
202
178
  :is(:root, .rb-theme-root)[data-article-layout="article"] .site-article__footer {
203
179
  grid-column: 1;
204
180
  }
@@ -207,18 +183,26 @@ body {
207
183
  display: block;
208
184
  grid-column: 1;
209
185
  grid-row: 1;
210
- position: sticky;
211
- top: 4rem;
212
186
  align-self: start;
213
187
  width: var(--rb-layout-sidebar, 14rem);
214
- max-height: calc(100dvh - 8rem);
215
188
  margin-inline-start: calc(
216
189
  -1 * var(--rb-layout-sidebar, 14rem) -
217
190
  var(--rb-layout-gap, 2rem)
218
191
  );
219
- overflow: auto;
220
192
  padding-inline-end: 1rem;
221
193
  border-inline-end: 1px solid
222
194
  color-mix(in oklab, currentColor 18%, transparent);
223
195
  }
224
196
  }
197
+
198
+ .not-found {
199
+ width: min(100% - 2rem, var(--rb-layout-article-max, 48rem));
200
+ margin-block: auto;
201
+ padding-block: 2rem;
202
+ }
203
+
204
+ .not-found__status {
205
+ margin: 0;
206
+ color: var(--rb-color-accent);
207
+ font-weight: 700;
208
+ }
@@ -0,0 +1,8 @@
1
+ ---
2
+ daily-summary: Sketched the site structure and chose the plugins to put on the tour.
3
+ publish: true
4
+ ---
5
+
6
+ # 2026-09-28
7
+
8
+ A first pass at the plugin tour. The framework pages render the catalog, so these notes only need to point at what changed.
@@ -0,0 +1,8 @@
1
+ ---
2
+ daily-summary: Linked the demo notes so backlinks, related posts, and the series all have something to show.
3
+ publish: true
4
+ ---
5
+
6
+ # 2026-09-30
7
+
8
+ Connected the two demo notes under `content/demo/`. Discovery features need at least two related notes before they are worth looking at.
@@ -0,0 +1,11 @@
1
+ ---
2
+ publish: true
3
+ ---
4
+
5
+ # 2026-10-02
6
+
7
+ ```daily-snippet
8
+ Daily Note snippets can come from frontmatter, a heading, or a fenced code block like this one.
9
+ ```
10
+
11
+ Open `content/Daily/` and the Daily Notes widget on the home page picks up the newest notes.
@@ -3,15 +3,26 @@ publish: true
3
3
  ---
4
4
 
5
5
  # {{title}}
6
- Willkommen auf deiner Riebeckite-Seite.
7
- Jede Seite dieses Starters ist in sieben Sprachen verfügbar. Wechsel mit dem Auswahlfeld unter dem Seitentitel.
8
- ## Was ist Riebeckite?
9
- Riebeckite ist ein erweiterbares, inhaltsorientiertes Framework, das schnelle statische Seiten aus einfachem Markdown baut — denselben Notizen, die du in Obsidian führst. Das Ökosystem umfasst 50+ Plugins und sechs Themes; diese Seite demonstriert beides.
6
+
7
+ Willkommen auf deiner Riebeckite-Seite. Dieses Preset ist ein Rundgang: Es registriert den vollständigen Plugin-Katalog von Riebeckite und legt Inhalte an, die jede Fähigkeit sichtbar machen.
8
+
10
9
  ## Weiter erkunden
10
+
11
11
  - [Plugins — repräsentative Pakete nach Fähigkeit](/framework/plugins)
12
12
  - [Themes — mitgelieferte Design-Pakete und wie man wechselt](/framework/themes)
13
13
  - [Working examples](/examples/)
14
14
  - [Plugin reference](/reference/plugins/)
15
+
16
+ ## Was ist Riebeckite?
17
+
18
+ Riebeckite ist ein erweiterbares, inhaltsorientiertes Framework, das schnelle statische Seiten aus einfachem Markdown baut — denselben Notizen, die du in Obsidian führst. Es enthält 50+ Plugins und sechs Themes; diese Seite demonstriert beides.
19
+
15
20
  ## Diese Seite bearbeiten
16
- Inhalte liegen als einfaches Markdown in `content/`. Füge eine Datei hinzu, setze `publish: true` ins Frontmatter, und sie erscheint in der gebauten Seite.
21
+
22
+ Inhalte liegen als einfaches Markdown in `content/`. Füge eine Datei hinzu, setze `publish: true` ins Frontmatter, und sie erscheint in der gebauten Seite. Die Notizen unter `content/Daily/` speisen das Daily-Notes-Widget auf dieser Seite.
23
+
24
+ Diese Seite ist in sieben Sprachen verfügbar: Startseite, examples und framework-Seiten sind übersetzt, während guide und die Plugin-/Theme-Referenzen auf Englisch bleiben. Wechsel mit dem Auswahlfeld unter dem Seitentitel.
25
+
17
26
  Übersetzte Seiten folgen der Konvention `<base>.<lang>.md` neben der Standarddatei (z. B. `about.ja.md`). Das l10n-Plugin liefert sie unter `/lang/`-Pfaden und verlinkt sie automatisch.
27
+
28
+ Öffne `riebeckite.config.ts`, um jedes registrierte Plugin und seine Optionen zu sehen.
@@ -3,15 +3,26 @@ publish: true
3
3
  ---
4
4
 
5
5
  # {{title}}
6
- Welcome to your Riebeckite site.
7
- Every page of this starter is available in seven languages. Switch with the selector below the page title.
8
- ## What is Riebeckite?
9
- Riebeckite is an extensible, content-first framework that builds fast static sites from plain Markdown — the same notes you keep in Obsidian. The ecosystem includes 50+ plugins and six themes, and this site demos both.
6
+
7
+ Welcome to your Riebeckite site. This preset is a tour: it registers the complete Riebeckite plugin catalog and ships content that puts each capability on screen.
8
+
10
9
  ## Explore
10
+
11
11
  - [Plugins — representative packages grouped by capability](/framework/plugins)
12
12
  - [Themes — built-in design packages and how to switch](/framework/themes)
13
13
  - [Working examples](/examples/)
14
14
  - [Plugin reference](/reference/plugins/)
15
+
16
+ ## What is Riebeckite?
17
+
18
+ Riebeckite is an extensible, content-first framework that builds fast static sites from plain Markdown — the same notes you keep in Obsidian. It ships 50+ plugins and six themes, and this site demonstrates both.
19
+
15
20
  ## Edit this site
16
- Content lives in `content/` as plain Markdown. Add a file, give it `publish: true` in the frontmatter, and it appears in the built site.
21
+
22
+ Content lives in `content/` as plain Markdown. Add a file, give it `publish: true` in the frontmatter, and it appears in the built site. The notes under `content/Daily/` feed the Daily Notes widget on this page.
23
+
24
+ This site is available in seven languages: the home page, examples, and framework pages are translated, while the guide and plugin/theme reference pages stay in English. Switch with the selector below the page title.
25
+
17
26
  Localized pages use the `<base>.<lang>.md` convention next to the default file — for example `about.ja.md`. The l10n plugin serves them under `/lang/` paths and links them automatically.
27
+
28
+ Open `riebeckite.config.ts` to see every registered plugin and its options.
@@ -3,15 +3,26 @@ publish: true
3
3
  ---
4
4
 
5
5
  # {{title}}
6
- Bienvenido a tu sitio Riebeckite.
7
- Cada página de este starter está disponible en siete idiomas. Cámbialos con el selector bajo el título.
8
- ## ¿Qué es Riebeckite?
9
- Riebeckite es un framework extensible y orientado al contenido que construye sitios estáticos rápidos desde Markdown simple — las mismas notas que guardas en Obsidian. El ecosistema incluye más de 50 plugins y seis temas; este sitio demuestra ambos.
6
+
7
+ Bienvenido a tu sitio Riebeckite. Este preset es un recorrido: registra el catálogo completo de plugins que incluye Riebeckite y prepara contenido para mostrar cada capacidad en pantalla.
8
+
10
9
  ## Explorar
10
+
11
11
  - [Plugins — paquetes representativos por capacidad](/framework/plugins)
12
12
  - [Temas — paquetes de diseño incluidos y cómo cambiar](/framework/themes)
13
13
  - [Working examples](/examples/)
14
14
  - [Plugin reference](/reference/plugins/)
15
+
16
+ ## ¿Qué es Riebeckite?
17
+
18
+ Riebeckite es un framework extensible y orientado al contenido que construye sitios estáticos rápidos desde Markdown simple — las mismas notas que guardas en Obsidian. Incluye más de 50 plugins y seis temas; este sitio demuestra ambos.
19
+
15
20
  ## Editar este sitio
16
- El contenido vive en `content/` como Markdown simple. Añade un archivo, pon `publish: true` en el frontmatter y aparecerá en el sitio compilado.
21
+
22
+ El contenido vive en `content/` como Markdown simple. Añade un archivo, pon `publish: true` en el frontmatter y aparecerá en el sitio compilado. Las notas de `content/Daily/` alimentan el widget Daily Notes de esta página.
23
+
24
+ Este sitio está disponible en siete idiomas: la página de inicio, examples y las páginas framework están traducidas, mientras que guide y las páginas de referencia de plugins y temas permanecen en inglés. Cámbialos con el selector bajo el título.
25
+
17
26
  Las páginas localizadas usan la convención `<base>.<lang>.md` junto al archivo por defecto (p. ej. `about.ja.md`). El plugin l10n las sirve bajo rutas `/lang/` y las enlaza automáticamente.
27
+
28
+ Abre `riebeckite.config.ts` para ver cada plugin registrado y sus opciones.
@@ -3,15 +3,26 @@ publish: true
3
3
  ---
4
4
 
5
5
  # {{title}}
6
- Bienvenue sur votre site Riebeckite.
7
- Chaque page de ce starter est disponible en sept langues. Changez avec le sélecteur sous le titre.
8
- ## Qu'est-ce que Riebeckite ?
9
- Riebeckite est un framework extensible et centré sur le contenu qui construit des sites statiques rapides à partir de Markdown simple — les mêmes notes que vous gardez dans Obsidian. L'écosystème inclut plus de 50 plugins et six thèmes ; ce site en démontre les deux.
6
+
7
+ Bienvenue sur votre site Riebeckite. Ce preset est une visite : il enregistre le catalogue complet des plugins fournis par Riebeckite et prépare du contenu pour montrer chaque capacité à l'écran.
8
+
10
9
  ## Explorer
10
+
11
11
  - [Plugins — paquets représentatifs par capacité](/framework/plugins)
12
12
  - [Thèmes — paquets de design inclus et comment changer](/framework/themes)
13
13
  - [Working examples](/examples/)
14
14
  - [Plugin reference](/reference/plugins/)
15
+
16
+ ## Qu'est-ce que Riebeckite ?
17
+
18
+ Riebeckite est un framework extensible et centré sur le contenu qui construit des sites statiques rapides à partir de Markdown simple — les mêmes notes que vous gardez dans Obsidian. Il fournit plus de 50 plugins et six thèmes ; ce site en démontre les deux.
19
+
15
20
  ## Éditer ce site
16
- Le contenu vit dans `content/` en Markdown simple. Ajoutez un fichier, donnez-lui `publish: true` dans le frontmatter, et il apparaîtra dans le site construit.
21
+
22
+ Le contenu vit dans `content/` en Markdown simple. Ajoutez un fichier, donnez-lui `publish: true` dans le frontmatter, et il apparaîtra dans le site construit. Les notes de `content/Daily/` alimentent le widget Daily Notes de cette page.
23
+
24
+ Ce site est disponible en sept langues : la page d'accueil, examples et les pages framework sont traduites, tandis que guide et les pages de référence des plugins et des thèmes restent en anglais. Changez avec le sélecteur sous le titre.
25
+
17
26
  Les pages localisées suivent la convention `<base>.<lang>.md` à côté du fichier par défaut (ex. `about.ja.md`). Le plugin l10n les sert sous des chemins `/lang/` et les relie automatiquement.
27
+
28
+ Ouvrez `riebeckite.config.ts` pour voir chaque plugin enregistré et ses options.
@@ -3,15 +3,26 @@ publish: true
3
3
  ---
4
4
 
5
5
  # {{title}}
6
- あなたの Riebeckite サイトへようこそ。
7
- このスターターのすべてのページは 7 言語で利用できます。ページタイトル下のセレクターで切り替えられます。
8
- ## Riebeckite とは
9
- Riebeckite は、プレーンな Markdown(Obsidian で管理しているのと同じノート)から高速な静的サイトを生成する、拡張性のあるコンテンツファーストのフレームワークです。エコシステムには 50 以上のプラグインと 6 つのテーマがあり、このサイトはその両方をデモしています。
6
+
7
+ あなたの Riebeckite サイトへようこそ。この preset はツアーです。Riebeckite が同梱する Plugin カタログをすべて登録し、その機能を画面で確認できるコンテンツを用意しています。
8
+
10
9
  ## さらに深く
10
+
11
11
  - [プラグイン — 機能別の代表的なパッケージ](/framework/plugins)
12
12
  - [テーマ — 同梱のデザインパッケージと切り替え方](/framework/themes)
13
13
  - [Working examples](/examples/)
14
14
  - [Plugin reference](/reference/plugins/)
15
+
16
+ ## Riebeckite とは
17
+
18
+ Riebeckite は、プレーンな Markdown(Obsidian で管理しているのと同じノート)から高速な静的サイトを生成する、拡張性のあるコンテンツファーストのフレームワークです。50 以上の Plugin と 6 つのテーマを同梱しており、このサイトはその両方をデモしています。
19
+
15
20
  ## サイトの編集
16
- コンテンツは `content/` にプレーンな Markdown として置きます。ファイルを追加してフロントマターに `publish: true` を書けば、ビルドされたサイトに反映されます。
21
+
22
+ コンテンツは `content/` にプレーンな Markdown として置きます。ファイルを追加してフロントマターに `publish: true` を書けば、ビルドされたサイトに反映されます。`content/Daily/` のノートは、このページの Daily Notes ウィジェットに表示されます。
23
+
24
+ このサイトは 7 言語で利用できます。ホームページ・examples・framework のページは翻訳され、guide と Plugin/Theme のリファレンスページは英語のままです。ページタイトル下のセレクターで切り替えられます。
25
+
17
26
  翻訳ページは既定ファイルの隣に `<base>.<lang>.md` の命名規則で置きます(例:`about.ja.md`)。l10n プラグインが `/lang/` パスの配下で配信し、自動的にリンクします。
27
+
28
+ 登録されている Plugin とそのオプションは `riebeckite.config.ts` を参照してください。
@@ -3,15 +3,26 @@ publish: true
3
3
  ---
4
4
 
5
5
  # {{title}}
6
- Riebeckite 사이트에 오신 것을 환영합니다.
7
- 이 스타터의 모든 페이지는 7개 언어로 제공됩니다. 페이지 제목 아래 선택기로 전환하세요.
8
- ## Riebeckite란?
9
- Riebeckite는 일반 Markdown(Obsidian에서 관리하는 노트)에서 빠른 정적 사이트를 만드는 확장 가능한 콘텐츠 우선 프레임워크입니다. 생태계에는 50개 이상의 플러그인과 6개 테마가 있으며, 이 사이트가 그 두 가지를 보여줍니다.
6
+
7
+ Riebeckite 사이트에 오신 것을 환영합니다. 이 preset은 투어입니다. Riebeckite가 포함한 전체 플러그인 카탈로그를 등록하고, 각 기능을 화면에서 확인할 수 있는 콘텐츠를 제공합니다.
8
+
10
9
  ## 더 살펴보기
10
+
11
11
  - [플러그인 — 기능별 대표 패키지](/framework/plugins)
12
12
  - [테마 — 내장 디자인 패키지와 전환 방법](/framework/themes)
13
13
  - [Working examples](/examples/)
14
14
  - [Plugin reference](/reference/plugins/)
15
+
16
+ ## Riebeckite란?
17
+
18
+ Riebeckite는 일반 Markdown(Obsidian에서 관리하는 노트)에서 빠른 정적 사이트를 만드는 확장 가능한 콘텐츠 우선 프레임워크입니다. 50개 이상의 플러그인과 6개 테마를 포함하며, 이 사이트가 그 두 가지를 보여줍니다.
19
+
15
20
  ## 사이트 편집
16
- 콘텐츠는 `content/`에 일반 Markdown으로 저장됩니다. 파일을 추가하고 프론트매터에 `publish: true`를 쓰면 빌드된 사이트에 나타납니다.
21
+
22
+ 콘텐츠는 `content/`에 일반 Markdown으로 저장됩니다. 파일을 추가하고 프론트매터에 `publish: true`를 쓰면 빌드된 사이트에 나타납니다. `content/Daily/`의 노트는 이 페이지의 Daily Notes 위젯에 표시됩니다.
23
+
24
+ 이 사이트는 7개 언어로 제공됩니다. 홈페이지, examples, framework 페이지는 번역되어 있고 guide와 플러그인/테마 레퍼런스 페이지는 영어로 유지됩니다. 페이지 제목 아래 선택기로 전환하세요.
25
+
17
26
  번역 페이지는 기본 파일 옆에 `<base>.<lang>.md` 규칙으로 둡니다(예: `about.ja.md`). l10n 플러그인이 `/lang/` 경로로 서빙하며 자동으로 링크합니다.
27
+
28
+ 등록된 플러그인과 옵션은 `riebeckite.config.ts`에서 확인하세요.
@@ -3,15 +3,26 @@ publish: true
3
3
  ---
4
4
 
5
5
  # {{title}}
6
- 欢迎来到你的 Riebeckite 站点。
7
- 本模板的每个页面均提供七种语言版本,可用页面标题下方的选择器切换。
8
- ## 什么是 Riebeckite?
9
- Riebeckite 是一个可扩展、内容优先的框架,可从纯 Markdown(即你在 Obsidian 中保存的笔记)构建快速的静态站点。生态包含 50+ 插件与六个主题,本站点同时演示两者。
6
+
7
+ 欢迎来到你的 Riebeckite 站点。此 preset 是一次导览:它注册了 Riebeckite 随附的完整插件目录,并准备了可在页面上看到各项能力的示例内容。
8
+
10
9
  ## 继续探索
10
+
11
11
  - [插件 — 按能力分组的代表性包](/framework/plugins)
12
12
  - [主题 — 内置设计包与切换方法](/framework/themes)
13
13
  - [Working examples](/examples/)
14
14
  - [Plugin reference](/reference/plugins/)
15
+
16
+ ## 什么是 Riebeckite?
17
+
18
+ Riebeckite 是一个可扩展、内容优先的框架,可从纯 Markdown(即你在 Obsidian 中保存的笔记)构建快速的静态站点。它随附 50+ 插件与六个主题,本站点同时演示两者。
19
+
15
20
  ## 编辑本站点
16
- 内容以纯 Markdown 存于 `content/`。新建文件并在 frontmatter 中写入 `publish: true`,它就会出现在构建后的站点中。
21
+
22
+ 内容以纯 Markdown 存于 `content/`。新建文件并在 frontmatter 中写入 `publish: true`,它就会出现在构建后的站点中。`content/Daily/` 下的笔记会显示在本页的 Daily Notes 小组件中。
23
+
24
+ 本站点提供七种语言:主页、examples 与 framework 页面已翻译,guide 与插件/主题参考页面保持英文。可用页面标题下方的选择器切换。
25
+
17
26
  本地化页面采用默认文件旁的 `<base>.<lang>.md` 命名约定(例如 `about.ja.md`)。l10n 插件会在 `/lang/` 路径下提供服务并自动互链。
27
+
28
+ 已注册的插件及其选项请查看 `riebeckite.config.ts`。
@@ -1,13 +1,16 @@
1
+ import { SiteNav } from "@riebeckite/plugin-navigation";
1
2
  import type { NavigationItem } from "@riebeckite/plugin-navigation";
2
3
  import { ColorModeToggle } from "@riebeckite/plugin-color-mode";
3
- import { config } from "../config";
4
+ import { config } from "virtual:riebeckite/config";
4
5
 
5
6
  export function SiteHeader({
6
7
  path,
7
8
  items,
9
+ language,
8
10
  }: {
9
11
  path: string;
10
12
  items: readonly NavigationItem[];
13
+ language?: string;
11
14
  }) {
12
15
  const navigation = items.filter((item) => item.href !== "/");
13
16
 
@@ -25,10 +28,10 @@ export function SiteHeader({
25
28
  </a>
26
29
  {navigation.length > 0 ? (
27
30
  <>
28
- <SiteNavigation items={navigation} path={path} />
29
- <details class="site-navigation__mobile rb-nav__mobile">
31
+ <SiteNav items={navigation} path={path} language={language} />
32
+ <details class="rb-nav__mobile">
30
33
  <summary class="rb-nav__toggle">Menu</summary>
31
- <SiteNavigation items={navigation} path={path} />
34
+ <SiteNav items={navigation} path={path} language={language} />
32
35
  </details>
33
36
  </>
34
37
  ) : null}
@@ -40,74 +43,17 @@ export function SiteHeader({
40
43
  export function SiteFooter({
41
44
  path,
42
45
  items,
46
+ language,
43
47
  }: {
44
48
  path: string;
45
49
  items: readonly NavigationItem[];
50
+ language?: string;
46
51
  }) {
47
52
  if (items.length === 0) return null;
48
53
 
49
54
  return (
50
55
  <footer class="site-footer rb-site-footer">
51
- <SiteNavigation items={items} path={path} />
56
+ <SiteNav items={items} path={path} language={language} />
52
57
  </footer>
53
58
  );
54
59
  }
55
-
56
- function SiteNavigation({
57
- items,
58
- path,
59
- }: {
60
- items: readonly NavigationItem[];
61
- path: string;
62
- }) {
63
- return (
64
- <nav class="site-navigation rb-nav" aria-label="Site navigation">
65
- <NavigationItems items={items} path={path} />
66
- </nav>
67
- );
68
- }
69
-
70
- function NavigationItems({
71
- items,
72
- path,
73
- isChildList = false,
74
- }: {
75
- items: readonly NavigationItem[];
76
- path: string;
77
- isChildList?: boolean;
78
- }) {
79
- return (
80
- <ul class={isChildList ? "site-navigation__list rb-nav__list rb-nav__children" : "site-navigation__list rb-nav__list"}>
81
- {items.map((item) => {
82
- const active = item.href ? isActive(item.href, path) : false;
83
- return (
84
- <li class="site-navigation__item rb-nav__item">
85
- {item.href ? (
86
- <a
87
- href={item.href}
88
- class={active ? "site-navigation__link rb-nav__link rb-nav__link--active is-active" : "site-navigation__link rb-nav__link"}
89
- aria-current={active ? "page" : undefined}
90
- target={item.external ? "_blank" : undefined}
91
- rel={item.external ? "noreferrer" : undefined}
92
- >
93
- {item.label}
94
- </a>
95
- ) : (
96
- <span class="site-navigation__label rb-nav__label">{item.label}</span>
97
- )}
98
- {item.children && item.children.length > 0 ? (
99
- <NavigationItems items={item.children} path={path} isChildList />
100
- ) : null}
101
- </li>
102
- );
103
- })}
104
- </ul>
105
- );
106
- }
107
-
108
- function isActive(href: string, path: string): boolean {
109
- if (!href.startsWith("/")) return false;
110
- const target = href.replace(/\/+$/, "") || "/";
111
- const current = path.replace(/^\/[a-z]{2}(?:-[A-Z]{2})?(?=\/|$)/, "").replace(/\/+$/, "") || "/";
112
- return target === "/" ? current === target : current === target || current.startsWith(`${target}/`);
113
- }
@@ -1,52 +1,33 @@
1
- import { getEntryLanguage } from "@riebeckite/core";
2
1
  import {
3
2
  contentRouteSsgParams,
4
- pluginPageSsgParams,
5
- resolveRiebeckiteRoute,
3
+ resolveRiebeckiteContentRequest,
4
+ riebeckiteSsgParams,
6
5
  } from "@riebeckite/honox/server";
6
+ import { PageBody } from "@riebeckite/honox/ui";
7
7
  import { extractTableOfContents, TableOfContents } from "@riebeckite/plugin-toc";
8
8
  import { createRoute } from "honox/factory";
9
9
  import { SiteArticle } from "../components/article";
10
- import { content } from "../content";
10
+ import { content } from "virtual:riebeckite/content";
11
11
 
12
12
  export default createRoute(
13
- contentRouteSsgParams("/:slug{.+}", async () => {
14
- const manifest = await content.getManifest();
15
- const contentPaths = manifest.publicEntries
16
- .filter((entry) => entry.permalink !== "/")
17
- .map((entry) => ({ slug: entry.permalink.replace(/^\/+/, "") }));
18
- return [...contentPaths, ...(await pluginPageSsgParams(content))];
19
- }),
13
+ contentRouteSsgParams("/:slug{.+}", () => riebeckiteSsgParams(content)),
20
14
  async (c) => {
21
- const requestedSlug = c.req.param("slug");
22
- if (!requestedSlug) return c.notFound();
23
- if (/\.[a-zA-Z0-9]+$/.test(requestedSlug)) return c.notFound();
15
+ const resolved = await resolveRiebeckiteContentRequest(c, content);
24
16
 
25
- const route = await resolveRiebeckiteRoute(content, c.req.path);
26
- if (!route) return c.notFound();
27
- if (route.kind === "redirect")
28
- return c.redirect(route.location, route.status);
29
- if (route.kind === "page") {
30
- c.set("headTags", route.page.headTags ?? []);
31
- c.set("htmlLanguage", route.page.language);
32
- return c.render(
33
- <div dangerouslySetInnerHTML={{ __html: route.page.body }} />,
34
- );
35
- }
36
-
37
- const post = await content.getProcessedContent(route.entry.slug);
17
+ if (resolved.kind === "response") return resolved.response;
38
18
 
39
- const tableOfContents = extractTableOfContents(post.html ?? "");
19
+ if (resolved.kind === "page") {
20
+ return c.render(<PageBody html={resolved.page.body} />);
21
+ }
40
22
 
41
- c.set("htmlLanguage", getEntryLanguage(route.entry));
42
- c.set("headTags", route.entry.headTags ?? []);
23
+ const tableOfContents = extractTableOfContents(resolved.post.html ?? "");
43
24
 
44
25
  return c.render(
45
26
  <SiteArticle
46
- post={post}
47
- bodySlots={route.entry.bodySlots}
48
- asideContent={<TableOfContents className="table-of-contents--desktop" items={tableOfContents} />}
27
+ post={resolved.post}
28
+ bodySlots={resolved.entry.bodySlots}
29
+ asideContent={<TableOfContents className="rr-table-of-contents--desktop" items={tableOfContents} />}
49
30
  />,
50
31
  );
51
32
  },
52
- );
33
+ );
@@ -0,0 +1,18 @@
1
+ import type { NotFoundHandler } from "hono";
2
+
3
+ const handler: NotFoundHandler = (c) => {
4
+ c.status(404);
5
+
6
+ return c.render(
7
+ <div class="not-found">
8
+ <p class="not-found__status">404</p>
9
+ <h1>Page not found</h1>
10
+ <p>The page you requested does not exist or is not available.</p>
11
+ <p>
12
+ <a href="/">Back to home</a>
13
+ </p>
14
+ </div>,
15
+ );
16
+ };
17
+
18
+ export default handler;