@riebeckite/plugin-daily-notes 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.
Files changed (3) hide show
  1. package/README.md +12 -5
  2. package/README_ja.md +10 -5
  3. package/package.json +2 -2
package/README.md CHANGED
@@ -1,10 +1,12 @@
1
1
  # @riebeckite/plugin-daily-notes
2
2
 
3
+ <!-- Generated from docs/docs/plugins/daily-notes.md. Edit the canonical documentation in docs/docs/plugins and run `pnpm docs:sync`. -->
4
+
3
5
  Surfaces short snippets extracted from Daily Notes as a site widget.
4
6
 
5
7
  [日本語](./README_ja.md)
6
8
 
7
- ## Overview
9
+ ## Recommended placement
8
10
 
9
11
  A Daily Note is often one long, private journal file. This plugin reads the raw
10
12
  manifest, picks notes under a configured directory, and extracts exactly one
@@ -21,7 +23,10 @@ wholesale, so a long private note only contributes the snippet that opted in.
21
23
  note. An unpublished note's permalink and title stay `null`, so private notes
22
24
  never leak their location.
23
25
 
24
- ## Usage
26
+ `dailyNotesPlugin()` registers data and styles but does not render the widget.
27
+ The Site owns placement; a homepage section is the recommended location.
28
+
29
+ ## Quick Start
25
30
 
26
31
  ```ts
27
32
  import { defineConfig } from "@riebeckite/core";
@@ -33,7 +38,7 @@ export default defineConfig({
33
38
  });
34
39
  ```
35
40
 
36
- ### Render the widget
41
+ Render the widget explicitly in a homepage route or site-owned homepage section:
37
42
 
38
43
  ```tsx
39
44
  import DailyNotes, { getDailyNotes } from "@riebeckite/plugin-daily-notes";
@@ -80,6 +85,9 @@ guessing another one.
80
85
  `<time datetime>` attribute regardless, and `DailyNote.date` keeps that ISO
81
86
  form while `DailyNote.dateDisplay` holds the formatted text.
82
87
 
88
+ Move or remove the `DailyNotes` element to reposition or remove the widget. No
89
+ official Starter renders Daily Notes by default.
90
+
83
91
  ## Exports
84
92
 
85
93
  - `dailyNotesPlugin(options?)` — plugin factory (registers `style.css`)
@@ -94,5 +102,4 @@ form while `DailyNote.dateDisplay` holds the formatted text.
94
102
 
95
103
  ## See also
96
104
 
97
- - [Plugin guide](../../../docs/docs/reference/plugin-api.md)
98
-
105
+ - [Plugin guide](https://github.com/Rerurate514/riebeckite/blob/main/docs/docs/reference/plugin-api.md)
package/README_ja.md CHANGED
@@ -1,10 +1,12 @@
1
1
  # @riebeckite/plugin-daily-notes
2
2
 
3
+ <!-- Generated from docs/docs/plugins/daily-notes.ja.md. Edit the canonical documentation in docs/docs/plugins and run `pnpm docs:sync`. -->
4
+
3
5
  デイリーノートから短いスニペットを取り出してサイトのウィジェットとして表示するプラグインです。
4
6
 
5
7
  [English](./README.md)
6
8
 
7
- ## 概要
9
+ ## 推奨配置
8
10
 
9
11
  デイリーノートは、長い非公開の日記を 1 ファイルにまとめることが少なくありません。このプラグインは生のマニフェストを読み、指定ディレクトリ配下のノートを対象に、次の順番で最初に成功した方法からスニペットを 1 つだけ取り出します。
10
12
 
@@ -16,7 +18,9 @@
16
18
 
17
19
  `sourceUrl` と `sourceTitle` は `isPublished` が公開と判定したときだけ付きます。非公開ノートのパーマリンクとタイトルは `null` のままなので、置き場所が漏れることはありません。
18
20
 
19
- ## 使い方
21
+ `dailyNotesPlugin()` はデータとスタイルを登録しますが、ウィジェットを自動描画しません。配置は Site が所有し、ホームページのセクションが推奨位置です。
22
+
23
+ ## クイックスタート
20
24
 
21
25
  ```ts
22
26
  import { defineConfig } from "@riebeckite/core";
@@ -28,7 +32,7 @@ export default defineConfig({
28
32
  });
29
33
  ```
30
34
 
31
- ### ウィジェットを置く
35
+ ホームページ route または Site が所有するホームページセクションで明示的に描画します。
32
36
 
33
37
  ```tsx
34
38
  import DailyNotes, { getDailyNotes } from "@riebeckite/plugin-daily-notes";
@@ -64,6 +68,8 @@ getDailyNotes({
64
68
 
65
69
  `dateFormat` はウィジェットの日付表示を決めます。既定は `"iso"`(`YYYY-MM-DD`)で、ほかに `"long"` と `"short"` があります。`"long"` と `"short"` は `locale`(既定 `"en"`)で整形します。機械可読な `YYYY-MM-DD` は常に `<time datetime>` 属性に残り、`DailyNote.date` はその ISO 形式のまま、`DailyNote.dateDisplay` に整形後の文字列が入ります。
66
70
 
71
+ 位置を変える・消すときは `DailyNotes` 要素を移動・削除します。公式 Starter は Daily Notes を既定で描画しません。
72
+
67
73
  ## 主なエクスポート
68
74
 
69
75
  - `dailyNotesPlugin(options?)`: プラグインを作る(`style.css` を登録する)
@@ -76,5 +82,4 @@ getDailyNotes({
76
82
 
77
83
  ## 関連資料
78
84
 
79
- - [プラグインシステム](../../../docs/docs/reference/plugin-api.ja.md)
80
-
85
+ - [プラグインシステム](https://github.com/Rerurate514/riebeckite/blob/main/docs/docs/reference/plugin-api.ja.md)
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@riebeckite/plugin-daily-notes",
3
- "version": "0.0.20",
3
+ "version": "0.0.22",
4
4
  "license": "Apache-2.0",
5
5
  "type": "module",
6
6
  "main": "./dist/index.js",
@@ -22,7 +22,7 @@
22
22
  },
23
23
  "dependencies": {
24
24
  "hono": "^4.12.25",
25
- "@riebeckite/core": "0.0.20"
25
+ "@riebeckite/core": "0.0.22"
26
26
  },
27
27
  "devDependencies": {
28
28
  "tsx": "^4.22.4"