@riebeckite/honox 0.0.1 → 0.0.2
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/dist/index.js +1108 -26
- package/dist/src/scaffold/localized-content.d.ts +14 -0
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -572,6 +572,934 @@ function riebeckiteSsrExternals(externals) {
|
|
|
572
572
|
import fs5 from "node:fs/promises";
|
|
573
573
|
import path6 from "node:path";
|
|
574
574
|
|
|
575
|
+
// src/scaffold/localized-content.ts
|
|
576
|
+
var SCAFFOLD_LANGUAGES = [
|
|
577
|
+
"en",
|
|
578
|
+
"ja",
|
|
579
|
+
"zh-CN",
|
|
580
|
+
"es",
|
|
581
|
+
"de",
|
|
582
|
+
"fr",
|
|
583
|
+
"ko"
|
|
584
|
+
];
|
|
585
|
+
function defaultLanguageForLocale(locale) {
|
|
586
|
+
const normalized = locale.toLowerCase();
|
|
587
|
+
if (normalized.startsWith("ja")) return "ja";
|
|
588
|
+
if (normalized.startsWith("zh")) return "zh-CN";
|
|
589
|
+
if (normalized.startsWith("es")) return "es";
|
|
590
|
+
if (normalized.startsWith("de")) return "de";
|
|
591
|
+
if (normalized.startsWith("fr")) return "fr";
|
|
592
|
+
if (normalized.startsWith("ko")) return "ko";
|
|
593
|
+
return "en";
|
|
594
|
+
}
|
|
595
|
+
var HELPERS = {
|
|
596
|
+
en: "https://github.com/Rerurate514/riebeckite/blob/main/docs/en/README.md",
|
|
597
|
+
ja: "https://github.com/Rerurate514/riebeckite/blob/main/docs/ja/README.md"
|
|
598
|
+
};
|
|
599
|
+
var PLUGIN_INDEX_URL = "https://github.com/Rerurate514/riebeckite/tree/main/packages/plugins";
|
|
600
|
+
var THEMES_INDEX_URL = "https://github.com/Rerurate514/riebeckite/tree/main/packages/themes";
|
|
601
|
+
function pluginReadmeUrl(slug) {
|
|
602
|
+
return `https://github.com/Rerurate514/riebeckite/blob/main/packages/plugins/${slug}/README.md`;
|
|
603
|
+
}
|
|
604
|
+
function themeReadmeUrl(slug) {
|
|
605
|
+
return `https://github.com/Rerurate514/riebeckite/blob/main/packages/themes/${slug}/README.md`;
|
|
606
|
+
}
|
|
607
|
+
function localizedContentFiles(variables) {
|
|
608
|
+
const defaultLang = defaultLanguageForLocale(variables.locale);
|
|
609
|
+
const pages = [
|
|
610
|
+
{ basePath: "index", build: (language) => indexContent(variables, language) },
|
|
611
|
+
{ basePath: "framework/plugins", build: (language) => pluginsContent(language) },
|
|
612
|
+
{ basePath: "framework/themes", build: (language) => themesContent(language) }
|
|
613
|
+
];
|
|
614
|
+
const files = [];
|
|
615
|
+
for (const page of pages) {
|
|
616
|
+
for (const language of SCAFFOLD_LANGUAGES) {
|
|
617
|
+
const suffix = language === defaultLang ? "" : `.${language}`;
|
|
618
|
+
files.push({
|
|
619
|
+
path: `content/${page.basePath}${suffix}.md`,
|
|
620
|
+
content: page.build(language)
|
|
621
|
+
});
|
|
622
|
+
}
|
|
623
|
+
}
|
|
624
|
+
return files;
|
|
625
|
+
}
|
|
626
|
+
function read(text, language) {
|
|
627
|
+
return text[language];
|
|
628
|
+
}
|
|
629
|
+
function frontmatter() {
|
|
630
|
+
return ["---", "publish: true", "---", ""].join("\n");
|
|
631
|
+
}
|
|
632
|
+
function heading(level, text) {
|
|
633
|
+
return `${"#".repeat(level)} ${text}`;
|
|
634
|
+
}
|
|
635
|
+
function codeBlock(language, code) {
|
|
636
|
+
return ["```" + language, code, "```", ""].join("\n");
|
|
637
|
+
}
|
|
638
|
+
var INDEX = {
|
|
639
|
+
lead: {
|
|
640
|
+
en: "Welcome to your Riebeckite site.",
|
|
641
|
+
ja: "あなたの Riebeckite サイトへようこそ。",
|
|
642
|
+
"zh-CN": "欢迎来到你的 Riebeckite 站点。",
|
|
643
|
+
es: "Bienvenido a tu sitio Riebeckite.",
|
|
644
|
+
de: "Willkommen auf deiner Riebeckite-Seite.",
|
|
645
|
+
fr: "Bienvenue sur votre site Riebeckite.",
|
|
646
|
+
ko: "Riebeckite 사이트에 오신 것을 환영합니다."
|
|
647
|
+
},
|
|
648
|
+
translatedNote: {
|
|
649
|
+
en: "Every page of this starter is available in seven languages. Switch with the selector below the page title.",
|
|
650
|
+
ja: "このスターターのすべてのページは 7 言語で利用できます。ページタイトル下のセレクターで切り替えられます。",
|
|
651
|
+
"zh-CN": "本模板的每个页面均提供七种语言版本,可用页面标题下方的选择器切换。",
|
|
652
|
+
es: "Cada página de este starter está disponible en siete idiomas. Cámbialos con el selector bajo el título.",
|
|
653
|
+
de: "Jede Seite dieses Starters ist in sieben Sprachen verfügbar. Wechsel mit dem Auswahlfeld unter dem Seitentitel.",
|
|
654
|
+
fr: "Chaque page de ce starter est disponible en sept langues. Changez avec le sélecteur sous le titre.",
|
|
655
|
+
ko: "이 스타터의 모든 페이지는 7개 언어로 제공됩니다. 페이지 제목 아래 선택기로 전환하세요."
|
|
656
|
+
},
|
|
657
|
+
whatHeading: {
|
|
658
|
+
en: "What is Riebeckite?",
|
|
659
|
+
ja: "Riebeckite とは",
|
|
660
|
+
"zh-CN": "什么是 Riebeckite?",
|
|
661
|
+
es: "¿Qué es Riebeckite?",
|
|
662
|
+
de: "Was ist Riebeckite?",
|
|
663
|
+
fr: "Qu'est-ce que Riebeckite ?",
|
|
664
|
+
ko: "Riebeckite란?"
|
|
665
|
+
},
|
|
666
|
+
whatBody: {
|
|
667
|
+
en: "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.",
|
|
668
|
+
ja: "Riebeckite は、プレーンな Markdown(Obsidian で管理しているのと同じノート)から高速な静的サイトを生成する、拡張性のあるコンテンツファーストのフレームワークです。エコシステムには 50 以上のプラグインと 6 つのテーマがあり、このサイトはその両方をデモしています。",
|
|
669
|
+
"zh-CN": "Riebeckite 是一个可扩展、内容优先的框架,可从纯 Markdown(即你在 Obsidian 中保存的笔记)构建快速的静态站点。生态包含 50+ 插件与六个主题,本站点同时演示两者。",
|
|
670
|
+
es: "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.",
|
|
671
|
+
de: "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.",
|
|
672
|
+
fr: "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.",
|
|
673
|
+
ko: "Riebeckite는 일반 Markdown(Obsidian에서 관리하는 노트)에서 빠른 정적 사이트를 만드는 확장 가능한 콘텐츠 우선 프레임워크입니다. 생태계에는 50개 이상의 플러그인과 6개 테마가 있으며, 이 사이트가 그 두 가지를 보여줍니다."
|
|
674
|
+
},
|
|
675
|
+
exploreHeading: {
|
|
676
|
+
en: "Explore",
|
|
677
|
+
ja: "さらに深く",
|
|
678
|
+
"zh-CN": "继续探索",
|
|
679
|
+
es: "Explorar",
|
|
680
|
+
de: "Weiter erkunden",
|
|
681
|
+
fr: "Explorer",
|
|
682
|
+
ko: "더 살펴보기"
|
|
683
|
+
},
|
|
684
|
+
explorePlugins: {
|
|
685
|
+
en: "Plugins — representative packages grouped by capability",
|
|
686
|
+
ja: "プラグイン — 機能別の代表的なパッケージ",
|
|
687
|
+
"zh-CN": "插件 — 按能力分组的代表性包",
|
|
688
|
+
es: "Plugins — paquetes representativos por capacidad",
|
|
689
|
+
de: "Plugins — repräsentative Pakete nach Fähigkeit",
|
|
690
|
+
fr: "Plugins — paquets représentatifs par capacité",
|
|
691
|
+
ko: "플러그인 — 기능별 대표 패키지"
|
|
692
|
+
},
|
|
693
|
+
exploreThemes: {
|
|
694
|
+
en: "Themes — built-in design packages and how to switch",
|
|
695
|
+
ja: "テーマ — 同梱のデザインパッケージと切り替え方",
|
|
696
|
+
"zh-CN": "主题 — 内置设计包与切换方法",
|
|
697
|
+
es: "Temas — paquetes de diseño incluidos y cómo cambiar",
|
|
698
|
+
de: "Themes — mitgelieferte Design-Pakete und wie man wechselt",
|
|
699
|
+
fr: "Thèmes — paquets de design inclus et comment changer",
|
|
700
|
+
ko: "테마 — 내장 디자인 패키지와 전환 방법"
|
|
701
|
+
},
|
|
702
|
+
editHeading: {
|
|
703
|
+
en: "Edit this site",
|
|
704
|
+
ja: "サイトの編集",
|
|
705
|
+
"zh-CN": "编辑本站点",
|
|
706
|
+
es: "Editar este sitio",
|
|
707
|
+
de: "Diese Seite bearbeiten",
|
|
708
|
+
fr: "Éditer ce site",
|
|
709
|
+
ko: "사이트 편집"
|
|
710
|
+
},
|
|
711
|
+
editLead: {
|
|
712
|
+
en: "Content lives in `content/` as plain Markdown. Add a file, give it `publish: true` in the frontmatter, and it appears in the built site.",
|
|
713
|
+
ja: "コンテンツは `content/` にプレーンな Markdown として置きます。ファイルを追加してフロントマターに `publish: true` を書けば、ビルドされたサイトに反映されます。",
|
|
714
|
+
"zh-CN": "内容以纯 Markdown 存于 `content/`。新建文件并在 frontmatter 中写入 `publish: true`,它就会出现在构建后的站点中。",
|
|
715
|
+
es: "El contenido vive en `content/` como Markdown simple. Añade un archivo, pon `publish: true` en el frontmatter y aparecerá en el sitio compilado.",
|
|
716
|
+
de: "Inhalte liegen als einfaches Markdown in `content/`. Füge eine Datei hinzu, setze `publish: true` ins Frontmatter, und sie erscheint in der gebauten Seite.",
|
|
717
|
+
fr: "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.",
|
|
718
|
+
ko: "콘텐츠는 `content/`에 일반 Markdown으로 저장됩니다. 파일을 추가하고 프론트매터에 `publish: true`를 쓰면 빌드된 사이트에 나타납니다."
|
|
719
|
+
},
|
|
720
|
+
editL10n: {
|
|
721
|
+
en: "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.",
|
|
722
|
+
ja: "翻訳ページは既定ファイルの隣に `<base>.<lang>.md` の命名規則で置きます(例:`about.ja.md`)。l10n プラグインが `/lang/` パスの配下で配信し、自動的にリンクします。",
|
|
723
|
+
"zh-CN": "本地化页面采用默认文件旁的 `<base>.<lang>.md` 命名约定(例如 `about.ja.md`)。l10n 插件会在 `/lang/` 路径下提供服务并自动互链。",
|
|
724
|
+
es: "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.",
|
|
725
|
+
de: "Ü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.",
|
|
726
|
+
fr: "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.",
|
|
727
|
+
ko: "번역 페이지는 기본 파일 옆에 `<base>.<lang>.md` 규칙으로 둡니다(예: `about.ja.md`). l10n 플러그인이 `/lang/` 경로로 서빙하며 자동으로 링크합니다."
|
|
728
|
+
}
|
|
729
|
+
};
|
|
730
|
+
function indexContent(variables, language) {
|
|
731
|
+
const title = variables.title;
|
|
732
|
+
return [
|
|
733
|
+
frontmatter(),
|
|
734
|
+
heading(1, title),
|
|
735
|
+
read(INDEX.lead, language),
|
|
736
|
+
read(INDEX.translatedNote, language),
|
|
737
|
+
heading(2, read(INDEX.whatHeading, language)),
|
|
738
|
+
read(INDEX.whatBody, language),
|
|
739
|
+
heading(2, read(INDEX.exploreHeading, language)),
|
|
740
|
+
`- [${read(INDEX.explorePlugins, language)}](/framework/plugins)`,
|
|
741
|
+
`- [${read(INDEX.exploreThemes, language)}](/framework/themes)`,
|
|
742
|
+
heading(2, read(INDEX.editHeading, language)),
|
|
743
|
+
read(INDEX.editLead, language),
|
|
744
|
+
read(INDEX.editL10n, language),
|
|
745
|
+
""
|
|
746
|
+
].join("\n");
|
|
747
|
+
}
|
|
748
|
+
var THEMES_COPY = {
|
|
749
|
+
title: {
|
|
750
|
+
en: "Themes",
|
|
751
|
+
ja: "テーマ",
|
|
752
|
+
"zh-CN": "主题",
|
|
753
|
+
es: "Temas",
|
|
754
|
+
de: "Themen",
|
|
755
|
+
fr: "Thèmes",
|
|
756
|
+
ko: "테마"
|
|
757
|
+
},
|
|
758
|
+
intro: {
|
|
759
|
+
en: "A theme changes the whole look and feel of a site — colors, typography, and layout — without touching your content or routes. Riebeckite ships with six themes; switch by installing a package and changing one line.",
|
|
760
|
+
ja: "テーマを変えるだけで、色・文字組み・レイアウトといったサイト全体の見た目が変わります。コンテンツやルートには一切触れる必要はありません。Riebeckite には 6 つのテーマが用意されており、パッケージをインストールして 1 行書き換えるだけで切り替えられます。",
|
|
761
|
+
"zh-CN": "主题能整体改变站点的观感——配色、排版与布局——而无需改动你的内容或路由。Riebeckite 内置六个主题,安装一个包、改一行配置即可切换。",
|
|
762
|
+
es: "Un tema cambia toda la apariencia del sitio — colores, tipografía y diseño — sin tocar tu contenido ni tus rutas. Riebeckite incluye seis temas: instala un paquete y cambia una línea.",
|
|
763
|
+
de: "Ein Theme verändert das gesamte Erscheinungsbild einer Seite — Farben, Typografie, Layout — ohne dass du Inhalte oder Routen anfasst. Riebeckite bringt sechs Themes mit; der Wechsel ist eine Paketinstallation plus eine Zeile.",
|
|
764
|
+
fr: "Un thème change tout l'aspect d'un site — couleurs, typographie, mise en page — sans toucher au contenu ni aux routes. Riebeckite fournit six thèmes ; installez un paquet et changez une ligne.",
|
|
765
|
+
ko: "테마를 바꾸면 색상·타이포그래피·레이아웃 등 사이트 전체 분위기가 달라집니다. 콘텐츠나 라우트는 건드릴 필요가 없습니다. Riebeckite는 6개 테마를 제공하며 패키지 설치 후 한 줄만 바꾸면 전환됩니다."
|
|
766
|
+
},
|
|
767
|
+
switchHeading: {
|
|
768
|
+
en: "Switching themes",
|
|
769
|
+
ja: "テーマの切り替え",
|
|
770
|
+
"zh-CN": "切换主题",
|
|
771
|
+
es: "Cambiar de tema",
|
|
772
|
+
de: "Theme wechseln",
|
|
773
|
+
fr: "Changer de thème",
|
|
774
|
+
ko: "테마 전환"
|
|
775
|
+
},
|
|
776
|
+
switchCurrent: {
|
|
777
|
+
en: "This starter uses `@riebeckite/theme-default`. To try another theme:",
|
|
778
|
+
ja: "このスターターは `@riebeckite/theme-default` を使っています。別のテーマを試すには:",
|
|
779
|
+
"zh-CN": "本模板使用 `@riebeckite/theme-default`。想尝试其他主题:",
|
|
780
|
+
es: "Este starter usa `@riebeckite/theme-default`. Para probar otro tema:",
|
|
781
|
+
de: "Dieser Starter verwendet `@riebeckite/theme-default`. Um ein anderes Theme zu testen:",
|
|
782
|
+
fr: "Ce starter utilise `@riebeckite/theme-default`. Pour essayer un autre thème :",
|
|
783
|
+
ko: "이 스타터는 `@riebeckite/theme-default`를 사용합니다. 다른 테마를 시도하려면:"
|
|
784
|
+
},
|
|
785
|
+
switchStep1: {
|
|
786
|
+
en: "Install the package:",
|
|
787
|
+
ja: "パッケージをインストール:",
|
|
788
|
+
"zh-CN": "安装该包:",
|
|
789
|
+
es: "Instala el paquete:",
|
|
790
|
+
de: "Installiere das Paket:",
|
|
791
|
+
fr: "Installez le paquet :",
|
|
792
|
+
ko: "패키지를 설치합니다:"
|
|
793
|
+
},
|
|
794
|
+
switchStep2: {
|
|
795
|
+
en: "Point `theme` at the new factory in `riebeckite.config.ts`:",
|
|
796
|
+
ja: "`riebeckite.config.ts` の `theme` を新しいファクトリに変更:",
|
|
797
|
+
"zh-CN": "在 `riebeckite.config.ts` 中将 `theme` 指向新工厂函数:",
|
|
798
|
+
es: "Apunta `theme` al nuevo factory en `riebeckite.config.ts`:",
|
|
799
|
+
de: "Setze `theme` in `riebeckite.config.ts` auf den neuen Factory:",
|
|
800
|
+
fr: "Pointez `theme` vers le nouveau factory dans `riebeckite.config.ts` :",
|
|
801
|
+
ko: "`riebeckite.config.ts`의 `theme`를 새 팩토리로 변경합니다:"
|
|
802
|
+
},
|
|
803
|
+
tableHeading: {
|
|
804
|
+
en: "The bundled themes",
|
|
805
|
+
ja: "同梱テーマ一覧",
|
|
806
|
+
"zh-CN": "内置主题一览",
|
|
807
|
+
es: "Los temas incluidos",
|
|
808
|
+
de: "Die mitgelieferten Themes",
|
|
809
|
+
fr: "Les thèmes inclus",
|
|
810
|
+
ko: "내장 테마 목록"
|
|
811
|
+
},
|
|
812
|
+
columnTheme: {
|
|
813
|
+
en: "Theme",
|
|
814
|
+
ja: "テーマ",
|
|
815
|
+
"zh-CN": "主题",
|
|
816
|
+
es: "Tema",
|
|
817
|
+
de: "Theme",
|
|
818
|
+
fr: "Thème",
|
|
819
|
+
ko: "테마"
|
|
820
|
+
},
|
|
821
|
+
columnDescription: {
|
|
822
|
+
en: "Description",
|
|
823
|
+
ja: "説明",
|
|
824
|
+
"zh-CN": "说明",
|
|
825
|
+
es: "Descripción",
|
|
826
|
+
de: "Beschreibung",
|
|
827
|
+
fr: "Description",
|
|
828
|
+
ko: "설명"
|
|
829
|
+
},
|
|
830
|
+
note: {
|
|
831
|
+
en: "Every theme supports light/dark color modes, typography, and article layouts; see each README for the full option list.",
|
|
832
|
+
ja: "すべてのテーマでライト/ダーク切り替え、文字組み、記事レイアウトをサポートしています。詳しいオプションは各 README を参照してください。",
|
|
833
|
+
"zh-CN": "所有主题都支持明暗配色、排版与文章布局,完整选项请见各 README。",
|
|
834
|
+
es: "Todos los temas admiten modos claro/oscuro, tipografía y diseño de artículo; consulta cada README para la lista completa de opciones.",
|
|
835
|
+
de: "Jedes Theme unterstützt Hell/Dunkel-Modi, Typografie und Artikel-Layouts; die vollständige Optionsliste steht im jeweiligen README.",
|
|
836
|
+
fr: "Chaque thème prend en charge les modes clair/sombre, la typographie et les mises en page d'article ; voir chaque README pour la liste complète des options.",
|
|
837
|
+
ko: "모든 테마가 라이트/다크 모드, 타이포그래피, 아티클 레이아웃을 지원합니다. 전체 옵션은 각 README를 참조하세요."
|
|
838
|
+
}
|
|
839
|
+
};
|
|
840
|
+
var THEMES = [
|
|
841
|
+
{
|
|
842
|
+
slug: "default",
|
|
843
|
+
factory: "defaultTheme()",
|
|
844
|
+
desc: {
|
|
845
|
+
en: "The default theme: clean design tokens, light/dark/system color modes, and article layouts.",
|
|
846
|
+
ja: "デフォルトテーマ:クリーンなデザイントークン、ライト/ダーク/システムのカラーモード、記事レイアウト。",
|
|
847
|
+
"zh-CN": "默认主题:简洁的设计令牌、浅色/深色/系统配色与文章布局。",
|
|
848
|
+
es: "El tema por defecto: tokens limpios, modos claro/oscuro/sistema y distintos diseños de artículo.",
|
|
849
|
+
de: "Das Standard-Theme: klare Design-Tokens, Licht/Dunkel/System-Modi und Artikel-Layouts.",
|
|
850
|
+
fr: "Le thème par défaut : tokens épurés, modes clair/sombre/système et mises en page d'article.",
|
|
851
|
+
ko: "기본 테마: 깔끔한 디자인 토큰, 라이트/다크/시스템 컬러 모드, 아티클 레이아웃."
|
|
852
|
+
}
|
|
853
|
+
},
|
|
854
|
+
{
|
|
855
|
+
slug: "minimal",
|
|
856
|
+
factory: "minimalTheme()",
|
|
857
|
+
desc: {
|
|
858
|
+
en: "A quiet, typography-first theme.",
|
|
859
|
+
ja: "文字組みを重視した静かなテーマ。",
|
|
860
|
+
"zh-CN": "以排版为先的简洁主题。",
|
|
861
|
+
es: "Un tema sobrio, centrado en la tipografía.",
|
|
862
|
+
de: "Ein ruhiges, typografieorientiertes Theme.",
|
|
863
|
+
fr: "Un thème sobre, axé sur la typographie.",
|
|
864
|
+
ko: "타이포그래피 우선의 차분한 테마."
|
|
865
|
+
}
|
|
866
|
+
},
|
|
867
|
+
{
|
|
868
|
+
slug: "sakura",
|
|
869
|
+
factory: "sakuraTheme()",
|
|
870
|
+
desc: {
|
|
871
|
+
en: "A soft pink palette with warm accents.",
|
|
872
|
+
ja: "やわらかいピンクと温かみのあるアクセントのテーマ。",
|
|
873
|
+
"zh-CN": "柔和的粉色配色与温暖点缀。",
|
|
874
|
+
es: "Una paleta rosa suave con acentos cálidos.",
|
|
875
|
+
de: "Eine weiche rosa Palette mit warmen Akzenten.",
|
|
876
|
+
fr: "Une palette rose douce aux accents chaleureux.",
|
|
877
|
+
ko: "부드러운 핑크 팔레트와 따뜻한 액센트."
|
|
878
|
+
}
|
|
879
|
+
},
|
|
880
|
+
{
|
|
881
|
+
slug: "gruvbox",
|
|
882
|
+
factory: "gruvboxTheme()",
|
|
883
|
+
desc: {
|
|
884
|
+
en: "A warm, retro palette inspired by Gruvbox.",
|
|
885
|
+
ja: "Gruvbox 風の温かみのあるレトロパレット。",
|
|
886
|
+
"zh-CN": "受 Gruvbox 启发的温暖复古配色。",
|
|
887
|
+
es: "Una paleta retro cálida inspirada en Gruvbox.",
|
|
888
|
+
de: "Eine warme, von Gruvbox inspirierte Retro-Palette.",
|
|
889
|
+
fr: "Une palette rétro chaleureuse inspirée de Gruvbox.",
|
|
890
|
+
ko: "Gruvbox에서 영감을 받은 따뜻한 레트로 팔레트."
|
|
891
|
+
}
|
|
892
|
+
},
|
|
893
|
+
{
|
|
894
|
+
slug: "tokyonight",
|
|
895
|
+
factory: "tokyonightTheme()",
|
|
896
|
+
desc: {
|
|
897
|
+
en: "A modern night palette with an optional neon accent.",
|
|
898
|
+
ja: "ネオンオプション付きのモダンなナイトパレット。",
|
|
899
|
+
"zh-CN": "现代夜间配色,可选霓虹点缀。",
|
|
900
|
+
es: "Una paleta nocturna moderna con acento neón opcional.",
|
|
901
|
+
de: "Eine moderne Night-Palette mit optionalem Neon-Akzent.",
|
|
902
|
+
fr: "Une palette nocturne moderne avec accent néon optionnel.",
|
|
903
|
+
ko: "네온 액센트를 선택할 수 있는 모던한 나이트 팔레트."
|
|
904
|
+
}
|
|
905
|
+
},
|
|
906
|
+
{
|
|
907
|
+
slug: "rerurate",
|
|
908
|
+
factory: "rerurateTheme()",
|
|
909
|
+
desc: {
|
|
910
|
+
en: "The author's personal design language.",
|
|
911
|
+
ja: "作者自身のデザインをテーマにしたテーマ。",
|
|
912
|
+
"zh-CN": "作者个人的设计风格主题。",
|
|
913
|
+
es: "El lenguaje de diseño personal del autor.",
|
|
914
|
+
de: "Die persönliche Designsprache des Autors.",
|
|
915
|
+
fr: "Le langage de design personnel de l'auteur.",
|
|
916
|
+
ko: "저자의 개인 디자인 언어 테마."
|
|
917
|
+
}
|
|
918
|
+
}
|
|
919
|
+
];
|
|
920
|
+
function themesContent(language) {
|
|
921
|
+
const copy = THEMES_COPY;
|
|
922
|
+
const lines = [frontmatter()];
|
|
923
|
+
lines.push(heading(1, read(copy.title, language)), "");
|
|
924
|
+
lines.push(read(copy.intro, language), "");
|
|
925
|
+
lines.push(heading(2, read(copy.switchHeading, language)), "");
|
|
926
|
+
lines.push(read(copy.switchCurrent, language), "");
|
|
927
|
+
lines.push(read(copy.switchStep1, language), "");
|
|
928
|
+
lines.push(codeBlock("sh", "pnpm add @riebeckite/theme-sakura"));
|
|
929
|
+
lines.push(read(copy.switchStep2, language), "");
|
|
930
|
+
lines.push(
|
|
931
|
+
codeBlock(
|
|
932
|
+
"ts",
|
|
933
|
+
[
|
|
934
|
+
'import { sakuraTheme } from "@riebeckite/theme-sakura";',
|
|
935
|
+
"",
|
|
936
|
+
"export default defineConfig({",
|
|
937
|
+
" theme: sakuraTheme(),",
|
|
938
|
+
"});"
|
|
939
|
+
].join("\n")
|
|
940
|
+
)
|
|
941
|
+
);
|
|
942
|
+
lines.push(heading(2, read(copy.tableHeading, language)), "");
|
|
943
|
+
lines.push(
|
|
944
|
+
`| ${read(copy.columnTheme, language)} | ${read(copy.columnDescription, language)} |`
|
|
945
|
+
);
|
|
946
|
+
lines.push("| --- | --- |");
|
|
947
|
+
for (const theme of THEMES) {
|
|
948
|
+
const packageName = `@riebeckite/theme-${theme.slug}`;
|
|
949
|
+
lines.push(
|
|
950
|
+
`| [\`${packageName}\`](${themeReadmeUrl(theme.slug)}) · \`${theme.factory}\` | ${read(theme.desc, language)} |`
|
|
951
|
+
);
|
|
952
|
+
}
|
|
953
|
+
lines.push("");
|
|
954
|
+
lines.push(heading(2, read(copy.note, language)), "");
|
|
955
|
+
lines.push("");
|
|
956
|
+
lines.push(`[Riebeckite themes on GitHub](${THEMES_INDEX_URL})`, "");
|
|
957
|
+
lines.push("");
|
|
958
|
+
return lines.join("\n");
|
|
959
|
+
}
|
|
960
|
+
var PLUGINS_COPY = {
|
|
961
|
+
title: {
|
|
962
|
+
en: "Plugins",
|
|
963
|
+
ja: "プラグイン",
|
|
964
|
+
"zh-CN": "插件",
|
|
965
|
+
es: "Plugins",
|
|
966
|
+
de: "Plugins",
|
|
967
|
+
fr: "Plugins",
|
|
968
|
+
ko: "플러그인"
|
|
969
|
+
},
|
|
970
|
+
intro: {
|
|
971
|
+
en: "Riebeckite's power comes from its plugin ecosystem — over fifty packages that extend Markdown, rendering, search, SEO, and more. Below are representative examples grouped by capability; every entry links to its full README.",
|
|
972
|
+
ja: "Riebeckite の力はプラグインエコシステムにあります——50 以上のパッケージが Markdown・描画・検索・SEO などを拡張します。ここでは代表的なプラグインを機能別に紹介します。各項目のリンクから詳細な README を参照できます。",
|
|
973
|
+
"zh-CN": "Riebeckite 的强大来自其插件生态——五十多个扩展 Markdown、渲染、搜索、SEO 等的包。下面按能力分组展示代表性示例,每一项都链接到完整 README。",
|
|
974
|
+
es: "El poder de Riebeckite viene de su ecosistema de plugins — más de cincuenta paquetes que extienden Markdown, renderizado, búsqueda, SEO y más. Aquí tienes ejemplos representativos agrupados por capacidad; cada uno enlaza a su README completo.",
|
|
975
|
+
de: "Riebeckites Stärke kommt aus seinem Plugin-Ökosystem — über fünfzig Pakete, die Markdown, Rendering, Suche, SEO und mehr erweitern. Hier finden sich repräsentative Beispiele nach Fähigkeit gruppiert; jeder Eintrag verlinkt auf sein volles README.",
|
|
976
|
+
fr: "La puissance de Riebeckite vient de son écosystème de plugins — plus de cinquante paquets qui étendent Markdown, le rendu, la recherche, le SEO et plus encore. Voici des exemples représentatifs groupés par capacité ; chaque entrée renvoie vers son README complet.",
|
|
977
|
+
ko: "Riebeckite의 힘은 플러그인 생태계에 있습니다 — Markdown·렌더링·검색·SEO 등을 확장하는 50개 이상의 패키지. 아래는 기능별로 대표적인 예를 소개하며, 각 항목은 전체 README로 연결됩니다."
|
|
978
|
+
},
|
|
979
|
+
installHeading: {
|
|
980
|
+
en: "Adding a plugin",
|
|
981
|
+
ja: "プラグインの追加",
|
|
982
|
+
"zh-CN": "添加插件",
|
|
983
|
+
es: "Añadir un plugin",
|
|
984
|
+
de: "Ein Plugin hinzufügen",
|
|
985
|
+
fr: "Ajouter un plugin",
|
|
986
|
+
ko: "플러그인 추가"
|
|
987
|
+
},
|
|
988
|
+
installStep1: {
|
|
989
|
+
en: "Install the package:",
|
|
990
|
+
ja: "パッケージをインストール:",
|
|
991
|
+
"zh-CN": "安装该包:",
|
|
992
|
+
es: "Instala el paquete:",
|
|
993
|
+
de: "Installiere das Paket:",
|
|
994
|
+
fr: "Installez le paquet :",
|
|
995
|
+
ko: "패키지를 설치합니다:"
|
|
996
|
+
},
|
|
997
|
+
installStep2: {
|
|
998
|
+
en: "Register it in the `plugins` array of `riebeckite.config.ts`:",
|
|
999
|
+
ja: "`riebeckite.config.ts` の `plugins` 配列に登録:",
|
|
1000
|
+
"zh-CN": "在 `riebeckite.config.ts` 的 `plugins` 数组中注册:",
|
|
1001
|
+
es: "Regístralo en el array `plugins` de `riebeckite.config.ts`:",
|
|
1002
|
+
de: "Registriere es im `plugins`-Array der `riebeckite.config.ts`:",
|
|
1003
|
+
fr: "Enregistrez-le dans le tableau `plugins` de `riebeckite.config.ts` :",
|
|
1004
|
+
ko: "`riebeckite.config.ts`의 `plugins` 배열에 등록합니다:"
|
|
1005
|
+
},
|
|
1006
|
+
fullList: {
|
|
1007
|
+
en: "The complete plugin index lives in the repository:",
|
|
1008
|
+
ja: "全プラグインの一覧はリポジトリにあります:",
|
|
1009
|
+
"zh-CN": "完整的插件索引位于仓库中:",
|
|
1010
|
+
es: "El índice completo de plugins vive en el repositorio:",
|
|
1011
|
+
de: "Der vollständige Plugin-Index liegt im Repository:",
|
|
1012
|
+
fr: "L'index complet des plugins se trouve dans le dépôt :",
|
|
1013
|
+
ko: "전체 플러그인 목록은 저장소에 있습니다:"
|
|
1014
|
+
},
|
|
1015
|
+
fullListLabel: {
|
|
1016
|
+
en: "Riebeckite plugins on GitHub",
|
|
1017
|
+
ja: "GitHub の Riebeckite プラグイン",
|
|
1018
|
+
"zh-CN": "GitHub 上的 Riebeckite 插件",
|
|
1019
|
+
es: "Plugins de Riebeckite en GitHub",
|
|
1020
|
+
de: "Riebeckite-Plugins auf GitHub",
|
|
1021
|
+
fr: "Plugins Riebeckite sur GitHub",
|
|
1022
|
+
ko: "GitHub의 Riebeckite 플러그인"
|
|
1023
|
+
},
|
|
1024
|
+
columnPlugin: {
|
|
1025
|
+
en: "Plugin",
|
|
1026
|
+
ja: "プラグイン",
|
|
1027
|
+
"zh-CN": "插件",
|
|
1028
|
+
es: "Plugin",
|
|
1029
|
+
de: "Plugin",
|
|
1030
|
+
fr: "Plugin",
|
|
1031
|
+
ko: "플러그인"
|
|
1032
|
+
},
|
|
1033
|
+
columnDescription: {
|
|
1034
|
+
en: "What it does",
|
|
1035
|
+
ja: "できること",
|
|
1036
|
+
"zh-CN": "作用",
|
|
1037
|
+
es: "Qué hace",
|
|
1038
|
+
de: "Funktion",
|
|
1039
|
+
fr: "Rôle",
|
|
1040
|
+
ko: "기능"
|
|
1041
|
+
}
|
|
1042
|
+
};
|
|
1043
|
+
var PLUGIN_CATEGORIES = [
|
|
1044
|
+
{
|
|
1045
|
+
title: {
|
|
1046
|
+
en: "Markdown and notes",
|
|
1047
|
+
ja: "マークダウンとノート",
|
|
1048
|
+
"zh-CN": "Markdown 与笔记",
|
|
1049
|
+
es: "Markdown y notas",
|
|
1050
|
+
de: "Markdown und Notizen",
|
|
1051
|
+
fr: "Markdown et notes",
|
|
1052
|
+
ko: "마크다운과 노트"
|
|
1053
|
+
},
|
|
1054
|
+
summary: {
|
|
1055
|
+
en: "Everyday note-taking tuned for Obsidian vaults.",
|
|
1056
|
+
ja: "Obsidian ボールト向けの日常ノート機能。",
|
|
1057
|
+
"zh-CN": "为 Obsidian 库打造的日常笔记功能。",
|
|
1058
|
+
es: "Toma de notas diaria afinada para bóvedas Obsidian.",
|
|
1059
|
+
de: "Alltägliche Notizfunktionen, optimiert für Obsidian-Vaults.",
|
|
1060
|
+
fr: "Prise de notes quotidienne pensée pour les coffres Obsidian.",
|
|
1061
|
+
ko: "Obsidian 볼트에 맞춘 일상 노트 기능."
|
|
1062
|
+
},
|
|
1063
|
+
plugins: [
|
|
1064
|
+
{
|
|
1065
|
+
slug: "obsidian-markdown",
|
|
1066
|
+
desc: {
|
|
1067
|
+
en: "Obsidian-flavored Markdown: wikilinks, embeds, callouts, and tags.",
|
|
1068
|
+
ja: "Obsidian 風マークダウン:ウィキリンク・埋め込み・コールアウト・タグ。",
|
|
1069
|
+
"zh-CN": "Obsidian 风格 Markdown:双链、嵌入、标注与标签。",
|
|
1070
|
+
es: "Markdown estilo Obsidian: wikilinks, embeds, callouts y etiquetas.",
|
|
1071
|
+
de: "Obsidian-Markdown: Wikilinks, Einbettungen, Callouts und Tags.",
|
|
1072
|
+
fr: "Markdown façon Obsidian : wikilinks, embeds, callouts et tags.",
|
|
1073
|
+
ko: "Obsidian 스타일 마크다운: 위키링크, 임베드, 콜아웃, 태그."
|
|
1074
|
+
}
|
|
1075
|
+
},
|
|
1076
|
+
{
|
|
1077
|
+
slug: "attachment",
|
|
1078
|
+
desc: {
|
|
1079
|
+
en: "Renders attached files and embeds assets via wikilinks.",
|
|
1080
|
+
ja: "ウィキリンクによるファイル添付とアセットの埋め込み表示。",
|
|
1081
|
+
"zh-CN": "通过双链渲染附件并嵌入资源。",
|
|
1082
|
+
es: "Renderiza archivos adjuntos e incrusta assets con wikilinks.",
|
|
1083
|
+
de: "Rendert Dateianhänge und bettet Assets per Wikilinks ein.",
|
|
1084
|
+
fr: "Rend les fichiers joints et embarque les ressources via wikilinks.",
|
|
1085
|
+
ko: "위키링크로 첨부 파일을 렌더링하고 자산을 임베드."
|
|
1086
|
+
}
|
|
1087
|
+
},
|
|
1088
|
+
{
|
|
1089
|
+
slug: "media",
|
|
1090
|
+
desc: {
|
|
1091
|
+
en: "Audio and video embeds from plain links.",
|
|
1092
|
+
ja: "プレーンなリンクから音声・動画を埋め込み。",
|
|
1093
|
+
"zh-CN": "从普通链接嵌入音频和视频。",
|
|
1094
|
+
es: "Incrusta audio y vídeo desde enlaces simples.",
|
|
1095
|
+
de: "Audio- und Video-Embeds aus einfachen Links.",
|
|
1096
|
+
fr: "Embeds audio et vidéo depuis de simples liens.",
|
|
1097
|
+
ko: "일반 링크에서 오디오·비디오 임베드."
|
|
1098
|
+
}
|
|
1099
|
+
}
|
|
1100
|
+
]
|
|
1101
|
+
},
|
|
1102
|
+
{
|
|
1103
|
+
title: {
|
|
1104
|
+
en: "Diagrams and presentation",
|
|
1105
|
+
ja: "図とプレゼンテーション",
|
|
1106
|
+
"zh-CN": "图表与演示",
|
|
1107
|
+
es: "Diagramas y presentación",
|
|
1108
|
+
de: "Diagramme und Präsentation",
|
|
1109
|
+
fr: "Diagrammes et présentation",
|
|
1110
|
+
ko: "다이어그램과 프레젠테이션"
|
|
1111
|
+
},
|
|
1112
|
+
summary: {
|
|
1113
|
+
en: "Turn fenced code blocks into diagrams, charts, and slide decks.",
|
|
1114
|
+
ja: "フェンスコードブロックを図やチャート、スライドに変換。",
|
|
1115
|
+
"zh-CN": "将围栏代码块变成图表与幻灯片。",
|
|
1116
|
+
es: "Convierte bloques de código en diagramas, gráficas y diapositivas.",
|
|
1117
|
+
de: "Verwandle fenced Code-Blöcke in Diagramme, Charts und Folien.",
|
|
1118
|
+
fr: "Transformez des blocs de code en diagrammes, graphiques et diapositives.",
|
|
1119
|
+
ko: "fenced 코드 블록을 다이어그램·차트·슬라이드로 전환."
|
|
1120
|
+
},
|
|
1121
|
+
plugins: [
|
|
1122
|
+
{
|
|
1123
|
+
slug: "mermaid",
|
|
1124
|
+
desc: {
|
|
1125
|
+
en: "Mermaid diagrams from fenced code blocks.",
|
|
1126
|
+
ja: "フェンスコードブロックから Mermaid 図を描画。",
|
|
1127
|
+
"zh-CN": "从围栏代码块渲染 Mermaid 图表。",
|
|
1128
|
+
es: "Diagramas Mermaid desde bloques de código delimitados.",
|
|
1129
|
+
de: "Mermaid-Diagramme aus fenced Code-Blöcken.",
|
|
1130
|
+
fr: "Diagrammes Mermaid depuis des blocs de code délimités.",
|
|
1131
|
+
ko: "fenced 코드 블록에서 Mermaid 다이어그램 렌더링."
|
|
1132
|
+
}
|
|
1133
|
+
},
|
|
1134
|
+
{
|
|
1135
|
+
slug: "graphviz",
|
|
1136
|
+
desc: {
|
|
1137
|
+
en: "DOT / Graphviz diagrams.",
|
|
1138
|
+
ja: "DOT / Graphviz 図。",
|
|
1139
|
+
"zh-CN": "DOT / Graphviz 图表。",
|
|
1140
|
+
es: "Diagramas DOT / Graphviz.",
|
|
1141
|
+
de: "DOT / Graphviz-Diagramme.",
|
|
1142
|
+
fr: "Diagrammes DOT / Graphviz.",
|
|
1143
|
+
ko: "DOT / Graphviz 다이어그램."
|
|
1144
|
+
}
|
|
1145
|
+
},
|
|
1146
|
+
{
|
|
1147
|
+
slug: "d2",
|
|
1148
|
+
desc: {
|
|
1149
|
+
en: "Diagrams in the D2 language.",
|
|
1150
|
+
ja: "D2 言語によるダイアグラム。",
|
|
1151
|
+
"zh-CN": "使用 D2 语言绘制图表。",
|
|
1152
|
+
es: "Diagramas en lenguaje D2.",
|
|
1153
|
+
de: "Diagramme in der Sprache D2.",
|
|
1154
|
+
fr: "Diagrammes en langage D2.",
|
|
1155
|
+
ko: "D2 언어 다이어그램."
|
|
1156
|
+
}
|
|
1157
|
+
},
|
|
1158
|
+
{
|
|
1159
|
+
slug: "excalidraw",
|
|
1160
|
+
desc: {
|
|
1161
|
+
en: "Renders Excalidraw sketch files.",
|
|
1162
|
+
ja: "Excalidraw スケッチファイルを描画。",
|
|
1163
|
+
"zh-CN": "渲染 Excalidraw 草图文件。",
|
|
1164
|
+
es: "Renderiza bocetos de Excalidraw.",
|
|
1165
|
+
de: "Rendert Excalidraw-Skizzen.",
|
|
1166
|
+
fr: "Rend les croquis Excalidraw.",
|
|
1167
|
+
ko: "Excalidraw 스케치 파일 렌더링."
|
|
1168
|
+
}
|
|
1169
|
+
}
|
|
1170
|
+
]
|
|
1171
|
+
},
|
|
1172
|
+
{
|
|
1173
|
+
title: {
|
|
1174
|
+
en: "Code and reading experience",
|
|
1175
|
+
ja: "コードと読書体験",
|
|
1176
|
+
"zh-CN": "代码与阅读体验",
|
|
1177
|
+
es: "Código y experiencia de lectura",
|
|
1178
|
+
de: "Code und Leseerlebnis",
|
|
1179
|
+
fr: "Code et expérience de lecture",
|
|
1180
|
+
ko: "코드와 읽기 경험"
|
|
1181
|
+
},
|
|
1182
|
+
summary: {
|
|
1183
|
+
en: "Better code blocks and a comfortable reading experience.",
|
|
1184
|
+
ja: "読みやすいコードブロックと快適な読書体験。",
|
|
1185
|
+
"zh-CN": "更好的代码块与舒适的阅读体验。",
|
|
1186
|
+
es: "Mejores bloques de código y una lectura cómoda.",
|
|
1187
|
+
de: "Bessere Code-Blöcke und ein angenehmes Leseerlebnis.",
|
|
1188
|
+
fr: "De meilleurs blocs de code et une lecture confortable.",
|
|
1189
|
+
ko: "더 나은 코드 블록과 편안한 읽기 경험."
|
|
1190
|
+
},
|
|
1191
|
+
plugins: [
|
|
1192
|
+
{
|
|
1193
|
+
slug: "code-enhance",
|
|
1194
|
+
desc: {
|
|
1195
|
+
en: "Syntax highlighting, line numbers, and code toolbars.",
|
|
1196
|
+
ja: "シンタックスハイライト・行番号・コードツールバー。",
|
|
1197
|
+
"zh-CN": "语法高亮、行号与代码工具栏。",
|
|
1198
|
+
es: "Resaltado de sintaxis, números de línea y barras de código.",
|
|
1199
|
+
de: "Syntax-Highlighting, Zeilennummern und Code-Symbolleisten.",
|
|
1200
|
+
fr: "Coloration syntaxique, numéros de ligne et barres de code.",
|
|
1201
|
+
ko: "구문 강조, 줄 번호, 코드 도구 모음."
|
|
1202
|
+
}
|
|
1203
|
+
},
|
|
1204
|
+
{
|
|
1205
|
+
slug: "code-tabs",
|
|
1206
|
+
desc: {
|
|
1207
|
+
en: "Accessible tabbed code blocks.",
|
|
1208
|
+
ja: "アクセシブルなタブ式コードブロック。",
|
|
1209
|
+
"zh-CN": "无障碍的标签式代码块。",
|
|
1210
|
+
es: "Bloques de código con pestañas accesibles.",
|
|
1211
|
+
de: "Barrierefreie Code-Blöcke mit Tabs.",
|
|
1212
|
+
fr: "Blocs de code à onglets accessibles.",
|
|
1213
|
+
ko: "접근성 있는 탭식 코드 블록."
|
|
1214
|
+
}
|
|
1215
|
+
},
|
|
1216
|
+
{
|
|
1217
|
+
slug: "toc",
|
|
1218
|
+
desc: {
|
|
1219
|
+
en: "A scroll-aware table of contents.",
|
|
1220
|
+
ja: "スクロール追従の目次。",
|
|
1221
|
+
"zh-CN": "随滚动高亮的目录。",
|
|
1222
|
+
es: "Una tabla de contenidos que sigue el scroll.",
|
|
1223
|
+
de: "Ein scrollgesteuertes Inhaltsverzeichnis.",
|
|
1224
|
+
fr: "Une table des matières qui suit le défilement.",
|
|
1225
|
+
ko: "스크롤을 따라가는 목차."
|
|
1226
|
+
}
|
|
1227
|
+
},
|
|
1228
|
+
{
|
|
1229
|
+
slug: "backlinks",
|
|
1230
|
+
desc: {
|
|
1231
|
+
en: "Lists notes that link to the current one.",
|
|
1232
|
+
ja: "現在のノートを参照するノートを一覧表示。",
|
|
1233
|
+
"zh-CN": "列出链接到当前笔记的笔记。",
|
|
1234
|
+
es: "Lista las notas que enlazan con la actual.",
|
|
1235
|
+
de: "Listet Notizen, die auf die aktuelle verlinken.",
|
|
1236
|
+
fr: "Liste les notes qui pointent vers la note courante.",
|
|
1237
|
+
ko: "현재 노트를 링크한 노트 목록."
|
|
1238
|
+
}
|
|
1239
|
+
}
|
|
1240
|
+
]
|
|
1241
|
+
},
|
|
1242
|
+
{
|
|
1243
|
+
title: {
|
|
1244
|
+
en: "Search and navigation",
|
|
1245
|
+
ja: "検索とナビゲーション",
|
|
1246
|
+
"zh-CN": "搜索与导航",
|
|
1247
|
+
es: "Búsqueda y navegación",
|
|
1248
|
+
de: "Suche und Navigation",
|
|
1249
|
+
fr: "Recherche et navigation",
|
|
1250
|
+
ko: "검색과 탐색"
|
|
1251
|
+
},
|
|
1252
|
+
summary: {
|
|
1253
|
+
en: "Find and move through your notes quickly.",
|
|
1254
|
+
ja: "ノートをすばやく探して移動する。",
|
|
1255
|
+
"zh-CN": "快速查找并在笔记之间穿梭。",
|
|
1256
|
+
es: "Encuentra y recorre tus notas rápidamente.",
|
|
1257
|
+
de: "Notizen schnell finden und durch sie navigieren.",
|
|
1258
|
+
fr: "Retrouvez et parcourez vos notes rapidement.",
|
|
1259
|
+
ko: "노트를 빠르게 찾고 이동하기."
|
|
1260
|
+
},
|
|
1261
|
+
plugins: [
|
|
1262
|
+
{
|
|
1263
|
+
slug: "search",
|
|
1264
|
+
desc: {
|
|
1265
|
+
en: "Client-side full-text search with a Ctrl+K modal.",
|
|
1266
|
+
ja: "Ctrl+K モーダル付きのクライアント側全文検索。",
|
|
1267
|
+
"zh-CN": "带 Ctrl+K 弹窗的客户端全文搜索。",
|
|
1268
|
+
es: "Búsqueda de texto completo en el cliente con modal Ctrl+K.",
|
|
1269
|
+
de: "Clientseitige Volltextsuche mit Ctrl+K-Modal.",
|
|
1270
|
+
fr: "Recherche plein texte côté client avec modal Ctrl+K.",
|
|
1271
|
+
ko: "Ctrl+K 모달이 있는 클라이언트 전체 텍스트 검색."
|
|
1272
|
+
}
|
|
1273
|
+
},
|
|
1274
|
+
{
|
|
1275
|
+
slug: "garden-explorer",
|
|
1276
|
+
desc: {
|
|
1277
|
+
en: "An interactive graph and search explorer.",
|
|
1278
|
+
ja: "ノートのグラフと検索を探索するインタラクティブビュー。",
|
|
1279
|
+
"zh-CN": "交互式图谱与搜索探索器。",
|
|
1280
|
+
es: "Un explorador interactivo de grafo y búsqueda.",
|
|
1281
|
+
de: "Ein interaktiver Graph- und Such-Explorer.",
|
|
1282
|
+
fr: "Un explorateur interactif de graphe et de recherche.",
|
|
1283
|
+
ko: "노트 그래프와 검색을 탐색하는 대화형 뷰."
|
|
1284
|
+
}
|
|
1285
|
+
},
|
|
1286
|
+
{
|
|
1287
|
+
slug: "local-graph",
|
|
1288
|
+
desc: {
|
|
1289
|
+
en: "A link graph around the current note.",
|
|
1290
|
+
ja: "ノート周辺のリンクグラフ。",
|
|
1291
|
+
"zh-CN": "当前笔记周边的链接图谱。",
|
|
1292
|
+
es: "Un grafo de enlaces alrededor de la nota actual.",
|
|
1293
|
+
de: "Ein Link-Graph rund um die aktuelle Notiz.",
|
|
1294
|
+
fr: "Un graphe de liens autour de la note courante.",
|
|
1295
|
+
ko: "현재 노트 주변의 링크 그래프."
|
|
1296
|
+
}
|
|
1297
|
+
},
|
|
1298
|
+
{
|
|
1299
|
+
slug: "permalink",
|
|
1300
|
+
desc: {
|
|
1301
|
+
en: "Stable, configurable permalinks.",
|
|
1302
|
+
ja: "安定したカスタマイズ可能なパーマリンク。",
|
|
1303
|
+
"zh-CN": "稳定、可配置的永久链接。",
|
|
1304
|
+
es: "Permalinks estables y configurables.",
|
|
1305
|
+
de: "Stabile, konfigurierbare Permalinks.",
|
|
1306
|
+
fr: "Permaliens stables et configurables.",
|
|
1307
|
+
ko: "안정적이고 설정 가능한 고유 주소."
|
|
1308
|
+
}
|
|
1309
|
+
}
|
|
1310
|
+
]
|
|
1311
|
+
},
|
|
1312
|
+
{
|
|
1313
|
+
title: {
|
|
1314
|
+
en: "Publishing and SEO",
|
|
1315
|
+
ja: "公開と SEO",
|
|
1316
|
+
"zh-CN": "发布与 SEO",
|
|
1317
|
+
es: "Publicación y SEO",
|
|
1318
|
+
de: "Veröffentlichung und SEO",
|
|
1319
|
+
fr: "Publication et SEO",
|
|
1320
|
+
ko: "배포와 SEO"
|
|
1321
|
+
},
|
|
1322
|
+
summary: {
|
|
1323
|
+
en: "Ship a site that search engines and readers both understand.",
|
|
1324
|
+
ja: "検索エンジンにも読者にも伝わるサイトを公開する。",
|
|
1325
|
+
"zh-CN": "发布搜索引擎和读者都能理解的站点。",
|
|
1326
|
+
es: "Publica un sitio que buscan buscadores y lectores por igual.",
|
|
1327
|
+
de: "Veröffentliche eine Seite, die Suchmaschinen und Leser gleichermaßen verstehen.",
|
|
1328
|
+
fr: "Publiez un site que moteurs de recherche et lecteurs comprennent.",
|
|
1329
|
+
ko: "검색 엔진과 독자 모두가 이해하는 사이트를 배포."
|
|
1330
|
+
},
|
|
1331
|
+
plugins: [
|
|
1332
|
+
{
|
|
1333
|
+
slug: "seo",
|
|
1334
|
+
desc: {
|
|
1335
|
+
en: "SEO metadata, sitemaps, RSS/Atom/JSON feeds, and robots.txt.",
|
|
1336
|
+
ja: "SEO メタデータ・サイトマップ・RSS/Atom/JSON フィード・robots.txt。",
|
|
1337
|
+
"zh-CN": "SEO 元数据、站点地图、RSS/Atom/JSON 订阅与 robots.txt。",
|
|
1338
|
+
es: "Metadatos SEO, sitemaps, feeds RSS/Atom/JSON y robots.txt.",
|
|
1339
|
+
de: "SEO-Metadaten, Sitemaps, RSS/Atom/JSON-Feeds und robots.txt.",
|
|
1340
|
+
fr: "Métadonnées SEO, sitemaps, flux RSS/Atom/JSON et robots.txt.",
|
|
1341
|
+
ko: "SEO 메타데이터·사이트맵·RSS/Atom/JSON 피드·robots.txt."
|
|
1342
|
+
}
|
|
1343
|
+
},
|
|
1344
|
+
{
|
|
1345
|
+
slug: "l10n",
|
|
1346
|
+
desc: {
|
|
1347
|
+
en: "Localized URLs, a language switcher, and hreflang metadata — this site runs on it.",
|
|
1348
|
+
ja: "ローカライズ済み URL・言語スイッチャー・hreflang メタデータ——このサイトもこれで動いています。",
|
|
1349
|
+
"zh-CN": "本地化 URL、语言切换器与 hreflang 元数据——本站就运行在它之上。",
|
|
1350
|
+
es: "URLs localizadas, selector de idioma y metadatos hreflang — este sitio se ejecuta sobre él.",
|
|
1351
|
+
de: "Lokalisierte URLs, Sprachumschalter und hreflang-Metadaten — diese Seite läuft darauf.",
|
|
1352
|
+
fr: "URLs localisées, sélecteur de langue et métadonnées hreflang — ce site repose dessus.",
|
|
1353
|
+
ko: "로컬라이즈된 URL·언어 전환 UI·hreflang 메타데이터 — 이 사이트가 동작하는 기반입니다."
|
|
1354
|
+
}
|
|
1355
|
+
},
|
|
1356
|
+
{
|
|
1357
|
+
slug: "rich-embed",
|
|
1358
|
+
desc: {
|
|
1359
|
+
en: "Build-time rich media cards for external links.",
|
|
1360
|
+
ja: "外部リンクのビルド時リッチメディアカード。",
|
|
1361
|
+
"zh-CN": "外部链接的构建时富媒体卡片。",
|
|
1362
|
+
es: "Tarjetas multimedia en build para enlaces externos.",
|
|
1363
|
+
de: "Rich-Media-Karten für externe Links zur Build-Zeit.",
|
|
1364
|
+
fr: "Cartes média construites à la compilation pour les liens externes.",
|
|
1365
|
+
ko: "외부 링크의 빌드 시점 리치 미디어 카드."
|
|
1366
|
+
}
|
|
1367
|
+
},
|
|
1368
|
+
{
|
|
1369
|
+
slug: "deploy",
|
|
1370
|
+
desc: {
|
|
1371
|
+
en: "Static deployment output for hosting services.",
|
|
1372
|
+
ja: "ホスティングサービス向けの静的デプロイ出力。",
|
|
1373
|
+
"zh-CN": "面向托管服务的静态部署产物。",
|
|
1374
|
+
es: "Salida de despliegue estático para servicios de hosting.",
|
|
1375
|
+
de: "Statische Deployment-Ausgabe für Hosting-Dienste.",
|
|
1376
|
+
fr: "Sortie de déploiement statique pour les services d'hébergement.",
|
|
1377
|
+
ko: "호스팅 서비스용 정적 배포 산출물."
|
|
1378
|
+
}
|
|
1379
|
+
}
|
|
1380
|
+
]
|
|
1381
|
+
},
|
|
1382
|
+
{
|
|
1383
|
+
title: {
|
|
1384
|
+
en: "Content and developer experience",
|
|
1385
|
+
ja: "コンテンツと開発体験",
|
|
1386
|
+
"zh-CN": "内容与开发者体验",
|
|
1387
|
+
es: "Contenido y experiencia de desarrollo",
|
|
1388
|
+
de: "Content und Developer Experience",
|
|
1389
|
+
fr: "Contenu et expérience développeur",
|
|
1390
|
+
ko: "콘텐츠와 개발자 경험"
|
|
1391
|
+
},
|
|
1392
|
+
summary: {
|
|
1393
|
+
en: "Query, organize, and keep your content healthy.",
|
|
1394
|
+
ja: "コンテンツを検索・整理し、健全に保つ。",
|
|
1395
|
+
"zh-CN": "查询、整理并保持内容健康。",
|
|
1396
|
+
es: "Consulta, organiza y mantén sano tu contenido.",
|
|
1397
|
+
de: "Content abfragen, organisieren und gesund halten.",
|
|
1398
|
+
fr: "Requêter, organiser et garder votre contenu sain.",
|
|
1399
|
+
ko: "콘텐츠를 조회·정리하고 건강하게 유지."
|
|
1400
|
+
},
|
|
1401
|
+
plugins: [
|
|
1402
|
+
{
|
|
1403
|
+
slug: "dataview",
|
|
1404
|
+
desc: {
|
|
1405
|
+
en: "Build-time queries over your notes.",
|
|
1406
|
+
ja: "ノートに対するビルド時クエリ。",
|
|
1407
|
+
"zh-CN": "对笔记的构建时查询。",
|
|
1408
|
+
es: "Consultas en build sobre tus notas.",
|
|
1409
|
+
de: "Build-Zeit-Abfragen über deine Notizen.",
|
|
1410
|
+
fr: "Requêtes temps de build sur vos notes.",
|
|
1411
|
+
ko: "노트에 대한 빌드 시점 조회."
|
|
1412
|
+
}
|
|
1413
|
+
},
|
|
1414
|
+
{
|
|
1415
|
+
slug: "kanban",
|
|
1416
|
+
desc: {
|
|
1417
|
+
en: "Obsidian-style Kanban boards from Markdown lists.",
|
|
1418
|
+
ja: "Markdown リストから Obsidian スタイルのカンバンボードを作成。",
|
|
1419
|
+
"zh-CN": "从 Markdown 列表创建 Obsidian 风格看板。",
|
|
1420
|
+
es: "Tableros Kanban estilo Obsidian desde listas Markdown.",
|
|
1421
|
+
de: "Obsidian-ähnliche Kanban-Boards aus Markdown-Listen.",
|
|
1422
|
+
fr: "Tableaux Kanban façon Obsidian depuis des listes Markdown.",
|
|
1423
|
+
ko: "Markdown 목록에서 Obsidian 스타일 칸반 보드 생성."
|
|
1424
|
+
}
|
|
1425
|
+
},
|
|
1426
|
+
{
|
|
1427
|
+
slug: "responsive-image",
|
|
1428
|
+
desc: {
|
|
1429
|
+
en: "Responsive images with lazy loading.",
|
|
1430
|
+
ja: "レスポンシブ画像と遅延読み込み。",
|
|
1431
|
+
"zh-CN": "响应式图片与懒加载。",
|
|
1432
|
+
es: "Imágenes responsive con carga diferida.",
|
|
1433
|
+
de: "Responsive Bilder mit Lazy Loading.",
|
|
1434
|
+
fr: "Images responsives avec chargement différé.",
|
|
1435
|
+
ko: "지연 로딩 지원 반응형 이미지."
|
|
1436
|
+
}
|
|
1437
|
+
},
|
|
1438
|
+
{
|
|
1439
|
+
slug: "quality",
|
|
1440
|
+
desc: {
|
|
1441
|
+
en: "Static quality and accessibility checks.",
|
|
1442
|
+
ja: "静的品質・アクセシビリティ検査。",
|
|
1443
|
+
"zh-CN": "静态质量与可访问性检查。",
|
|
1444
|
+
es: "Inspección estática de calidad y accesibilidad.",
|
|
1445
|
+
de: "Statische Qualitäts- und Barrierefreiheitsprüfung.",
|
|
1446
|
+
fr: "Contrôle statique de qualité et d'accessibilité.",
|
|
1447
|
+
ko: "정적 품질·접근성 검사."
|
|
1448
|
+
}
|
|
1449
|
+
}
|
|
1450
|
+
]
|
|
1451
|
+
}
|
|
1452
|
+
];
|
|
1453
|
+
function pluginsContent(language) {
|
|
1454
|
+
const copy = PLUGINS_COPY;
|
|
1455
|
+
const categories = PLUGIN_CATEGORIES;
|
|
1456
|
+
const lines = [frontmatter()];
|
|
1457
|
+
lines.push(heading(1, read(copy.title, language)), "");
|
|
1458
|
+
lines.push(read(copy.intro, language), "");
|
|
1459
|
+
lines.push(heading(2, read(copy.installHeading, language)), "");
|
|
1460
|
+
lines.push(read(copy.installStep1, language), "");
|
|
1461
|
+
lines.push(codeBlock("sh", "pnpm add @riebeckite/plugin-mermaid"));
|
|
1462
|
+
lines.push(read(copy.installStep2, language), "");
|
|
1463
|
+
lines.push(
|
|
1464
|
+
codeBlock(
|
|
1465
|
+
"ts",
|
|
1466
|
+
[
|
|
1467
|
+
'import { defineConfig } from "@riebeckite/core";',
|
|
1468
|
+
'import { l10n } from "@riebeckite/plugin-l10n";',
|
|
1469
|
+
'import { mermaid } from "@riebeckite/plugin-mermaid";',
|
|
1470
|
+
'import { obsidianMarkdown } from "@riebeckite/plugin-obsidian-markdown";',
|
|
1471
|
+
"",
|
|
1472
|
+
"export default defineConfig({",
|
|
1473
|
+
" // ...",
|
|
1474
|
+
" plugins: [obsidianMarkdown(), l10n({ ... }), mermaid()],",
|
|
1475
|
+
"});"
|
|
1476
|
+
].join("\n")
|
|
1477
|
+
)
|
|
1478
|
+
);
|
|
1479
|
+
lines.push(read(copy.fullList, language), "");
|
|
1480
|
+
lines.push(`[${read(copy.fullListLabel, language)}](${PLUGIN_INDEX_URL})`, "");
|
|
1481
|
+
for (const category of categories) {
|
|
1482
|
+
lines.push(heading(2, read(category.title, language)), "");
|
|
1483
|
+
lines.push(read(category.summary, language), "");
|
|
1484
|
+
lines.push(`| ${read(copy.columnPlugin, language)} | ${read(copy.columnDescription, language)} |`);
|
|
1485
|
+
lines.push("| --- | --- |");
|
|
1486
|
+
for (const plugin of category.plugins) {
|
|
1487
|
+
const packageName = `@riebeckite/plugin-${plugin.slug}`;
|
|
1488
|
+
lines.push(
|
|
1489
|
+
`| [\`${packageName}\`](${pluginReadmeUrl(plugin.slug)}) | ${read(plugin.desc, language)} |`
|
|
1490
|
+
);
|
|
1491
|
+
}
|
|
1492
|
+
lines.push("");
|
|
1493
|
+
}
|
|
1494
|
+
lines.push("");
|
|
1495
|
+
lines.push(
|
|
1496
|
+
`Riebeckite: [documentation](${HELPERS.en}) · [日本語ドキュメント](${HELPERS.ja})`,
|
|
1497
|
+
""
|
|
1498
|
+
);
|
|
1499
|
+
lines.push("");
|
|
1500
|
+
return lines.join("\n");
|
|
1501
|
+
}
|
|
1502
|
+
|
|
575
1503
|
// src/scaffold/templates.ts
|
|
576
1504
|
function siteTemplateFiles(variables) {
|
|
577
1505
|
return [
|
|
@@ -581,7 +1509,7 @@ function siteTemplateFiles(variables) {
|
|
|
581
1509
|
{ path: "tsconfig.json", content: tsconfig() },
|
|
582
1510
|
{ path: ".gitignore", content: gitignore() },
|
|
583
1511
|
{ path: "README.md", content: readme(variables) },
|
|
584
|
-
|
|
1512
|
+
...localizedContentFiles(variables),
|
|
585
1513
|
{ path: "app/server.ts", content: server() },
|
|
586
1514
|
{ path: "app/client.ts", content: client() },
|
|
587
1515
|
{ path: "app/config.ts", content: appConfig() },
|
|
@@ -613,6 +1541,8 @@ function packageJson(variables) {
|
|
|
613
1541
|
dependencies: {
|
|
614
1542
|
"@riebeckite/core": "^0.0.1",
|
|
615
1543
|
"@riebeckite/honox": "^0.0.1",
|
|
1544
|
+
"@riebeckite/plugin-color-mode": "^0.0.1",
|
|
1545
|
+
"@riebeckite/plugin-l10n": "^0.0.1",
|
|
616
1546
|
"@riebeckite/plugin-obsidian-markdown": "^0.0.1",
|
|
617
1547
|
"@riebeckite/theme-default": "^0.0.1",
|
|
618
1548
|
hono: "^4.12.25",
|
|
@@ -632,22 +1562,33 @@ function packageJson(variables) {
|
|
|
632
1562
|
`;
|
|
633
1563
|
}
|
|
634
1564
|
function riebeckiteConfig(variables) {
|
|
1565
|
+
const { title, description, baseUrl, locale } = variables;
|
|
1566
|
+
const languages = ["en", "ja", "zh-CN", "es", "de", "fr", "ko"];
|
|
635
1567
|
return `import { defineConfig } from "@riebeckite/core";
|
|
1568
|
+
import { colorModePlugin } from "@riebeckite/plugin-color-mode";
|
|
1569
|
+
import { l10n } from "@riebeckite/plugin-l10n";
|
|
636
1570
|
import { obsidianMarkdown } from "@riebeckite/plugin-obsidian-markdown";
|
|
637
1571
|
import { defaultTheme } from "@riebeckite/theme-default";
|
|
638
1572
|
|
|
639
1573
|
export default defineConfig({
|
|
640
1574
|
site: {
|
|
641
|
-
title: ${JSON.stringify(
|
|
642
|
-
description: ${JSON.stringify(
|
|
643
|
-
baseUrl: ${JSON.stringify(
|
|
644
|
-
locale: ${JSON.stringify(
|
|
1575
|
+
title: ${JSON.stringify(title)},
|
|
1576
|
+
description: ${JSON.stringify(description)},
|
|
1577
|
+
baseUrl: ${JSON.stringify(baseUrl)},
|
|
1578
|
+
locale: ${JSON.stringify(locale)},
|
|
645
1579
|
},
|
|
646
1580
|
content: {
|
|
647
1581
|
directory: "content",
|
|
648
1582
|
},
|
|
649
1583
|
theme: defaultTheme(),
|
|
650
|
-
|
|
1584
|
+
plugins: [
|
|
1585
|
+
obsidianMarkdown(),
|
|
1586
|
+
colorModePlugin(),
|
|
1587
|
+
l10n({
|
|
1588
|
+
defaultLang: ${JSON.stringify(defaultLanguageForLocale(locale))},
|
|
1589
|
+
languages: ${JSON.stringify(languages)},
|
|
1590
|
+
}),
|
|
1591
|
+
],
|
|
651
1592
|
});
|
|
652
1593
|
`;
|
|
653
1594
|
}
|
|
@@ -729,10 +1670,29 @@ function gitignore() {
|
|
|
729
1670
|
return ["node_modules/", "dist/", ".riebeckite/", ""].join("\n");
|
|
730
1671
|
}
|
|
731
1672
|
function readme(variables) {
|
|
1673
|
+
return defaultLanguageForLocale(variables.locale) === "ja" ? jaReadme(variables) : enReadme(variables);
|
|
1674
|
+
}
|
|
1675
|
+
var REPO = "https://github.com/Rerurate514/riebeckite";
|
|
1676
|
+
function enReadme(variables) {
|
|
732
1677
|
return [
|
|
733
1678
|
`# ${variables.title}`,
|
|
734
1679
|
"",
|
|
735
|
-
"A
|
|
1680
|
+
"A multilingual Riebeckite site generated by `riebeckite init` — seven",
|
|
1681
|
+
"languages out of the box, plus a tour of the plugin and theme ecosystem.",
|
|
1682
|
+
"",
|
|
1683
|
+
"## What's inside",
|
|
1684
|
+
"",
|
|
1685
|
+
"- **Seven languages** (`en`, `ja`, `zh-CN`, `es`, `de`, `fr`, `ko`) via",
|
|
1686
|
+
` [\`@riebeckite/plugin-l10n\`](${REPO}/blob/main/packages/plugins/l10n/README.md).`,
|
|
1687
|
+
" Every page is translated; non-default languages are served under `/lang/`",
|
|
1688
|
+
" paths, and each page carries a language switcher.",
|
|
1689
|
+
"- **Ecosystem tour pages**, written in all seven languages:",
|
|
1690
|
+
" - `/framework/plugins` — representative plugins grouped by capability.",
|
|
1691
|
+
" - `/framework/themes` — the bundled themes and how to switch.",
|
|
1692
|
+
"- The **HonoX application shell** under `app/` — routes, components, and the",
|
|
1693
|
+
" renderer are yours to extend.",
|
|
1694
|
+
"",
|
|
1695
|
+
"Run `pnpm dev` and open the site to explore.",
|
|
736
1696
|
"",
|
|
737
1697
|
"## Commands",
|
|
738
1698
|
"",
|
|
@@ -743,24 +1703,76 @@ function readme(variables) {
|
|
|
743
1703
|
"pnpm exec riebeckite build",
|
|
744
1704
|
"```",
|
|
745
1705
|
"",
|
|
746
|
-
"
|
|
747
|
-
"
|
|
748
|
-
"
|
|
1706
|
+
"## Localization",
|
|
1707
|
+
"",
|
|
1708
|
+
"Content lives in `content/` as plain Markdown. Translations sit next to the",
|
|
1709
|
+
"default file using the `<base>.<lang>.md` convention (`about.ja.md`,",
|
|
1710
|
+
"`about.en.md`). The default language keeps the unsuffixed path; the rest are",
|
|
1711
|
+
"served under `/lang/`.",
|
|
1712
|
+
"",
|
|
1713
|
+
"To add or remove a language, edit the `l10n(...)` plugin in",
|
|
1714
|
+
"`riebeckite.config.ts` and add or remove the matching translation files.",
|
|
1715
|
+
"",
|
|
1716
|
+
"## Extending",
|
|
1717
|
+
"",
|
|
1718
|
+
`- **Plugins**: browse [packages/plugins](${REPO}/tree/main/packages/plugins)`,
|
|
1719
|
+
" in the Riebeckite repository — each package has its own README with options",
|
|
1720
|
+
" and examples.",
|
|
1721
|
+
"- **Themes**: this starter uses `@riebeckite/theme-default`; swap it for",
|
|
1722
|
+
" another theme in `riebeckite.config.ts`.",
|
|
1723
|
+
`- Docs: [English](${REPO}/blob/main/docs/en/README.md)`,
|
|
1724
|
+
` · [日本語](${REPO}/blob/main/docs/ja/README.md)`,
|
|
749
1725
|
""
|
|
750
1726
|
].join("\n");
|
|
751
1727
|
}
|
|
752
|
-
function
|
|
1728
|
+
function jaReadme(variables) {
|
|
753
1729
|
return [
|
|
754
|
-
"---",
|
|
755
|
-
"publish: true",
|
|
756
|
-
"---",
|
|
757
|
-
"",
|
|
758
1730
|
`# ${variables.title}`,
|
|
759
1731
|
"",
|
|
760
|
-
"
|
|
1732
|
+
"`riebeckite init` で生成した多言語対応の Riebeckite サイトです。7 言語に対応し、",
|
|
1733
|
+
"プラグインとテーマのエコシステムを体感できる構成になっています。",
|
|
1734
|
+
"",
|
|
1735
|
+
"## 含まれているもの",
|
|
1736
|
+
"",
|
|
1737
|
+
"- **7 言語対応**(`en`, `ja`, `zh-CN`, `es`, `de`, `fr`, `ko`)—",
|
|
1738
|
+
` [\`@riebeckite/plugin-l10n\`](${REPO}/blob/main/packages/plugins/l10n/README_ja.md)`,
|
|
1739
|
+
" によるもの。すべてのページが翻訳され、既定言語以外は `/lang/` パスで配信され",
|
|
1740
|
+
" ます。各ページには言語スイッチャーが付いています。",
|
|
1741
|
+
"- **エコシステム紹介ページ**(全 7 言語で作成):",
|
|
1742
|
+
" - `/framework/plugins` — 代表的なプラグインを機能別に紹介。",
|
|
1743
|
+
" - `/framework/themes` — 同梱のテーマと切り替え方。",
|
|
1744
|
+
"- **HonoX アプリケーションシェル** `app/` — ルート・コンポーネント・レンダラー",
|
|
1745
|
+
" は自由に拡張できます。",
|
|
1746
|
+
"",
|
|
1747
|
+
"`pnpm dev` を実行してサイトを開いてください。",
|
|
1748
|
+
"",
|
|
1749
|
+
"## コマンド",
|
|
1750
|
+
"",
|
|
1751
|
+
"```sh",
|
|
1752
|
+
"pnpm install",
|
|
1753
|
+
"pnpm exec riebeckite check",
|
|
1754
|
+
"pnpm exec riebeckite dev",
|
|
1755
|
+
"pnpm exec riebeckite build",
|
|
1756
|
+
"```",
|
|
1757
|
+
"",
|
|
1758
|
+
"## ローカライズ",
|
|
1759
|
+
"",
|
|
1760
|
+
"コンテンツは `content/` にプレーンな Markdown として置きます。翻訳ページは既定",
|
|
1761
|
+
"ファイルの隣に `<base>.<lang>.md` の規則で配置します(`about.ja.md`、",
|
|
1762
|
+
"`about.en.md` など)。既定言語は接尾辞なしのパス、それ以外は `/lang/` のパスで",
|
|
1763
|
+
"配信されます。",
|
|
1764
|
+
"",
|
|
1765
|
+
"言語の追加・削除は `riebeckite.config.ts` の `l10n(...)` プラグインを編集し、",
|
|
1766
|
+
"対応する翻訳ファイルを追加・削除してください。",
|
|
761
1767
|
"",
|
|
762
|
-
"
|
|
763
|
-
"
|
|
1768
|
+
"## 拡張",
|
|
1769
|
+
"",
|
|
1770
|
+
`- **プラグイン**: [packages/plugins](${REPO}/tree/main/packages/plugins) を`,
|
|
1771
|
+
" 参照してください。各パッケージにはオプションと例付きの README があります。",
|
|
1772
|
+
"- **テーマ**: このスターターは `@riebeckite/theme-default` を使用しています。",
|
|
1773
|
+
" `riebeckite.config.ts` で別のテーマに差し替えられます。",
|
|
1774
|
+
`- ドキュメント: [English](${REPO}/blob/main/docs/en/README.md)`,
|
|
1775
|
+
` · [日本語](${REPO}/blob/main/docs/ja/README.md)`,
|
|
764
1776
|
""
|
|
765
1777
|
].join("\n");
|
|
766
1778
|
}
|
|
@@ -845,9 +1857,21 @@ export const ASSETS_ROOT = "public/";
|
|
|
845
1857
|
`;
|
|
846
1858
|
}
|
|
847
1859
|
function globalDeclarations() {
|
|
848
|
-
return `
|
|
1860
|
+
return `import type { PluginHeadTag } from "@riebeckite/core";
|
|
1861
|
+
|
|
1862
|
+
declare module "virtual:riebeckite/client" {
|
|
849
1863
|
export function initRiebeckiteClient(): void;
|
|
850
1864
|
}
|
|
1865
|
+
|
|
1866
|
+
declare module "hono" {
|
|
1867
|
+
interface Env {
|
|
1868
|
+
Variables: {
|
|
1869
|
+
headTags?: readonly PluginHeadTag[];
|
|
1870
|
+
htmlLanguage?: string;
|
|
1871
|
+
};
|
|
1872
|
+
Bindings: Record<string, never>;
|
|
1873
|
+
}
|
|
1874
|
+
}
|
|
851
1875
|
`;
|
|
852
1876
|
}
|
|
853
1877
|
function style() {
|
|
@@ -861,6 +1885,8 @@ body {
|
|
|
861
1885
|
|
|
862
1886
|
.site-header {
|
|
863
1887
|
display: flex;
|
|
1888
|
+
align-items: center;
|
|
1889
|
+
justify-content: space-between;
|
|
864
1890
|
gap: 1rem;
|
|
865
1891
|
padding: 1rem;
|
|
866
1892
|
border-bottom: 1px solid #d1d5db;
|
|
@@ -881,7 +1907,8 @@ body {
|
|
|
881
1907
|
`;
|
|
882
1908
|
}
|
|
883
1909
|
function siteHeader() {
|
|
884
|
-
return `import {
|
|
1910
|
+
return `import { ColorModeToggle } from "@riebeckite/plugin-color-mode";
|
|
1911
|
+
import { config } from "../config";
|
|
885
1912
|
|
|
886
1913
|
export function SiteHeader() {
|
|
887
1914
|
return (
|
|
@@ -889,6 +1916,7 @@ export function SiteHeader() {
|
|
|
889
1916
|
<a href="/" class="site-header__home">
|
|
890
1917
|
{config.site.title}
|
|
891
1918
|
</a>
|
|
1919
|
+
<ColorModeToggle />
|
|
892
1920
|
</header>
|
|
893
1921
|
);
|
|
894
1922
|
}
|
|
@@ -898,11 +1926,23 @@ function article() {
|
|
|
898
1926
|
return `import type { PostContent } from "@riebeckite/core";
|
|
899
1927
|
import { Article, ArticleContent, ArticleLayout } from "@riebeckite/honox/ui";
|
|
900
1928
|
|
|
901
|
-
export function SiteArticle({
|
|
1929
|
+
export function SiteArticle({
|
|
1930
|
+
post,
|
|
1931
|
+
afterMeta,
|
|
1932
|
+
}: {
|
|
1933
|
+
post: PostContent;
|
|
1934
|
+
afterMeta?: string;
|
|
1935
|
+
}) {
|
|
902
1936
|
return (
|
|
903
1937
|
<Article class="site-article">
|
|
904
1938
|
<ArticleLayout>
|
|
905
1939
|
<ArticleContent>
|
|
1940
|
+
{afterMeta ? (
|
|
1941
|
+
<div
|
|
1942
|
+
class="site-article__after-meta"
|
|
1943
|
+
dangerouslySetInnerHTML={{ __html: afterMeta }}
|
|
1944
|
+
/>
|
|
1945
|
+
) : null}
|
|
906
1946
|
<div dangerouslySetInnerHTML={{ __html: post.html ?? "" }} />
|
|
907
1947
|
</ArticleContent>
|
|
908
1948
|
</ArticleLayout>
|
|
@@ -912,8 +1952,10 @@ export function SiteArticle({ post }: { post: PostContent }) {
|
|
|
912
1952
|
`;
|
|
913
1953
|
}
|
|
914
1954
|
function renderer() {
|
|
915
|
-
return `import {
|
|
1955
|
+
return `import type { PluginHeadTag } from "@riebeckite/core";
|
|
1956
|
+
import { jsxRenderer } from "hono/jsx-renderer";
|
|
916
1957
|
import { Link, Script } from "honox/server";
|
|
1958
|
+
import { ColorModeScript } from "@riebeckite/plugin-color-mode";
|
|
917
1959
|
import { SiteHeader } from "../components/site-header";
|
|
918
1960
|
import { config } from "../config";
|
|
919
1961
|
|
|
@@ -929,14 +1971,21 @@ function themeAttributes() {
|
|
|
929
1971
|
};
|
|
930
1972
|
}
|
|
931
1973
|
|
|
932
|
-
export default jsxRenderer(({ children }) => {
|
|
1974
|
+
export default jsxRenderer(({ children }, c) => {
|
|
1975
|
+
const headTags: readonly PluginHeadTag[] = c.get("headTags") ?? [];
|
|
1976
|
+
|
|
933
1977
|
return (
|
|
934
|
-
<html
|
|
1978
|
+
<html
|
|
1979
|
+
lang={c.get("htmlLanguage") ?? config.site.locale}
|
|
1980
|
+
{...themeAttributes()}
|
|
1981
|
+
>
|
|
935
1982
|
<head>
|
|
936
1983
|
<meta charset="utf-8" />
|
|
937
1984
|
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
|
938
1985
|
<title>{config.site.title}</title>
|
|
1986
|
+
<ColorModeScript />
|
|
939
1987
|
<Link href="/app/style.css" rel="stylesheet" />
|
|
1988
|
+
{headTags.map(renderHeadTag)}
|
|
940
1989
|
<Script src="/app/client.ts" async />
|
|
941
1990
|
</head>
|
|
942
1991
|
<body class="riebeckite-page">
|
|
@@ -946,6 +1995,21 @@ export default jsxRenderer(({ children }) => {
|
|
|
946
1995
|
</html>
|
|
947
1996
|
);
|
|
948
1997
|
});
|
|
1998
|
+
|
|
1999
|
+
function renderHeadTag(tag: PluginHeadTag, index: number) {
|
|
2000
|
+
const key = \`\${tag.tag}-\${index}\`;
|
|
2001
|
+
if (tag.tag === "meta") return <meta {...tag.attrs} key={key} />;
|
|
2002
|
+
if (tag.tag === "link") return <link {...tag.attrs} key={key} />;
|
|
2003
|
+
return (
|
|
2004
|
+
<script
|
|
2005
|
+
{...tag.attrs}
|
|
2006
|
+
key={key}
|
|
2007
|
+
dangerouslySetInnerHTML={
|
|
2008
|
+
tag.children ? { __html: tag.children } : undefined
|
|
2009
|
+
}
|
|
2010
|
+
/>
|
|
2011
|
+
);
|
|
2012
|
+
}
|
|
949
2013
|
`;
|
|
950
2014
|
}
|
|
951
2015
|
function indexRoute() {
|
|
@@ -967,7 +2031,17 @@ export default createRoute(async (c) => {
|
|
|
967
2031
|
return c.notFound();
|
|
968
2032
|
}
|
|
969
2033
|
|
|
970
|
-
|
|
2034
|
+
if (indexEntry) {
|
|
2035
|
+
c.set("htmlLanguage", indexEntry.publicLocation.metadata?.["l10n.lang"]);
|
|
2036
|
+
c.set("headTags", indexEntry.headTags ?? []);
|
|
2037
|
+
}
|
|
2038
|
+
|
|
2039
|
+
return c.render(
|
|
2040
|
+
<SiteArticle
|
|
2041
|
+
post={post}
|
|
2042
|
+
afterMeta={indexEntry?.bodySlots?.["article.after-meta"]}
|
|
2043
|
+
/>,
|
|
2044
|
+
);
|
|
971
2045
|
});
|
|
972
2046
|
`;
|
|
973
2047
|
}
|
|
@@ -1006,7 +2080,15 @@ export default createRoute(
|
|
|
1006
2080
|
return c.notFound();
|
|
1007
2081
|
}
|
|
1008
2082
|
|
|
1009
|
-
|
|
2083
|
+
c.set("htmlLanguage", route.entry.publicLocation.metadata?.["l10n.lang"]);
|
|
2084
|
+
c.set("headTags", route.entry.headTags ?? []);
|
|
2085
|
+
|
|
2086
|
+
return c.render(
|
|
2087
|
+
<SiteArticle
|
|
2088
|
+
post={post}
|
|
2089
|
+
afterMeta={route.entry.bodySlots?.["article.after-meta"]}
|
|
2090
|
+
/>,
|
|
2091
|
+
);
|
|
1010
2092
|
},
|
|
1011
2093
|
);
|
|
1012
2094
|
`;
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import type { SiteTemplateFile, SiteTemplateVariables } from "./templates.js";
|
|
2
|
+
export declare const SCAFFOLD_LANGUAGES: readonly ["en", "ja", "zh-CN", "es", "de", "fr", "ko"];
|
|
3
|
+
export type ScaffoldLanguage = (typeof SCAFFOLD_LANGUAGES)[number];
|
|
4
|
+
export declare function defaultLanguageForLocale(locale: string): string;
|
|
5
|
+
/**
|
|
6
|
+
* Generates the localized content pages for the scaffold.
|
|
7
|
+
*
|
|
8
|
+
* Naming follows the l10n plugin convention: the default-language page keeps
|
|
9
|
+
* the plain name (`index.md`) while every other language uses the
|
|
10
|
+
* `<base>.<lang>.md` suffix. The l10n plugin derives the translation group
|
|
11
|
+
* from the path, so `content/index.ja.md` and `content/index.md` share a
|
|
12
|
+
* translation while being served under `/` and `/ja/`.
|
|
13
|
+
*/
|
|
14
|
+
export declare function localizedContentFiles(variables: SiteTemplateVariables): readonly SiteTemplateFile[];
|