create-riebeckite 0.0.11 → 0.0.13
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 +37 -23
- package/README_ja.md +34 -20
- package/dist/src/index.d.ts +3 -0
- package/dist/src/index.js +32 -3
- package/package.json +2 -2
package/README.md
CHANGED
|
@@ -18,16 +18,37 @@ npm exec riebeckite build
|
|
|
18
18
|
| Option | Description |
|
|
19
19
|
| --- | --- |
|
|
20
20
|
| `[directory]` | Directory to scaffold into (default: the current directory) |
|
|
21
|
-
| `--preset <name>` | Starter composition, e.g. `
|
|
21
|
+
| `--preset <name>` | Starter composition, e.g. `showcase` (default: `starter`) |
|
|
22
22
|
| `--force` | Scaffold even when the target directory is not empty |
|
|
23
23
|
| `--list-presets` | Print the available presets and their descriptions, then exit |
|
|
24
|
+
| `--github-actions` | Generate the Cloudflare deployment workflow |
|
|
25
|
+
| `--content-repository <owner/repository>` | Use this repository as the deployment content source. Requires `--github-actions` and `--site-repository`; also generates `github/notify-site.yml`. |
|
|
26
|
+
| `--site-repository <owner/repository>` | Site repository that the generated content workflow notifies. Required with `--content-repository`. |
|
|
24
27
|
|
|
25
|
-
For example, scaffold
|
|
28
|
+
For example, scaffold the complete feature tour:
|
|
26
29
|
|
|
27
30
|
```sh
|
|
28
|
-
npx create-riebeckite my-site --preset
|
|
31
|
+
npx create-riebeckite my-site --preset showcase
|
|
29
32
|
```
|
|
30
33
|
|
|
34
|
+
To use a separate content repository and deploy after its `main` branch is
|
|
35
|
+
pushed, generate the common workflow once (the preset does not affect it):
|
|
36
|
+
|
|
37
|
+
```sh
|
|
38
|
+
npx create-riebeckite my-site --github-actions \
|
|
39
|
+
--content-repository OWNER/notes \
|
|
40
|
+
--site-repository OWNER/my-site
|
|
41
|
+
```
|
|
42
|
+
|
|
43
|
+
Set `content.directory` to `"content"`, add the documented repository secrets,
|
|
44
|
+
then copy `github/notify-site.yml` into the content repository as
|
|
45
|
+
`.github/workflows/notify-site.yml`. See the [separate-content deployment
|
|
46
|
+
guide](../../templates/cloudflare/README_en.md).
|
|
47
|
+
|
|
48
|
+
`--content-repository` automatically configures the external checkout, the
|
|
49
|
+
`content-updated` repository-dispatch receiver, and `github/notify-site.yml`.
|
|
50
|
+
The previous notification option was removed; omit it when migrating an older command.
|
|
51
|
+
|
|
31
52
|
## Presets
|
|
32
53
|
|
|
33
54
|
List the available presets with `--list-presets`:
|
|
@@ -36,38 +57,31 @@ List the available presets with `--list-presets`:
|
|
|
36
57
|
npx create-riebeckite --list-presets
|
|
37
58
|
```
|
|
38
59
|
|
|
39
|
-
Every preset is a self-contained starter description
|
|
40
|
-
largest:
|
|
60
|
+
Every preset is a self-contained starter description:
|
|
41
61
|
|
|
42
|
-
| Preset
|
|
43
|
-
|
|
|
44
|
-
| `
|
|
45
|
-
| `minimal` | minimal
|
|
46
|
-
| `
|
|
47
|
-
| `
|
|
48
|
-
| `full` | default | 23 | rich + guide |
|
|
49
|
-
| `max` | default | 46 | full + examples |
|
|
50
|
-
| `ultra` | default | 52 | max + reference/plugins, reference/themes |
|
|
62
|
+
| Preset | Purpose |
|
|
63
|
+
| --- | --- |
|
|
64
|
+
| `starter` | Recommended for most sites |
|
|
65
|
+
| `minimal` | Small Markdown site with minimal configuration |
|
|
66
|
+
| `showcase` | Explore Riebeckite features and plugins with rendered examples and local fixtures |
|
|
67
|
+
| `empty` | Blank shell for custom setups |
|
|
51
68
|
|
|
52
69
|
Each preset has a one-line description, shown by `--list-presets`:
|
|
53
70
|
|
|
71
|
+
- `starter` — Recommended for most sites: practical Markdown publishing, search, and discovery.
|
|
72
|
+
- `minimal` — The smallest useful site: Obsidian Markdown, the minimal theme, and one page.
|
|
73
|
+
- `showcase` — The complete plugin catalog with rendered examples, local fixtures, and reference pages.
|
|
54
74
|
- `empty` — A blank application shell: no plugins, theme, content, or components.
|
|
55
|
-
- `minimal` — The smallest useful site: Obsidian Markdown, the minimal theme, one page.
|
|
56
|
-
- `starter` — The default starter: Obsidian Markdown, color mode, seven languages, and a site header.
|
|
57
|
-
- `rich` — Publishing and reading plugins plus guided ecosystem tour pages in seven languages.
|
|
58
|
-
- `full` — A ready blog: discovery, media, and reading plugins plus a build guide.
|
|
59
|
-
- `max` — Diagram and knowledge plugins on top of `full`, with showcase example pages.
|
|
60
|
-
- `ultra` — The full plugin catalog and theme reference pages — everything the ecosystem offers.
|
|
61
75
|
|
|
62
76
|
Presets are defined in `@riebeckite/honox` and can be imported into your own
|
|
63
77
|
tooling:
|
|
64
78
|
|
|
65
79
|
```ts
|
|
66
|
-
import { scaffoldRiebeckiteSite,
|
|
80
|
+
import { scaffoldRiebeckiteSite, showcase } from "@riebeckite/honox";
|
|
67
81
|
|
|
68
82
|
await scaffoldRiebeckiteSite({
|
|
69
83
|
targetDirectory: "./my-site",
|
|
70
|
-
preset:
|
|
84
|
+
preset: showcase,
|
|
71
85
|
});
|
|
72
86
|
```
|
|
73
87
|
|
|
@@ -76,4 +90,4 @@ await scaffoldRiebeckiteSite({
|
|
|
76
90
|
Riebeckite is an extensible framework for publishing Markdown and
|
|
77
91
|
Obsidian-oriented notes on the web. See the
|
|
78
92
|
[Riebeckite documentation](https://github.com/Rerurate514/riebeckite#readme)
|
|
79
|
-
for configuration and plugin guidance.
|
|
93
|
+
for configuration and plugin guidance.
|
package/README_ja.md
CHANGED
|
@@ -22,13 +22,33 @@ npm exec riebeckite build
|
|
|
22
22
|
| `--preset <name>` | 使用するスターター構成(既定は `starter`) |
|
|
23
23
|
| `--force` | 空でないディレクトリにも展開する |
|
|
24
24
|
| `--list-presets` | 利用可能な preset と説明を一覧表示して終了する |
|
|
25
|
+
| `--github-actions` | Cloudflare へのデプロイ workflow を生成する |
|
|
26
|
+
| `--content-repository <owner/repository>` | このリポジトリをデプロイ時の content source にする。`--github-actions` と `--site-repository` が必要で、`github/notify-site.yml` も生成する。 |
|
|
27
|
+
| `--site-repository <owner/repository>` | 生成した記事通知 workflow の通知先 site リポジトリ。`--content-repository` と同時に必要。 |
|
|
25
28
|
|
|
26
|
-
|
|
29
|
+
たとえば、機能を一通り確認できる `showcase` preset で生成する場合は次のとおりです。
|
|
27
30
|
|
|
28
31
|
```sh
|
|
29
|
-
npx create-riebeckite my-site --preset
|
|
32
|
+
npx create-riebeckite my-site --preset showcase
|
|
30
33
|
```
|
|
31
34
|
|
|
35
|
+
別の記事リポジトリを使い、その `main` への push でデプロイする場合は、共通の
|
|
36
|
+
workflow を一度だけ生成します。preset による違いはありません。
|
|
37
|
+
|
|
38
|
+
```sh
|
|
39
|
+
npx create-riebeckite my-site --github-actions \
|
|
40
|
+
--content-repository OWNER/notes \
|
|
41
|
+
--site-repository OWNER/my-site
|
|
42
|
+
```
|
|
43
|
+
|
|
44
|
+
`content.directory` は `"content"` にし、必要な repository Secret を登録した後、
|
|
45
|
+
`github/notify-site.yml` を記事リポジトリの
|
|
46
|
+
`.github/workflows/notify-site.yml` にコピーします。詳細は[別記事リポジトリの
|
|
47
|
+
デプロイガイド](../../templates/cloudflare/README_ja.md)を参照してください。
|
|
48
|
+
|
|
49
|
+
`--content-repository` を指定すると、外部 content の checkout、
|
|
50
|
+
`content-updated` の repository dispatch receiver、`github/notify-site.yml` がまとめて構成されます。以前の通知用オプションは廃止しました。
|
|
51
|
+
|
|
32
52
|
## Preset
|
|
33
53
|
|
|
34
54
|
利用可能な preset は `--list-presets` で確認できます。
|
|
@@ -37,29 +57,23 @@ npx create-riebeckite my-site --preset rich
|
|
|
37
57
|
npx create-riebeckite --list-presets
|
|
38
58
|
```
|
|
39
59
|
|
|
40
|
-
すべての preset
|
|
60
|
+
すべての preset は自己完結のスターターです。
|
|
41
61
|
|
|
42
|
-
| Preset |
|
|
43
|
-
| --- | --- |
|
|
44
|
-
| `
|
|
45
|
-
| `minimal` |
|
|
46
|
-
| `
|
|
47
|
-
| `
|
|
48
|
-
| `full` | default | 23 | rich + guide |
|
|
49
|
-
| `max` | default | 46 | full + examples |
|
|
50
|
-
| `ultra` | default | 52 | max + reference/plugins、reference/themes |
|
|
62
|
+
| Preset | 用途 |
|
|
63
|
+
| --- | --- |
|
|
64
|
+
| `starter` | 大半のサイトにおすすめ |
|
|
65
|
+
| `minimal` | 最小限の設定で作る Markdown サイト |
|
|
66
|
+
| `showcase` | 描画例とローカルのフィクスチャで Riebeckite の機能と Plugin を確認する構成 |
|
|
67
|
+
| `empty` | 独自構成のための空のシェル |
|
|
51
68
|
|
|
52
69
|
各 preset の説明は次のとおりです(`--list-presets` で表示される内容と同じです)。
|
|
53
70
|
|
|
54
|
-
- `
|
|
55
|
-
- `minimal` —
|
|
56
|
-
- `
|
|
57
|
-
- `
|
|
58
|
-
- `full` — ブログ一式(検索・メディア・関連記事などの Plugin とビルドガイド)
|
|
59
|
-
- `max` — `full` に図表・ナレッジ系 Plugin とサンプルページを追加
|
|
60
|
-
- `ultra` — 全 Plugin カタログと Theme リファレンスページ(エコシステムの一式)
|
|
71
|
+
- `starter` — 大半のサイト向け。Markdown の公開、検索、記事の発見に必要な機能を含みます。
|
|
72
|
+
- `minimal` — Obsidian Markdown、minimal Theme、1 ページだけの最小構成です。
|
|
73
|
+
- `showcase` — 全 Plugin カタログ、描画例、ローカルの fixture、リファレンスページを含みます。
|
|
74
|
+
- `empty` — Plugin・Theme・コンテンツ・コンポーネントを含まない空のシェルです。
|
|
61
75
|
|
|
62
76
|
Riebeckite は、Markdown や Obsidian 由来のノートを Web で公開するための
|
|
63
77
|
拡張可能なフレームワークです。設定方法やプラグインについては
|
|
64
78
|
[Riebeckite ドキュメント](https://github.com/Rerurate514/riebeckite#readme)
|
|
65
|
-
を参照してください。
|
|
79
|
+
を参照してください。
|
package/dist/src/index.d.ts
CHANGED
|
@@ -4,5 +4,8 @@ export type CreateRiebeckiteOptions = {
|
|
|
4
4
|
readonly force: boolean;
|
|
5
5
|
readonly preset: ScaffoldPresetName;
|
|
6
6
|
readonly listPresets: boolean;
|
|
7
|
+
readonly githubActions: boolean;
|
|
8
|
+
readonly contentRepository?: string;
|
|
9
|
+
readonly siteRepository?: string;
|
|
7
10
|
};
|
|
8
11
|
export declare function runCreateRiebeckite(arguments_: readonly string[]): Promise<void>;
|
package/dist/src/index.js
CHANGED
|
@@ -26,12 +26,21 @@ async function runCreateRiebeckite(arguments_) {
|
|
|
26
26
|
const result = await scaffoldRiebeckiteSite({
|
|
27
27
|
targetDirectory,
|
|
28
28
|
overwrite: options.force,
|
|
29
|
-
preset: options.preset
|
|
29
|
+
preset: options.preset,
|
|
30
|
+
githubActions: options.githubActions,
|
|
31
|
+
contentRepository: options.contentRepository,
|
|
32
|
+
siteRepository: options.siteRepository
|
|
30
33
|
});
|
|
31
34
|
const relative = path.relative(process.cwd(), result.targetDirectory) || ".";
|
|
32
35
|
console.log(`Created a ${options.preset} Riebeckite site in ${relative}`);
|
|
33
36
|
console.log("");
|
|
34
37
|
console.log(formatScaffoldNextSteps(relative));
|
|
38
|
+
if (options.contentRepository !== void 0) {
|
|
39
|
+
console.log("");
|
|
40
|
+
console.log(
|
|
41
|
+
"Copy github/notify-site.yml to the content repository as .github/workflows/notify-site.yml."
|
|
42
|
+
);
|
|
43
|
+
}
|
|
35
44
|
} catch (error) {
|
|
36
45
|
if (error instanceof ScaffoldSiteError) {
|
|
37
46
|
console.error(error.message);
|
|
@@ -46,6 +55,9 @@ function parseArguments(arguments_) {
|
|
|
46
55
|
let force = false;
|
|
47
56
|
let preset;
|
|
48
57
|
let listPresets = false;
|
|
58
|
+
let githubActions = false;
|
|
59
|
+
let contentRepository;
|
|
60
|
+
let siteRepository;
|
|
49
61
|
for (let index = 0; index < arguments_.length; index += 1) {
|
|
50
62
|
const argument = arguments_[index];
|
|
51
63
|
if (argument === "--force") {
|
|
@@ -56,6 +68,20 @@ function parseArguments(arguments_) {
|
|
|
56
68
|
listPresets = true;
|
|
57
69
|
continue;
|
|
58
70
|
}
|
|
71
|
+
if (argument === "--github-actions") {
|
|
72
|
+
githubActions = true;
|
|
73
|
+
continue;
|
|
74
|
+
}
|
|
75
|
+
if (argument === "--content-repository" || argument === "--site-repository") {
|
|
76
|
+
const value = arguments_[index + 1];
|
|
77
|
+
if (value === void 0 || value.startsWith("-")) {
|
|
78
|
+
throw new Error(`${argument} requires an owner/repository value.`);
|
|
79
|
+
}
|
|
80
|
+
if (argument === "--content-repository") contentRepository = value;
|
|
81
|
+
else siteRepository = value;
|
|
82
|
+
index += 1;
|
|
83
|
+
continue;
|
|
84
|
+
}
|
|
59
85
|
if (argument === "--preset") {
|
|
60
86
|
const value = arguments_[index + 1];
|
|
61
87
|
if (value === void 0 || !isScaffoldPresetName(value)) {
|
|
@@ -72,7 +98,7 @@ function parseArguments(arguments_) {
|
|
|
72
98
|
}
|
|
73
99
|
if (directory !== void 0) {
|
|
74
100
|
throw new Error(
|
|
75
|
-
"Usage: create-riebeckite [directory] [--preset <name>] [--force]"
|
|
101
|
+
"Usage: create-riebeckite [directory] [--preset <name>] [--github-actions] [--content-repository <owner/repository>] [--site-repository <owner/repository>] [--force]"
|
|
76
102
|
);
|
|
77
103
|
}
|
|
78
104
|
directory = argument;
|
|
@@ -81,7 +107,10 @@ function parseArguments(arguments_) {
|
|
|
81
107
|
directory: directory ?? ".",
|
|
82
108
|
force,
|
|
83
109
|
preset: preset ?? "starter",
|
|
84
|
-
listPresets
|
|
110
|
+
listPresets,
|
|
111
|
+
githubActions,
|
|
112
|
+
contentRepository,
|
|
113
|
+
siteRepository
|
|
85
114
|
};
|
|
86
115
|
}
|
|
87
116
|
function printPresets() {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "create-riebeckite",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.13",
|
|
4
4
|
"license": "Apache-2.0",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./dist/src/index.js",
|
|
@@ -27,7 +27,7 @@
|
|
|
27
27
|
"access": "public"
|
|
28
28
|
},
|
|
29
29
|
"dependencies": {
|
|
30
|
-
"@riebeckite/honox": "0.0.
|
|
30
|
+
"@riebeckite/honox": "0.0.13"
|
|
31
31
|
},
|
|
32
32
|
"repository": {
|
|
33
33
|
"type": "git",
|