create-riebeckite 0.0.20 → 0.0.22
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/README.md +2 -2
- package/README_ja.md +2 -2
- package/dist/src/index.js +63 -26
- package/dist/src/scaffold/index.js +63 -26
- package/dist/src/scaffold/utilities.d.ts +1 -1
- package/dist/src/scaffold/version.d.ts +1 -1
- package/package.json +2 -2
- package/templates/scaffold/presets/minimal/app/style.css +8 -4
- package/templates/scaffold/presets/showcase/app/style.css +17 -6
- package/templates/scaffold/presets/starter/app/style.css +17 -6
- package/templates/scaffold/presets/starter/content/notes/planning.md +1 -4
- package/templates/scaffold/presets/starter/content/notes/writing.md +1 -4
- package/templates/scaffold/utilities/gitignore/gitignore +6 -0
package/README.md
CHANGED
|
@@ -30,7 +30,7 @@ The prompts ask, in order:
|
|
|
30
30
|
| --- | --- | --- |
|
|
31
31
|
| Project name | the folder to create (empty input uses the default name) | any name, e.g. `my-site` |
|
|
32
32
|
| Preset | `starter`, `minimal`, `showcase`, `empty` | `starter` for most sites |
|
|
33
|
-
| Project files | `.editorconfig`, `.gitattributes`, `biome.json`, `.npmrc`, `.vscode/settings.json` | the recommended set is pre-selected |
|
|
33
|
+
| Project files | `.gitignore`, `.editorconfig`, `.gitattributes`, `biome.json`, `.npmrc`, `.vscode/settings.json` | the recommended set is pre-selected |
|
|
34
34
|
| Content source | `This project`, `Separate GitHub repository` | `This project` to start |
|
|
35
35
|
| Deployment | `GitHub Actions + Cloudflare Workers`, `Not now` | `Not now` for local development |
|
|
36
36
|
|
|
@@ -46,7 +46,7 @@ Deployment can be added later, described in
|
|
|
46
46
|
| --- | --- |
|
|
47
47
|
| `[directory]` | Directory to scaffold into (default: the current directory) |
|
|
48
48
|
| `--preset <name>` | Starter composition, e.g. `showcase` (default: `starter`) |
|
|
49
|
-
| `--utilities <names>` | Comma-separated project files to generate: `editorconfig`, `gitattributes`, `biome`, `npmrc`, `vscode`, or `none` (default: `editorconfig,gitattributes,biome`) |
|
|
49
|
+
| `--utilities <names>` | Comma-separated project files to generate: `gitignore`, `editorconfig`, `gitattributes`, `biome`, `npmrc`, `vscode`, or `none` (default: `gitignore,editorconfig,gitattributes,biome`) |
|
|
50
50
|
| `--force` | Scaffold even when the target directory is not empty |
|
|
51
51
|
| `--list-presets` | Print the available presets and their descriptions, then exit |
|
|
52
52
|
| `--github-actions` | Generate the Cloudflare deployment workflow |
|
package/README_ja.md
CHANGED
|
@@ -31,7 +31,7 @@ npm exec riebeckite build
|
|
|
31
31
|
| --- | --- | --- |
|
|
32
32
|
| Project name | 作るフォルダ名(空なら既定の名前) | 任意。例: `my-site` |
|
|
33
33
|
| Preset | `starter`、`minimal`、`showcase`、`empty` | 大半のサイトは `starter` |
|
|
34
|
-
| Project files | `.editorconfig`、`.gitattributes`、`biome.json`、`.npmrc`、`.vscode/settings.json` | 推奨セットをあらかじめ選択 |
|
|
34
|
+
| Project files | `.gitignore`、`.editorconfig`、`.gitattributes`、`biome.json`、`.npmrc`、`.vscode/settings.json` | 推奨セットをあらかじめ選択 |
|
|
35
35
|
| Content source | `This project`、`Separate GitHub repository` | 最初は `This project` |
|
|
36
36
|
| デプロイ設定 | `GitHub Actions + Cloudflare Workers`、`Not now` | 手元で試すなら `Not now` |
|
|
37
37
|
|
|
@@ -43,7 +43,7 @@ npm exec riebeckite build
|
|
|
43
43
|
| --- | --- |
|
|
44
44
|
| `[directory]` | 生成先ディレクトリ(既定はカレントディレクトリ) |
|
|
45
45
|
| `--preset <name>` | 使用するスターター構成(既定は `starter`) |
|
|
46
|
-
| `--utilities <names>` | 生成するプロジェクトファイルをカンマ区切りで指定する(`editorconfig`、`gitattributes`、`biome`、`npmrc`、`vscode`、または `none`。既定は `editorconfig,gitattributes,biome`) |
|
|
46
|
+
| `--utilities <names>` | 生成するプロジェクトファイルをカンマ区切りで指定する(`gitignore`、`editorconfig`、`gitattributes`、`biome`、`npmrc`、`vscode`、または `none`。既定は `gitignore,editorconfig,gitattributes,biome`) |
|
|
47
47
|
| `--force` | 空でないディレクトリにも展開する |
|
|
48
48
|
| `--list-presets` | 利用可能な preset と説明を一覧表示して終了する |
|
|
49
49
|
| `--github-actions` | Cloudflare へのデプロイ workflow を生成する |
|
package/dist/src/index.js
CHANGED
|
@@ -314,11 +314,7 @@ var codeEnhance = np("@riebeckite/plugin-code-enhance", "codeEnhance", {
|
|
|
314
314
|
var search = np("@riebeckite/plugin-search", "searchPlugin");
|
|
315
315
|
var backlinks = np("@riebeckite/plugin-backlinks", "backlinksPlugin");
|
|
316
316
|
var breadcrumbs = np("@riebeckite/plugin-breadcrumbs", "breadcrumbsPlugin");
|
|
317
|
-
var navigationStarter = np(
|
|
318
|
-
"@riebeckite/plugin-navigation",
|
|
319
|
-
"navigation",
|
|
320
|
-
`{ items: [{ label: "Guide", href: "/guide" }, { label: "Examples", href: "/examples" }, { label: "Notes", href: "/notes/planning", children: [{ label: "Planning", href: "/notes/planning" }, { label: "Writing", href: "/notes/writing" }] }], secondary: [{ label: "Guide", href: "/guide" }, { label: "Examples", href: "/examples" }] }`
|
|
321
|
-
);
|
|
317
|
+
var navigationStarter = np("@riebeckite/plugin-navigation", "navigation");
|
|
322
318
|
var navigationShowcase = np(
|
|
323
319
|
"@riebeckite/plugin-navigation",
|
|
324
320
|
"navigation",
|
|
@@ -399,8 +395,7 @@ var codeTabs = np(
|
|
|
399
395
|
);
|
|
400
396
|
var codeAnnotations = np(
|
|
401
397
|
"@riebeckite/plugin-code-annotations",
|
|
402
|
-
"codeAnnotations"
|
|
403
|
-
`{ className: "rb-code" }`
|
|
398
|
+
"codeAnnotations"
|
|
404
399
|
);
|
|
405
400
|
var shortcodes = np(
|
|
406
401
|
"@riebeckite/plugin-shortcodes",
|
|
@@ -652,12 +647,11 @@ var minimal = {
|
|
|
652
647
|
var starter = {
|
|
653
648
|
name: "starter",
|
|
654
649
|
description: "Recommended default: a practical Markdown garden with search, navigation, and reading essentials.",
|
|
655
|
-
languages: [
|
|
650
|
+
languages: ["en"],
|
|
656
651
|
theme: defaultTheme,
|
|
657
652
|
plugins: [
|
|
658
653
|
obsidianMarkdown,
|
|
659
654
|
colorMode,
|
|
660
|
-
l10n,
|
|
661
655
|
seo,
|
|
662
656
|
toc,
|
|
663
657
|
properties,
|
|
@@ -671,8 +665,9 @@ var starter = {
|
|
|
671
665
|
recentPosts,
|
|
672
666
|
responsiveImage,
|
|
673
667
|
lightbox,
|
|
674
|
-
|
|
675
|
-
|
|
668
|
+
taxonomy,
|
|
669
|
+
folderPages,
|
|
670
|
+
hoverPreview
|
|
676
671
|
],
|
|
677
672
|
contentPages: ["index", "guide", "examples"],
|
|
678
673
|
readme: "standard"
|
|
@@ -776,6 +771,7 @@ function resolveScaffoldPreset(value) {
|
|
|
776
771
|
|
|
777
772
|
// src/scaffold/utilities.ts
|
|
778
773
|
var SCAFFOLD_UTILITY_NAMES = [
|
|
774
|
+
"gitignore",
|
|
779
775
|
"editorconfig",
|
|
780
776
|
"gitattributes",
|
|
781
777
|
"biome",
|
|
@@ -783,6 +779,11 @@ var SCAFFOLD_UTILITY_NAMES = [
|
|
|
783
779
|
"vscode"
|
|
784
780
|
];
|
|
785
781
|
var SCAFFOLD_UTILITIES = [
|
|
782
|
+
{
|
|
783
|
+
name: "gitignore",
|
|
784
|
+
label: ".gitignore",
|
|
785
|
+
description: "Git exclusions for dependencies, build output, and local files."
|
|
786
|
+
},
|
|
786
787
|
{
|
|
787
788
|
name: "editorconfig",
|
|
788
789
|
label: ".editorconfig",
|
|
@@ -810,6 +811,7 @@ var SCAFFOLD_UTILITIES = [
|
|
|
810
811
|
}
|
|
811
812
|
];
|
|
812
813
|
var SCAFFOLD_DEFAULT_UTILITIES = [
|
|
814
|
+
"gitignore",
|
|
813
815
|
"editorconfig",
|
|
814
816
|
"gitattributes",
|
|
815
817
|
"biome"
|
|
@@ -849,9 +851,10 @@ function utilityTemplateFiles(utilities) {
|
|
|
849
851
|
const files = [];
|
|
850
852
|
for (const name of utilities) {
|
|
851
853
|
for (const file of copyTemplateTree(`utilities/${name}`)) {
|
|
852
|
-
|
|
853
|
-
seen.
|
|
854
|
-
|
|
854
|
+
const path5 = name === "gitignore" ? ".gitignore" : file.path;
|
|
855
|
+
if (seen.has(path5)) continue;
|
|
856
|
+
seen.add(path5);
|
|
857
|
+
files.push({ ...file, path: path5 });
|
|
855
858
|
}
|
|
856
859
|
}
|
|
857
860
|
return files;
|
|
@@ -1339,10 +1342,11 @@ var PLUGIN_MARKDOWN_GUIDES = {
|
|
|
1339
1342
|
markdown: "This sentence contains ==highlighted text== inside normal Markdown."
|
|
1340
1343
|
},
|
|
1341
1344
|
"@riebeckite/plugin-code-annotations": {
|
|
1342
|
-
summary: "
|
|
1345
|
+
summary: "Renders code diffs with syntax highlighting for the target language.",
|
|
1343
1346
|
markdown: [
|
|
1344
|
-
"```ts",
|
|
1345
|
-
"const answer = 42
|
|
1347
|
+
"```diff ts",
|
|
1348
|
+
"+ const answer = 42",
|
|
1349
|
+
"- const answer = 0",
|
|
1346
1350
|
"console.log(answer)",
|
|
1347
1351
|
"```"
|
|
1348
1352
|
].join("\n")
|
|
@@ -2589,7 +2593,7 @@ function referenceThemesContent(preset) {
|
|
|
2589
2593
|
}
|
|
2590
2594
|
|
|
2591
2595
|
// src/scaffold/version.ts
|
|
2592
|
-
var RIEBECKITE_VERSION = "^0.0.
|
|
2596
|
+
var RIEBECKITE_VERSION = "^0.0.22";
|
|
2593
2597
|
|
|
2594
2598
|
// src/scaffold/templates.ts
|
|
2595
2599
|
function siteTemplateFiles(preset, variables, options = {}) {
|
|
@@ -2614,17 +2618,43 @@ function siteTemplateFiles(preset, variables, options = {}) {
|
|
|
2614
2618
|
var CONTENT_LANGUAGE_PATTERN = /^(.*)\.([a-z]{2}(?:-[A-Z]{2})?)\.md$/;
|
|
2615
2619
|
function presetContentFiles(preset, variables) {
|
|
2616
2620
|
const defaultLanguage = defaultLanguageForLocale(variables.locale);
|
|
2617
|
-
|
|
2621
|
+
const files = copyTemplateTree(`presets/${preset.name}/content`);
|
|
2622
|
+
if (preset.languages.length <= 1) {
|
|
2623
|
+
const selected = /* @__PURE__ */ new Map();
|
|
2624
|
+
for (const file of files) {
|
|
2625
|
+
const match = CONTENT_LANGUAGE_PATTERN.exec(file.path);
|
|
2626
|
+
if (!match || !SCAFFOLD_LANGUAGES.includes(match[2])) {
|
|
2627
|
+
selected.set(file.path, { file, score: 0 });
|
|
2628
|
+
continue;
|
|
2629
|
+
}
|
|
2630
|
+
const [, base, language] = match;
|
|
2631
|
+
const score = language === defaultLanguage ? 2 : language === "en" ? 1 : 0;
|
|
2632
|
+
const current = selected.get(base);
|
|
2633
|
+
if (!current || score > current.score) {
|
|
2634
|
+
selected.set(base, { file, score });
|
|
2635
|
+
}
|
|
2636
|
+
}
|
|
2637
|
+
return [...selected.entries()].map(([relativePath, { file }]) => ({
|
|
2638
|
+
path: `content/${relativePath.endsWith(".md") ? relativePath : `${relativePath}.md`}`,
|
|
2639
|
+
content: replaceTitle(file.content, variables.title)
|
|
2640
|
+
}));
|
|
2641
|
+
}
|
|
2642
|
+
return files.map((file) => {
|
|
2618
2643
|
const match = CONTENT_LANGUAGE_PATTERN.exec(file.path);
|
|
2619
2644
|
let relativePath = file.path;
|
|
2620
2645
|
if (match && SCAFFOLD_LANGUAGES.includes(match[2])) {
|
|
2621
2646
|
const [, base, language] = match;
|
|
2622
2647
|
relativePath = language === defaultLanguage ? `${base}.md` : `${base}.${language}.md`;
|
|
2623
2648
|
}
|
|
2624
|
-
|
|
2625
|
-
|
|
2649
|
+
return {
|
|
2650
|
+
path: `content/${relativePath}`,
|
|
2651
|
+
content: replaceTitle(file.content, variables.title)
|
|
2652
|
+
};
|
|
2626
2653
|
});
|
|
2627
2654
|
}
|
|
2655
|
+
function replaceTitle(content, title) {
|
|
2656
|
+
return typeof content === "string" ? content.split("{{title}}").join(title) : content;
|
|
2657
|
+
}
|
|
2628
2658
|
function packageJson(preset, variables, options) {
|
|
2629
2659
|
const dependencies = {
|
|
2630
2660
|
"@riebeckite/core": RIEBECKITE_VERSION,
|
|
@@ -2654,6 +2684,7 @@ function packageJson(preset, variables, options) {
|
|
|
2654
2684
|
dependencies,
|
|
2655
2685
|
devDependencies: {
|
|
2656
2686
|
"@hono/vite-build": "^1.11.1",
|
|
2687
|
+
"@hono/node-server": "^1.19.17",
|
|
2657
2688
|
"@riebeckite/cli": RIEBECKITE_VERSION,
|
|
2658
2689
|
"@types/node": "^24.5.2",
|
|
2659
2690
|
typescript: "^5.0.0",
|
|
@@ -2819,7 +2850,9 @@ function readmeEn(preset, variables) {
|
|
|
2819
2850
|
];
|
|
2820
2851
|
if (preset.readme !== "short") {
|
|
2821
2852
|
lines.push(`## ${words.included}`, "");
|
|
2822
|
-
lines.push(
|
|
2853
|
+
lines.push(
|
|
2854
|
+
`- **${words.languages}**: ${languagesLabel(preset, variables, words)}`
|
|
2855
|
+
);
|
|
2823
2856
|
lines.push(
|
|
2824
2857
|
`- **${words.theme}**: ${preset.theme ? `\`${preset.theme.package}\`` : words.none}`
|
|
2825
2858
|
);
|
|
@@ -2880,7 +2913,9 @@ function readmeJa(preset, variables) {
|
|
|
2880
2913
|
];
|
|
2881
2914
|
if (preset.readme !== "short") {
|
|
2882
2915
|
lines.push(`## ${words.included}`, "");
|
|
2883
|
-
lines.push(
|
|
2916
|
+
lines.push(
|
|
2917
|
+
`- **${words.languages}**: ${languagesLabel(preset, variables, words)}`
|
|
2918
|
+
);
|
|
2884
2919
|
lines.push(
|
|
2885
2920
|
`- **${words.theme}**: ${preset.theme ? `\`${preset.theme.package}\`` : words.none}`
|
|
2886
2921
|
);
|
|
@@ -2959,10 +2994,12 @@ function deploymentSecretLines(language) {
|
|
|
2959
2994
|
""
|
|
2960
2995
|
];
|
|
2961
2996
|
}
|
|
2962
|
-
function languagesLabel(preset, words) {
|
|
2997
|
+
function languagesLabel(preset, variables, words) {
|
|
2963
2998
|
if (preset.languages.length === 0) return words.none;
|
|
2964
|
-
if (preset.languages.length === 1)
|
|
2965
|
-
|
|
2999
|
+
if (preset.languages.length === 1) {
|
|
3000
|
+
const language = preset.name === "starter" ? defaultLanguageForLocale(variables.locale) : preset.languages[0];
|
|
3001
|
+
return `${language} (${words.single})`;
|
|
3002
|
+
}
|
|
2966
3003
|
return preset.languages.join(", ");
|
|
2967
3004
|
}
|
|
2968
3005
|
function pagesLabel(preset) {
|
|
@@ -314,11 +314,7 @@ var codeEnhance = np("@riebeckite/plugin-code-enhance", "codeEnhance", {
|
|
|
314
314
|
var search = np("@riebeckite/plugin-search", "searchPlugin");
|
|
315
315
|
var backlinks = np("@riebeckite/plugin-backlinks", "backlinksPlugin");
|
|
316
316
|
var breadcrumbs = np("@riebeckite/plugin-breadcrumbs", "breadcrumbsPlugin");
|
|
317
|
-
var navigationStarter = np(
|
|
318
|
-
"@riebeckite/plugin-navigation",
|
|
319
|
-
"navigation",
|
|
320
|
-
`{ items: [{ label: "Guide", href: "/guide" }, { label: "Examples", href: "/examples" }, { label: "Notes", href: "/notes/planning", children: [{ label: "Planning", href: "/notes/planning" }, { label: "Writing", href: "/notes/writing" }] }], secondary: [{ label: "Guide", href: "/guide" }, { label: "Examples", href: "/examples" }] }`
|
|
321
|
-
);
|
|
317
|
+
var navigationStarter = np("@riebeckite/plugin-navigation", "navigation");
|
|
322
318
|
var navigationShowcase = np(
|
|
323
319
|
"@riebeckite/plugin-navigation",
|
|
324
320
|
"navigation",
|
|
@@ -399,8 +395,7 @@ var codeTabs = np(
|
|
|
399
395
|
);
|
|
400
396
|
var codeAnnotations = np(
|
|
401
397
|
"@riebeckite/plugin-code-annotations",
|
|
402
|
-
"codeAnnotations"
|
|
403
|
-
`{ className: "rb-code" }`
|
|
398
|
+
"codeAnnotations"
|
|
404
399
|
);
|
|
405
400
|
var shortcodes = np(
|
|
406
401
|
"@riebeckite/plugin-shortcodes",
|
|
@@ -652,12 +647,11 @@ var minimal = {
|
|
|
652
647
|
var starter = {
|
|
653
648
|
name: "starter",
|
|
654
649
|
description: "Recommended default: a practical Markdown garden with search, navigation, and reading essentials.",
|
|
655
|
-
languages: [
|
|
650
|
+
languages: ["en"],
|
|
656
651
|
theme: defaultTheme,
|
|
657
652
|
plugins: [
|
|
658
653
|
obsidianMarkdown,
|
|
659
654
|
colorMode,
|
|
660
|
-
l10n,
|
|
661
655
|
seo,
|
|
662
656
|
toc,
|
|
663
657
|
properties,
|
|
@@ -671,8 +665,9 @@ var starter = {
|
|
|
671
665
|
recentPosts,
|
|
672
666
|
responsiveImage,
|
|
673
667
|
lightbox,
|
|
674
|
-
|
|
675
|
-
|
|
668
|
+
taxonomy,
|
|
669
|
+
folderPages,
|
|
670
|
+
hoverPreview
|
|
676
671
|
],
|
|
677
672
|
contentPages: ["index", "guide", "examples"],
|
|
678
673
|
readme: "standard"
|
|
@@ -926,10 +921,11 @@ var PLUGIN_MARKDOWN_GUIDES = {
|
|
|
926
921
|
markdown: "This sentence contains ==highlighted text== inside normal Markdown."
|
|
927
922
|
},
|
|
928
923
|
"@riebeckite/plugin-code-annotations": {
|
|
929
|
-
summary: "
|
|
924
|
+
summary: "Renders code diffs with syntax highlighting for the target language.",
|
|
930
925
|
markdown: [
|
|
931
|
-
"```ts",
|
|
932
|
-
"const answer = 42
|
|
926
|
+
"```diff ts",
|
|
927
|
+
"+ const answer = 42",
|
|
928
|
+
"- const answer = 0",
|
|
933
929
|
"console.log(answer)",
|
|
934
930
|
"```"
|
|
935
931
|
].join("\n")
|
|
@@ -2177,6 +2173,7 @@ function referenceThemesContent(preset) {
|
|
|
2177
2173
|
|
|
2178
2174
|
// src/scaffold/utilities.ts
|
|
2179
2175
|
var SCAFFOLD_UTILITY_NAMES = [
|
|
2176
|
+
"gitignore",
|
|
2180
2177
|
"editorconfig",
|
|
2181
2178
|
"gitattributes",
|
|
2182
2179
|
"biome",
|
|
@@ -2184,6 +2181,11 @@ var SCAFFOLD_UTILITY_NAMES = [
|
|
|
2184
2181
|
"vscode"
|
|
2185
2182
|
];
|
|
2186
2183
|
var SCAFFOLD_UTILITIES = [
|
|
2184
|
+
{
|
|
2185
|
+
name: "gitignore",
|
|
2186
|
+
label: ".gitignore",
|
|
2187
|
+
description: "Git exclusions for dependencies, build output, and local files."
|
|
2188
|
+
},
|
|
2187
2189
|
{
|
|
2188
2190
|
name: "editorconfig",
|
|
2189
2191
|
label: ".editorconfig",
|
|
@@ -2211,6 +2213,7 @@ var SCAFFOLD_UTILITIES = [
|
|
|
2211
2213
|
}
|
|
2212
2214
|
];
|
|
2213
2215
|
var SCAFFOLD_DEFAULT_UTILITIES = [
|
|
2216
|
+
"gitignore",
|
|
2214
2217
|
"editorconfig",
|
|
2215
2218
|
"gitattributes",
|
|
2216
2219
|
"biome"
|
|
@@ -2250,16 +2253,17 @@ function utilityTemplateFiles(utilities) {
|
|
|
2250
2253
|
const files = [];
|
|
2251
2254
|
for (const name of utilities) {
|
|
2252
2255
|
for (const file of copyTemplateTree(`utilities/${name}`)) {
|
|
2253
|
-
|
|
2254
|
-
seen.
|
|
2255
|
-
|
|
2256
|
+
const path4 = name === "gitignore" ? ".gitignore" : file.path;
|
|
2257
|
+
if (seen.has(path4)) continue;
|
|
2258
|
+
seen.add(path4);
|
|
2259
|
+
files.push({ ...file, path: path4 });
|
|
2256
2260
|
}
|
|
2257
2261
|
}
|
|
2258
2262
|
return files;
|
|
2259
2263
|
}
|
|
2260
2264
|
|
|
2261
2265
|
// src/scaffold/version.ts
|
|
2262
|
-
var RIEBECKITE_VERSION = "^0.0.
|
|
2266
|
+
var RIEBECKITE_VERSION = "^0.0.22";
|
|
2263
2267
|
|
|
2264
2268
|
// src/scaffold/templates.ts
|
|
2265
2269
|
function siteTemplateFiles(preset, variables, options = {}) {
|
|
@@ -2284,17 +2288,43 @@ function siteTemplateFiles(preset, variables, options = {}) {
|
|
|
2284
2288
|
var CONTENT_LANGUAGE_PATTERN = /^(.*)\.([a-z]{2}(?:-[A-Z]{2})?)\.md$/;
|
|
2285
2289
|
function presetContentFiles(preset, variables) {
|
|
2286
2290
|
const defaultLanguage = defaultLanguageForLocale(variables.locale);
|
|
2287
|
-
|
|
2291
|
+
const files = copyTemplateTree(`presets/${preset.name}/content`);
|
|
2292
|
+
if (preset.languages.length <= 1) {
|
|
2293
|
+
const selected = /* @__PURE__ */ new Map();
|
|
2294
|
+
for (const file of files) {
|
|
2295
|
+
const match = CONTENT_LANGUAGE_PATTERN.exec(file.path);
|
|
2296
|
+
if (!match || !SCAFFOLD_LANGUAGES.includes(match[2])) {
|
|
2297
|
+
selected.set(file.path, { file, score: 0 });
|
|
2298
|
+
continue;
|
|
2299
|
+
}
|
|
2300
|
+
const [, base, language] = match;
|
|
2301
|
+
const score = language === defaultLanguage ? 2 : language === "en" ? 1 : 0;
|
|
2302
|
+
const current = selected.get(base);
|
|
2303
|
+
if (!current || score > current.score) {
|
|
2304
|
+
selected.set(base, { file, score });
|
|
2305
|
+
}
|
|
2306
|
+
}
|
|
2307
|
+
return [...selected.entries()].map(([relativePath, { file }]) => ({
|
|
2308
|
+
path: `content/${relativePath.endsWith(".md") ? relativePath : `${relativePath}.md`}`,
|
|
2309
|
+
content: replaceTitle(file.content, variables.title)
|
|
2310
|
+
}));
|
|
2311
|
+
}
|
|
2312
|
+
return files.map((file) => {
|
|
2288
2313
|
const match = CONTENT_LANGUAGE_PATTERN.exec(file.path);
|
|
2289
2314
|
let relativePath = file.path;
|
|
2290
2315
|
if (match && SCAFFOLD_LANGUAGES.includes(match[2])) {
|
|
2291
2316
|
const [, base, language] = match;
|
|
2292
2317
|
relativePath = language === defaultLanguage ? `${base}.md` : `${base}.${language}.md`;
|
|
2293
2318
|
}
|
|
2294
|
-
|
|
2295
|
-
|
|
2319
|
+
return {
|
|
2320
|
+
path: `content/${relativePath}`,
|
|
2321
|
+
content: replaceTitle(file.content, variables.title)
|
|
2322
|
+
};
|
|
2296
2323
|
});
|
|
2297
2324
|
}
|
|
2325
|
+
function replaceTitle(content, title) {
|
|
2326
|
+
return typeof content === "string" ? content.split("{{title}}").join(title) : content;
|
|
2327
|
+
}
|
|
2298
2328
|
function packageJson(preset, variables, options) {
|
|
2299
2329
|
const dependencies = {
|
|
2300
2330
|
"@riebeckite/core": RIEBECKITE_VERSION,
|
|
@@ -2324,6 +2354,7 @@ function packageJson(preset, variables, options) {
|
|
|
2324
2354
|
dependencies,
|
|
2325
2355
|
devDependencies: {
|
|
2326
2356
|
"@hono/vite-build": "^1.11.1",
|
|
2357
|
+
"@hono/node-server": "^1.19.17",
|
|
2327
2358
|
"@riebeckite/cli": RIEBECKITE_VERSION,
|
|
2328
2359
|
"@types/node": "^24.5.2",
|
|
2329
2360
|
typescript: "^5.0.0",
|
|
@@ -2489,7 +2520,9 @@ function readmeEn(preset, variables) {
|
|
|
2489
2520
|
];
|
|
2490
2521
|
if (preset.readme !== "short") {
|
|
2491
2522
|
lines.push(`## ${words.included}`, "");
|
|
2492
|
-
lines.push(
|
|
2523
|
+
lines.push(
|
|
2524
|
+
`- **${words.languages}**: ${languagesLabel(preset, variables, words)}`
|
|
2525
|
+
);
|
|
2493
2526
|
lines.push(
|
|
2494
2527
|
`- **${words.theme}**: ${preset.theme ? `\`${preset.theme.package}\`` : words.none}`
|
|
2495
2528
|
);
|
|
@@ -2550,7 +2583,9 @@ function readmeJa(preset, variables) {
|
|
|
2550
2583
|
];
|
|
2551
2584
|
if (preset.readme !== "short") {
|
|
2552
2585
|
lines.push(`## ${words.included}`, "");
|
|
2553
|
-
lines.push(
|
|
2586
|
+
lines.push(
|
|
2587
|
+
`- **${words.languages}**: ${languagesLabel(preset, variables, words)}`
|
|
2588
|
+
);
|
|
2554
2589
|
lines.push(
|
|
2555
2590
|
`- **${words.theme}**: ${preset.theme ? `\`${preset.theme.package}\`` : words.none}`
|
|
2556
2591
|
);
|
|
@@ -2629,10 +2664,12 @@ function deploymentSecretLines(language) {
|
|
|
2629
2664
|
""
|
|
2630
2665
|
];
|
|
2631
2666
|
}
|
|
2632
|
-
function languagesLabel(preset, words) {
|
|
2667
|
+
function languagesLabel(preset, variables, words) {
|
|
2633
2668
|
if (preset.languages.length === 0) return words.none;
|
|
2634
|
-
if (preset.languages.length === 1)
|
|
2635
|
-
|
|
2669
|
+
if (preset.languages.length === 1) {
|
|
2670
|
+
const language = preset.name === "starter" ? defaultLanguageForLocale(variables.locale) : preset.languages[0];
|
|
2671
|
+
return `${language} (${words.single})`;
|
|
2672
|
+
}
|
|
2636
2673
|
return preset.languages.join(", ");
|
|
2637
2674
|
}
|
|
2638
2675
|
function pagesLabel(preset) {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { SiteTemplateFile } from "./templates.js";
|
|
2
|
-
export declare const SCAFFOLD_UTILITY_NAMES: readonly ["editorconfig", "gitattributes", "biome", "npmrc", "vscode"];
|
|
2
|
+
export declare const SCAFFOLD_UTILITY_NAMES: readonly ["gitignore", "editorconfig", "gitattributes", "biome", "npmrc", "vscode"];
|
|
3
3
|
export type ScaffoldUtilityName = (typeof SCAFFOLD_UTILITY_NAMES)[number];
|
|
4
4
|
export type ScaffoldUtilitySummary = {
|
|
5
5
|
readonly name: ScaffoldUtilityName;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare const RIEBECKITE_VERSION = "^0.0.
|
|
1
|
+
export declare const RIEBECKITE_VERSION = "^0.0.22";
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "create-riebeckite",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.22",
|
|
4
4
|
"license": "Apache-2.0",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./dist/src/index.js",
|
|
@@ -39,7 +39,7 @@
|
|
|
39
39
|
},
|
|
40
40
|
"devDependencies": {
|
|
41
41
|
"esbuild": "^0.28.2",
|
|
42
|
-
"@riebeckite/test": "0.0.
|
|
42
|
+
"@riebeckite/test": "0.0.22"
|
|
43
43
|
},
|
|
44
44
|
"repository": {
|
|
45
45
|
"type": "git",
|
|
@@ -39,6 +39,14 @@ body {
|
|
|
39
39
|
display: none;
|
|
40
40
|
}
|
|
41
41
|
|
|
42
|
+
@media (min-width: 48rem) {
|
|
43
|
+
.site-article__aside {
|
|
44
|
+
display: block;
|
|
45
|
+
min-width: 0;
|
|
46
|
+
margin-block: var(--rb-space-4, 2rem);
|
|
47
|
+
}
|
|
48
|
+
}
|
|
49
|
+
|
|
42
50
|
@media (min-width: 88rem) {
|
|
43
51
|
:is(:root, .rb-theme-root)[data-article-layout="article"] .site-article__footer {
|
|
44
52
|
grid-column: 1;
|
|
@@ -48,16 +56,12 @@ body {
|
|
|
48
56
|
display: block;
|
|
49
57
|
grid-column: 1;
|
|
50
58
|
grid-row: 1;
|
|
51
|
-
position: sticky;
|
|
52
|
-
top: 4rem;
|
|
53
59
|
align-self: start;
|
|
54
60
|
width: var(--rb-layout-sidebar, 14rem);
|
|
55
|
-
max-height: calc(100dvh - 8rem);
|
|
56
61
|
margin-inline-start: calc(
|
|
57
62
|
-1 * var(--rb-layout-sidebar, 14rem) -
|
|
58
63
|
var(--rb-layout-gap, 2rem)
|
|
59
64
|
);
|
|
60
|
-
overflow: auto;
|
|
61
65
|
padding-inline-end: 1rem;
|
|
62
66
|
border-inline-end: 1px solid
|
|
63
67
|
color-mix(in oklab, currentColor 18%, transparent);
|
|
@@ -43,7 +43,7 @@ body {
|
|
|
43
43
|
|
|
44
44
|
.site-header,
|
|
45
45
|
.rb-site-footer {
|
|
46
|
-
width: min(100% - 2rem, var(--rb-layout-
|
|
46
|
+
width: min(100% - 2rem, var(--rb-layout-page-max, 80rem));
|
|
47
47
|
}
|
|
48
48
|
|
|
49
49
|
.site-header__home {
|
|
@@ -99,7 +99,14 @@ body {
|
|
|
99
99
|
border-top: 1px solid var(--rb-color-border);
|
|
100
100
|
}
|
|
101
101
|
|
|
102
|
-
@media (max-width: 48rem) {
|
|
102
|
+
@media (min-width: 30.001rem) and (max-width: 48rem) {
|
|
103
|
+
.rb-site-header,
|
|
104
|
+
.rb-nav > .rb-nav__list {
|
|
105
|
+
flex-wrap: wrap;
|
|
106
|
+
}
|
|
107
|
+
}
|
|
108
|
+
|
|
109
|
+
@media (max-width: 30rem) {
|
|
103
110
|
.riebeckite-page {
|
|
104
111
|
padding-block: var(--rb-space-3, 1.5rem);
|
|
105
112
|
}
|
|
@@ -174,6 +181,14 @@ body {
|
|
|
174
181
|
display: none;
|
|
175
182
|
}
|
|
176
183
|
|
|
184
|
+
@media (min-width: 48rem) {
|
|
185
|
+
.site-article__aside {
|
|
186
|
+
display: block;
|
|
187
|
+
min-width: 0;
|
|
188
|
+
margin-block: var(--rb-space-4, 2rem);
|
|
189
|
+
}
|
|
190
|
+
}
|
|
191
|
+
|
|
177
192
|
@media (min-width: 88rem) {
|
|
178
193
|
:is(:root, .rb-theme-root)[data-article-layout="article"] .site-article__footer {
|
|
179
194
|
grid-column: 1;
|
|
@@ -183,16 +198,12 @@ body {
|
|
|
183
198
|
display: block;
|
|
184
199
|
grid-column: 1;
|
|
185
200
|
grid-row: 1;
|
|
186
|
-
position: sticky;
|
|
187
|
-
top: 4rem;
|
|
188
201
|
align-self: start;
|
|
189
202
|
width: var(--rb-layout-sidebar, 14rem);
|
|
190
|
-
max-height: calc(100dvh - 8rem);
|
|
191
203
|
margin-inline-start: calc(
|
|
192
204
|
-1 * var(--rb-layout-sidebar, 14rem) -
|
|
193
205
|
var(--rb-layout-gap, 2rem)
|
|
194
206
|
);
|
|
195
|
-
overflow: auto;
|
|
196
207
|
padding-inline-end: 1rem;
|
|
197
208
|
border-inline-end: 1px solid
|
|
198
209
|
color-mix(in oklab, currentColor 18%, transparent);
|
|
@@ -43,7 +43,7 @@ body {
|
|
|
43
43
|
|
|
44
44
|
.site-header,
|
|
45
45
|
.rb-site-footer {
|
|
46
|
-
width: min(100% - 2rem, var(--rb-layout-
|
|
46
|
+
width: min(100% - 2rem, var(--rb-layout-page-max, 80rem));
|
|
47
47
|
}
|
|
48
48
|
|
|
49
49
|
.site-header__home {
|
|
@@ -99,7 +99,14 @@ body {
|
|
|
99
99
|
border-top: 1px solid var(--rb-color-border);
|
|
100
100
|
}
|
|
101
101
|
|
|
102
|
-
@media (max-width: 48rem) {
|
|
102
|
+
@media (min-width: 30.001rem) and (max-width: 48rem) {
|
|
103
|
+
.rb-site-header,
|
|
104
|
+
.rb-nav > .rb-nav__list {
|
|
105
|
+
flex-wrap: wrap;
|
|
106
|
+
}
|
|
107
|
+
}
|
|
108
|
+
|
|
109
|
+
@media (max-width: 30rem) {
|
|
103
110
|
.riebeckite-page {
|
|
104
111
|
padding-block: var(--rb-space-3, 1.5rem);
|
|
105
112
|
}
|
|
@@ -174,6 +181,14 @@ body {
|
|
|
174
181
|
display: none;
|
|
175
182
|
}
|
|
176
183
|
|
|
184
|
+
@media (min-width: 48rem) {
|
|
185
|
+
.site-article__aside {
|
|
186
|
+
display: block;
|
|
187
|
+
min-width: 0;
|
|
188
|
+
margin-block: var(--rb-space-4, 2rem);
|
|
189
|
+
}
|
|
190
|
+
}
|
|
191
|
+
|
|
177
192
|
@media (min-width: 88rem) {
|
|
178
193
|
:is(:root, .rb-theme-root)[data-article-layout="article"] .site-article__footer {
|
|
179
194
|
grid-column: 1;
|
|
@@ -183,16 +198,12 @@ body {
|
|
|
183
198
|
display: block;
|
|
184
199
|
grid-column: 1;
|
|
185
200
|
grid-row: 1;
|
|
186
|
-
position: sticky;
|
|
187
|
-
top: 4rem;
|
|
188
201
|
align-self: start;
|
|
189
202
|
width: var(--rb-layout-sidebar, 14rem);
|
|
190
|
-
max-height: calc(100dvh - 8rem);
|
|
191
203
|
margin-inline-start: calc(
|
|
192
204
|
-1 * var(--rb-layout-sidebar, 14rem) -
|
|
193
205
|
var(--rb-layout-gap, 2rem)
|
|
194
206
|
);
|
|
195
|
-
overflow: auto;
|
|
196
207
|
padding-inline-end: 1rem;
|
|
197
208
|
border-inline-end: 1px solid
|
|
198
209
|
color-mix(in oklab, currentColor 18%, transparent);
|
|
@@ -5,12 +5,9 @@ date: 2026-09-30
|
|
|
5
5
|
tags: [riebeckite, project]
|
|
6
6
|
status: active
|
|
7
7
|
aliases: [/start-here/]
|
|
8
|
-
series: publish-a-site
|
|
9
|
-
series_title: Publish a site
|
|
10
|
-
series_order: 1
|
|
11
8
|
publish: true
|
|
12
9
|
---
|
|
13
10
|
|
|
14
11
|
# Planning a Markdown site
|
|
15
12
|
|
|
16
|
-
Start with [[writing]] to see backlinks, related posts,
|
|
13
|
+
Start with [[writing]] to see backlinks, related posts, and tags working together.
|
|
@@ -4,12 +4,9 @@ description: A second connected note for search and related-content examples.
|
|
|
4
4
|
date: 2026-10-01
|
|
5
5
|
tags: [riebeckite, project]
|
|
6
6
|
status: active
|
|
7
|
-
series: publish-a-site
|
|
8
|
-
series_title: Publish a site
|
|
9
|
-
series_order: 2
|
|
10
7
|
publish: true
|
|
11
8
|
---
|
|
12
9
|
|
|
13
10
|
# Writing the first note
|
|
14
11
|
|
|
15
|
-
This note links back to [[planning]]. Search for **Markdown site** or browse the generated tags.
|
|
12
|
+
This note links back to [[planning]]. Search for **Markdown site** or browse the generated tags.
|