@karaoke-cms/create 0.6.1 → 0.6.3
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/karaoke-create-vault/.obsidian/app.json +14 -0
- package/karaoke-create-vault/.obsidian/appearance.json +1 -0
- package/karaoke-create-vault/.obsidian/community-plugins.json +4 -0
- package/karaoke-create-vault/.obsidian/core-plugins.json +33 -0
- package/karaoke-create-vault/.obsidian/plugins/folder-notes/data.json +131 -0
- package/karaoke-create-vault/.obsidian/plugins/folder-notes/main.js +9190 -0
- package/karaoke-create-vault/.obsidian/plugins/folder-notes/manifest.json +12 -0
- package/karaoke-create-vault/.obsidian/plugins/folder-notes/styles.css +355 -0
- package/karaoke-create-vault/.obsidian/plugins/templater-obsidian/main.js +45 -0
- package/karaoke-create-vault/.obsidian/plugins/templater-obsidian/manifest.json +11 -0
- package/karaoke-create-vault/.obsidian/plugins/templater-obsidian/styles.css +226 -0
- package/karaoke-create-vault/blog/draft-post.md +15 -0
- package/karaoke-create-vault/blog/hello-world.md +26 -0
- package/karaoke-create-vault/docs/getting-started.md +49 -0
- package/karaoke-create-vault/docs/testing.md +0 -0
- package/karaoke-create-vault/karaoke-cms/config/collections.yaml +10 -0
- package/karaoke-create-vault/karaoke-cms/manual/configuration.md +77 -0
- package/karaoke-create-vault/karaoke-cms/manual/content.md +38 -0
- package/karaoke-create-vault/karaoke-cms/manual/deployment.md +46 -0
- package/karaoke-create-vault/karaoke-cms/manual/index.md +41 -0
- package/karaoke-create-vault/karaoke-cms/manual/privacy.md +37 -0
- package/karaoke-create-vault/karaoke-cms/templates/blog-header.md +9 -0
- package/karaoke-create-vault/karaoke-cms/templates/docs-header.md +9 -0
- package/karaoke-create-vault/karaoke-cms/templates/index-by-foldernote.md +8 -0
- package/package.json +14 -3
- package/src/index.js +187 -0
- package/src/templates.js +133 -0
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
{
|
|
2
|
+
"id": "templater-obsidian",
|
|
3
|
+
"name": "Templater",
|
|
4
|
+
"version": "2.18.1",
|
|
5
|
+
"description": "Create and use templates",
|
|
6
|
+
"minAppVersion": "1.5.0",
|
|
7
|
+
"author": "SilentVoid",
|
|
8
|
+
"authorUrl": "https://github.com/SilentVoid13",
|
|
9
|
+
"helpUrl": "https://silentvoid13.github.io/Templater/",
|
|
10
|
+
"isDesktopOnly": false
|
|
11
|
+
}
|
|
@@ -0,0 +1,226 @@
|
|
|
1
|
+
.templater_search {
|
|
2
|
+
width: calc(100% - 20px);
|
|
3
|
+
}
|
|
4
|
+
|
|
5
|
+
.templater_div {
|
|
6
|
+
border-top: 1px solid var(--background-modifier-border);
|
|
7
|
+
}
|
|
8
|
+
|
|
9
|
+
.templater_div > .setting-item {
|
|
10
|
+
border-top: none !important;
|
|
11
|
+
align-self: center;
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
.templater_div > .setting-item > .setting-item-control {
|
|
15
|
+
justify-content: space-around;
|
|
16
|
+
padding: 0;
|
|
17
|
+
width: 100%;
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
.templater_div
|
|
21
|
+
> .setting-item
|
|
22
|
+
> .setting-item-control
|
|
23
|
+
> .setting-editor-extra-setting-button {
|
|
24
|
+
align-self: center;
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
.templater_donating {
|
|
28
|
+
margin: 10px;
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
.templater_title {
|
|
32
|
+
margin: 0;
|
|
33
|
+
padding: 0;
|
|
34
|
+
margin-top: 5px;
|
|
35
|
+
text-align: center;
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
.templater_template {
|
|
39
|
+
align-self: center;
|
|
40
|
+
margin-left: 5px;
|
|
41
|
+
margin-right: 5px;
|
|
42
|
+
width: 70%;
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
.templater_cmd {
|
|
46
|
+
margin-left: 5px;
|
|
47
|
+
margin-right: 5px;
|
|
48
|
+
font-size: 14px;
|
|
49
|
+
width: 100%;
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
.templater_div2 > .setting-item {
|
|
53
|
+
align-content: center;
|
|
54
|
+
justify-content: center;
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
.templater-prompt-div,
|
|
58
|
+
.templater-multisuggester-div {
|
|
59
|
+
display: flex;
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
.templater-prompt-form {
|
|
63
|
+
display: flex;
|
|
64
|
+
flex-grow: 1;
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
.templater-prompt-input,
|
|
68
|
+
.templater-multisuggester-input {
|
|
69
|
+
flex-grow: 1;
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
.templater-button-div {
|
|
73
|
+
display: flex;
|
|
74
|
+
flex-direction: column;
|
|
75
|
+
align-items: center;
|
|
76
|
+
margin-top: 1rem;
|
|
77
|
+
}
|
|
78
|
+
|
|
79
|
+
textarea.templater-prompt-input {
|
|
80
|
+
height: 10rem;
|
|
81
|
+
}
|
|
82
|
+
|
|
83
|
+
textarea.templater-prompt-input:focus {
|
|
84
|
+
border-color: var(--interactive-accent);
|
|
85
|
+
}
|
|
86
|
+
|
|
87
|
+
.templater-multisuggester-list {
|
|
88
|
+
margin: 1.5em 0;
|
|
89
|
+
}
|
|
90
|
+
|
|
91
|
+
.cm-s-obsidian .templater-command-bg {
|
|
92
|
+
left: 0px;
|
|
93
|
+
right: 0px;
|
|
94
|
+
background-color: var(--background-primary-alt);
|
|
95
|
+
}
|
|
96
|
+
|
|
97
|
+
.cm-s-obsidian .cm-templater-command {
|
|
98
|
+
font-size: 0.85em;
|
|
99
|
+
font-family: var(--font-monospace);
|
|
100
|
+
line-height: 1.3;
|
|
101
|
+
}
|
|
102
|
+
|
|
103
|
+
.cm-s-obsidian .templater-inline .cm-templater-command {
|
|
104
|
+
background-color: var(--background-primary-alt);
|
|
105
|
+
}
|
|
106
|
+
|
|
107
|
+
.cm-s-obsidian .cm-templater-command.cm-templater-opening-tag {
|
|
108
|
+
font-weight: bold;
|
|
109
|
+
}
|
|
110
|
+
|
|
111
|
+
.cm-s-obsidian .cm-templater-command.cm-templater-closing-tag {
|
|
112
|
+
font-weight: bold;
|
|
113
|
+
}
|
|
114
|
+
|
|
115
|
+
.cm-s-obsidian .cm-templater-command.cm-templater-interpolation-tag {
|
|
116
|
+
color: var(--code-property, #008bff);
|
|
117
|
+
}
|
|
118
|
+
|
|
119
|
+
.cm-s-obsidian .cm-templater-command.cm-templater-execution-tag {
|
|
120
|
+
color: var(--code-function, #c0d700);
|
|
121
|
+
}
|
|
122
|
+
|
|
123
|
+
.cm-s-obsidian .cm-templater-command.cm-keyword {
|
|
124
|
+
color: var(--code-keyword, #00a7aa);
|
|
125
|
+
font-weight: normal;
|
|
126
|
+
}
|
|
127
|
+
|
|
128
|
+
.cm-s-obsidian .cm-templater-command.cm-atom {
|
|
129
|
+
color: var(--code-normal, #f39b35);
|
|
130
|
+
}
|
|
131
|
+
|
|
132
|
+
.cm-s-obsidian .cm-templater-command.cm-value,
|
|
133
|
+
.cm-s-obsidian .cm-templater-command.cm-number,
|
|
134
|
+
.cm-s-obsidian .cm-templater-command.cm-type {
|
|
135
|
+
color: var(--code-value, #a06fca);
|
|
136
|
+
}
|
|
137
|
+
|
|
138
|
+
.cm-s-obsidian .cm-templater-command.cm-def,
|
|
139
|
+
.cm-s-obsidian .cm-templater-command.cm-type.cm-def {
|
|
140
|
+
color: var(--code-normal, var(--text-normal));
|
|
141
|
+
}
|
|
142
|
+
|
|
143
|
+
.cm-s-obsidian .cm-templater-command.cm-property,
|
|
144
|
+
.cm-s-obsidian .cm-templater-command.cm-property.cm-def,
|
|
145
|
+
.cm-s-obsidian .cm-templater-command.cm-attribute {
|
|
146
|
+
color: var(--code-function, #98e342);
|
|
147
|
+
}
|
|
148
|
+
|
|
149
|
+
.cm-s-obsidian .cm-templater-command.cm-variable,
|
|
150
|
+
.cm-s-obsidian .cm-templater-command.cm-variable-2,
|
|
151
|
+
.cm-s-obsidian .cm-templater-command.cm-variable-3,
|
|
152
|
+
.cm-s-obsidian .cm-templater-command.cm-meta {
|
|
153
|
+
color: var(--code-property, #d4d4d4);
|
|
154
|
+
}
|
|
155
|
+
|
|
156
|
+
.cm-s-obsidian .cm-templater-command.cm-callee,
|
|
157
|
+
.cm-s-obsidian .cm-templater-command.cm-operator,
|
|
158
|
+
.cm-s-obsidian .cm-templater-command.cm-qualifier,
|
|
159
|
+
.cm-s-obsidian .cm-templater-command.cm-builtin {
|
|
160
|
+
color: var(--code-operator, #fc4384);
|
|
161
|
+
}
|
|
162
|
+
|
|
163
|
+
.cm-s-obsidian .cm-templater-command.cm-tag {
|
|
164
|
+
color: var(--code-tag, #fc4384);
|
|
165
|
+
}
|
|
166
|
+
|
|
167
|
+
.cm-s-obsidian .cm-templater-command.cm-comment,
|
|
168
|
+
.cm-s-obsidian .cm-templater-command.cm-comment.cm-tag,
|
|
169
|
+
.cm-s-obsidian .cm-templater-command.cm-comment.cm-attribute {
|
|
170
|
+
color: var(--code-comment, #696d70);
|
|
171
|
+
}
|
|
172
|
+
|
|
173
|
+
.cm-s-obsidian .cm-templater-command.cm-string,
|
|
174
|
+
.cm-s-obsidian .cm-templater-command.cm-string-2 {
|
|
175
|
+
color: var(--code-string, #e6db74);
|
|
176
|
+
}
|
|
177
|
+
|
|
178
|
+
.cm-s-obsidian .cm-templater-command.cm-header,
|
|
179
|
+
.cm-s-obsidian .cm-templater-command.cm-hr {
|
|
180
|
+
color: var(--code-keyword, #da7dae);
|
|
181
|
+
}
|
|
182
|
+
|
|
183
|
+
.cm-s-obsidian .cm-templater-command.cm-link {
|
|
184
|
+
color: var(--code-normal, #696d70);
|
|
185
|
+
}
|
|
186
|
+
|
|
187
|
+
.cm-s-obsidian .cm-templater-command.cm-error {
|
|
188
|
+
border-bottom: 1px solid #c42412;
|
|
189
|
+
}
|
|
190
|
+
|
|
191
|
+
.CodeMirror-hints {
|
|
192
|
+
position: absolute;
|
|
193
|
+
z-index: 10;
|
|
194
|
+
overflow: hidden;
|
|
195
|
+
list-style: none;
|
|
196
|
+
|
|
197
|
+
margin: 0;
|
|
198
|
+
padding: 2px;
|
|
199
|
+
|
|
200
|
+
-webkit-box-shadow: 2px 3px 5px rgba(0, 0, 0, 0.2);
|
|
201
|
+
-moz-box-shadow: 2px 3px 5px rgba(0, 0, 0, 0.2);
|
|
202
|
+
box-shadow: 2px 3px 5px rgba(0, 0, 0, 0.2);
|
|
203
|
+
border-radius: 3px;
|
|
204
|
+
border: 1px solid silver;
|
|
205
|
+
|
|
206
|
+
background: white;
|
|
207
|
+
font-size: 90%;
|
|
208
|
+
font-family: monospace;
|
|
209
|
+
|
|
210
|
+
max-height: 20em;
|
|
211
|
+
overflow-y: auto;
|
|
212
|
+
}
|
|
213
|
+
|
|
214
|
+
.CodeMirror-hint {
|
|
215
|
+
margin: 0;
|
|
216
|
+
padding: 0 4px;
|
|
217
|
+
border-radius: 2px;
|
|
218
|
+
white-space: pre;
|
|
219
|
+
color: black;
|
|
220
|
+
cursor: pointer;
|
|
221
|
+
}
|
|
222
|
+
|
|
223
|
+
li.CodeMirror-hint-active {
|
|
224
|
+
background: #08f;
|
|
225
|
+
color: white;
|
|
226
|
+
}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
---
|
|
2
|
+
title: Draft Post
|
|
3
|
+
publish: false
|
|
4
|
+
date: 2026-01-02
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
This post has `publish: false`. It lives in your vault but never appears on the site.
|
|
8
|
+
|
|
9
|
+
Change it to `publish: true` when you're ready to share it.
|
|
10
|
+
|
|
11
|
+
## Tips for drafting
|
|
12
|
+
|
|
13
|
+
- Write freely — nothing here ships until you say so
|
|
14
|
+
- Use `date:` to pre-date a post for scheduling context
|
|
15
|
+
- `tags:` and `description:` can be added before publishing
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
---
|
|
2
|
+
title: Hello World !
|
|
3
|
+
publish: true
|
|
4
|
+
date: 2026-01-01
|
|
5
|
+
author: The Team
|
|
6
|
+
description: Your first published post.
|
|
7
|
+
---
|
|
8
|
+
|
|
9
|
+
Welcome! This post has `publish: true` so it appears on your site.
|
|
10
|
+
|
|
11
|
+
## How publishing works
|
|
12
|
+
|
|
13
|
+
Every file in your vault is private by default. To make a note public:
|
|
14
|
+
|
|
15
|
+
1. Add `publish: true` to the frontmatter
|
|
16
|
+
2. Push to `main` — GitHub Actions builds and deploys automatically
|
|
17
|
+
|
|
18
|
+
That's it. No config, no CMS, no dashboard. The vault is your editorial system.
|
|
19
|
+
|
|
20
|
+
## What you can write
|
|
21
|
+
|
|
22
|
+
- Use standard Markdown: headers, lists, code blocks, images
|
|
23
|
+
- Link between notes with `[[wikilinks]]` — karaoke-cms resolves them automatically
|
|
24
|
+
- Drafts with `publish: false` live in your vault and never ship to production
|
|
25
|
+
|
|
26
|
+
See [[karaoke-cms/manual/content]] for the full content guide.
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
---
|
|
2
|
+
title: "Getting Started"
|
|
3
|
+
publish: true
|
|
4
|
+
date: 2026-01-01
|
|
5
|
+
description: "How to set up and use your karaoke-cms site."
|
|
6
|
+
---
|
|
7
|
+
|
|
8
|
+
## Open in Obsidian
|
|
9
|
+
|
|
10
|
+
Your project root is an Obsidian vault. Open this folder in Obsidian to write content with full wikilink navigation, templates, and graph view.
|
|
11
|
+
|
|
12
|
+
## Configure your site
|
|
13
|
+
|
|
14
|
+
Edit `karaoke.config.ts` to set your title, theme, and modules:
|
|
15
|
+
|
|
16
|
+
```ts
|
|
17
|
+
const config: KaraokeConfig = {
|
|
18
|
+
title: "My Site",
|
|
19
|
+
description: "What this site is about.",
|
|
20
|
+
theme: "default", // or "minimal"
|
|
21
|
+
modules: {
|
|
22
|
+
search: { enabled: true },
|
|
23
|
+
},
|
|
24
|
+
};
|
|
25
|
+
```
|
|
26
|
+
|
|
27
|
+
## Write content
|
|
28
|
+
|
|
29
|
+
- **Blog posts** → `content/blog/`
|
|
30
|
+
- **Documentation** → `content/docs/`
|
|
31
|
+
- Add `publish: true` to make a file public
|
|
32
|
+
- Push to `main` → your site deploys automatically via GitHub Actions + Cloudflare Pages
|
|
33
|
+
|
|
34
|
+
## Frontmatter reference
|
|
35
|
+
|
|
36
|
+
```yaml
|
|
37
|
+
---
|
|
38
|
+
title: "My Post" # required
|
|
39
|
+
publish: true # required to appear on site
|
|
40
|
+
date: 2026-01-15 # optional, YYYY-MM-DD
|
|
41
|
+
author: "Name" # optional
|
|
42
|
+
description: "..." # optional, used in OG tags and RSS
|
|
43
|
+
tags: [tag1, tag2] # optional
|
|
44
|
+
---
|
|
45
|
+
```
|
|
46
|
+
|
|
47
|
+
## Learn more
|
|
48
|
+
|
|
49
|
+
The **[[karaoke-cms/manual/index|Handbook]]** explains everything — it lives inside your vault and is visible at `/karaoke-cms` in dev mode.
|
|
File without changes
|
|
@@ -0,0 +1,77 @@
|
|
|
1
|
+
---
|
|
2
|
+
title: "Configuration"
|
|
3
|
+
---
|
|
4
|
+
|
|
5
|
+
# Configuration
|
|
6
|
+
|
|
7
|
+
> **Handbook — dev only.**
|
|
8
|
+
|
|
9
|
+
## karaoke.config.ts
|
|
10
|
+
|
|
11
|
+
The main config file at your project root. TypeScript — fully typed.
|
|
12
|
+
|
|
13
|
+
```ts
|
|
14
|
+
import type { KaraokeConfig } from '@karaoke-cms/astro';
|
|
15
|
+
|
|
16
|
+
const config: KaraokeConfig = {
|
|
17
|
+
title: "My Site",
|
|
18
|
+
description: "What this site is about.",
|
|
19
|
+
theme: "default", // "default" | "minimal"
|
|
20
|
+
modules: {
|
|
21
|
+
search: {
|
|
22
|
+
enabled: true, // Pagefind full-text search
|
|
23
|
+
},
|
|
24
|
+
comments: {
|
|
25
|
+
enabled: true, // Giscus (GitHub Discussions)
|
|
26
|
+
repo: "owner/repo",
|
|
27
|
+
repoId: "R_...",
|
|
28
|
+
category: "General",
|
|
29
|
+
categoryId: "DIC_...",
|
|
30
|
+
},
|
|
31
|
+
},
|
|
32
|
+
};
|
|
33
|
+
|
|
34
|
+
export default config;
|
|
35
|
+
```
|
|
36
|
+
|
|
37
|
+
Get Giscus values from [giscus.app](https://giscus.app) after enabling Discussions on your repo.
|
|
38
|
+
|
|
39
|
+
## collections.yaml
|
|
40
|
+
|
|
41
|
+
`content/karaoke-cms/config/collections.yaml` controls which collections are visible in dev vs prod:
|
|
42
|
+
|
|
43
|
+
```yaml
|
|
44
|
+
collections:
|
|
45
|
+
blog:
|
|
46
|
+
modes: [dev, prod] # visible in both dev and production
|
|
47
|
+
label: Blog
|
|
48
|
+
docs:
|
|
49
|
+
modes: [dev, prod]
|
|
50
|
+
label: Docs
|
|
51
|
+
karaoke-cms:
|
|
52
|
+
modes: [dev] # dev-only — never ships
|
|
53
|
+
label: Handbook
|
|
54
|
+
```
|
|
55
|
+
|
|
56
|
+
To add a custom collection (e.g., `content/notes/`):
|
|
57
|
+
|
|
58
|
+
```yaml
|
|
59
|
+
collections:
|
|
60
|
+
notes:
|
|
61
|
+
modes: [dev, prod]
|
|
62
|
+
label: Notes
|
|
63
|
+
```
|
|
64
|
+
|
|
65
|
+
## Layout regions
|
|
66
|
+
|
|
67
|
+
Place UI components in the sidebar or header via `karaoke.config.ts`:
|
|
68
|
+
|
|
69
|
+
```ts
|
|
70
|
+
layout: {
|
|
71
|
+
regions: {
|
|
72
|
+
right: { components: ['recent-posts'] },
|
|
73
|
+
},
|
|
74
|
+
},
|
|
75
|
+
```
|
|
76
|
+
|
|
77
|
+
Available components: `header`, `main-menu`, `search`, `recent-posts`, `footer`.
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
---
|
|
2
|
+
title: "Writing Content"
|
|
3
|
+
---
|
|
4
|
+
|
|
5
|
+
# Writing Content
|
|
6
|
+
|
|
7
|
+
> **Handbook — dev only.**
|
|
8
|
+
|
|
9
|
+
## Frontmatter fields
|
|
10
|
+
|
|
11
|
+
```yaml
|
|
12
|
+
---
|
|
13
|
+
title: "My Post" # required — build fails without it
|
|
14
|
+
publish: true # required to appear on site (default: false)
|
|
15
|
+
date: 2026-01-15 # optional — YYYY-MM-DD, used for sorting
|
|
16
|
+
author: "Name" # optional — string or array ["Alice", "Bob"]
|
|
17
|
+
description: "..." # optional — used in OG meta tags and RSS
|
|
18
|
+
tags: [writing, tutorial] # optional — enables tag pages at /tags/[tag]
|
|
19
|
+
---
|
|
20
|
+
```
|
|
21
|
+
|
|
22
|
+
## Privacy model
|
|
23
|
+
|
|
24
|
+
Every file is **private by default**. `publish: false` (or a missing `publish` field) means the file stays in your vault and never enters the build — not in HTML, not in RSS, not in the sitemap, not in the Pagefind search index.
|
|
25
|
+
|
|
26
|
+
Only `publish: true` files appear on your site.
|
|
27
|
+
|
|
28
|
+
## Wikilinks
|
|
29
|
+
|
|
30
|
+
Use `[[slug]]` syntax to link between notes. karaoke-cms resolves wikilinks automatically:
|
|
31
|
+
|
|
32
|
+
- `[[blog/hello-world]]` → `/blog/hello-world/`
|
|
33
|
+
- `[[docs/getting-started]]` → `/docs/getting-started/`
|
|
34
|
+
- `[[docs/getting-started|Getting Started]]` → link text "Getting Started"
|
|
35
|
+
|
|
36
|
+
## AI enrichment (optional)
|
|
37
|
+
|
|
38
|
+
Run `npx @karaoke-cms/enrich` to auto-generate `tags`, `description`, and `reading_time` for published notes using OpenAI or Anthropic. Skips already-enriched notes via a local cache.
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
---
|
|
2
|
+
title: "Deployment"
|
|
3
|
+
---
|
|
4
|
+
|
|
5
|
+
# Deployment
|
|
6
|
+
|
|
7
|
+
> **Handbook — dev only.**
|
|
8
|
+
|
|
9
|
+
## Cloudflare Pages (recommended)
|
|
10
|
+
|
|
11
|
+
1. Push your project to a GitHub repo
|
|
12
|
+
2. Go to [Cloudflare Pages](https://pages.cloudflare.com) → Create a project → Connect to your repo
|
|
13
|
+
3. Build settings:
|
|
14
|
+
- **Build command:** `npm run build`
|
|
15
|
+
- **Build output directory:** `dist`
|
|
16
|
+
- **Node.js version:** 22
|
|
17
|
+
4. Deploy
|
|
18
|
+
|
|
19
|
+
On every push to `main`, Cloudflare Pages rebuilds and redeploys automatically.
|
|
20
|
+
|
|
21
|
+
## GitHub Actions (privacy gate)
|
|
22
|
+
|
|
23
|
+
The included `deploy.yml` workflow runs `assert-privacy` on every build to verify that no private content leaks into `dist/`. If a private note accidentally gets into the build, the deploy fails before it reaches production.
|
|
24
|
+
|
|
25
|
+
## Custom domain
|
|
26
|
+
|
|
27
|
+
In Cloudflare Pages → your project → Custom domains → Add a domain. Update `site:` in `astro.config.mjs` to match:
|
|
28
|
+
|
|
29
|
+
```js
|
|
30
|
+
export default defineConfig({
|
|
31
|
+
site: 'https://your-domain.com',
|
|
32
|
+
// ...
|
|
33
|
+
});
|
|
34
|
+
```
|
|
35
|
+
|
|
36
|
+
## Environment variables
|
|
37
|
+
|
|
38
|
+
If you use `@karaoke-cms/enrich` in CI:
|
|
39
|
+
|
|
40
|
+
| Variable | Purpose |
|
|
41
|
+
|----------|---------|
|
|
42
|
+
| `OPENAI_API_KEY` | Required if `ENRICH_PROVIDER=openai` (default) |
|
|
43
|
+
| `ANTHROPIC_API_KEY` | Required if `ENRICH_PROVIDER=anthropic` |
|
|
44
|
+
| `ENRICH_ENABLED` | Set to `true` to enable AI enrichment in CI |
|
|
45
|
+
| `CLOUDFLARE_API_TOKEN` | For Cloudflare Pages deploy via GitHub Actions |
|
|
46
|
+
| `CLOUDFLARE_ACCOUNT_ID` | For Cloudflare Pages deploy via GitHub Actions |
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
---
|
|
2
|
+
title: "Handbook"
|
|
3
|
+
---
|
|
4
|
+
|
|
5
|
+
# karaoke-cms Handbook
|
|
6
|
+
|
|
7
|
+
> **Handbook — dev only.** This section is visible at `/karaoke-cms` in dev mode and never ships to production.
|
|
8
|
+
|
|
9
|
+
karaoke-cms is an Astro framework for publishing Obsidian vaults as static sites. Private-by-default: only files with `publish: true` in frontmatter appear on your site.
|
|
10
|
+
|
|
11
|
+
## How it works
|
|
12
|
+
|
|
13
|
+
```
|
|
14
|
+
Obsidian vault (this directory)
|
|
15
|
+
↓ write notes with publish: true
|
|
16
|
+
↓ push to main
|
|
17
|
+
↓ GitHub Actions: astro build + assert-privacy
|
|
18
|
+
↓ Cloudflare Pages
|
|
19
|
+
↓ live site
|
|
20
|
+
```
|
|
21
|
+
|
|
22
|
+
Your vault is also your deploy pipeline config, your documentation, and your content collection — all in one place.
|
|
23
|
+
|
|
24
|
+
## Handbook sections
|
|
25
|
+
|
|
26
|
+
- [[content]] — Writing content and frontmatter
|
|
27
|
+
- [[configuration]] — karaoke.config.ts reference
|
|
28
|
+
- [[deployment]] — Deploying to Cloudflare Pages
|
|
29
|
+
- [[privacy]] — How publish:true works
|
|
30
|
+
|
|
31
|
+
## Collections
|
|
32
|
+
|
|
33
|
+
This vault has three content collections:
|
|
34
|
+
|
|
35
|
+
| Collection | Mode | Purpose |
|
|
36
|
+
|------------|------|---------|
|
|
37
|
+
| `blog/` | dev + prod | Published blog posts |
|
|
38
|
+
| `docs/` | dev + prod | Published documentation |
|
|
39
|
+
| `karaoke-cms/` | dev only | This handbook — never ships |
|
|
40
|
+
|
|
41
|
+
Edit `content/karaoke-cms/config/collections.yaml` to add your own collections or change their visibility.
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
---
|
|
2
|
+
title: "Privacy"
|
|
3
|
+
---
|
|
4
|
+
|
|
5
|
+
# Privacy Model
|
|
6
|
+
|
|
7
|
+
> **Handbook — dev only.**
|
|
8
|
+
|
|
9
|
+
## The rule
|
|
10
|
+
|
|
11
|
+
**Every file is private by default.** Only files with `publish: true` in frontmatter appear on your site.
|
|
12
|
+
|
|
13
|
+
A file without `publish: true` never enters the build — not in HTML, RSS, sitemap, or the Pagefind search index.
|
|
14
|
+
|
|
15
|
+
## How it's enforced
|
|
16
|
+
|
|
17
|
+
Two independent layers:
|
|
18
|
+
|
|
19
|
+
1. **Astro content filter** — `getCollection('blog', ({ data }) => data.publish === true)` filters at the query level. Pages only receive published entries.
|
|
20
|
+
|
|
21
|
+
2. **assert-privacy** — a post-build check that scans `dist/` for known private note titles and content. If any private content leaks, the build fails before deploy.
|
|
22
|
+
|
|
23
|
+
The collection mode system adds a third layer: `karaoke-cms/` is excluded from `makeCollections()` in production entirely. Even if a handbook page had `publish: true`, it would never enter the prod build graph.
|
|
24
|
+
|
|
25
|
+
## What "private" means
|
|
26
|
+
|
|
27
|
+
| Field | Builds? | Searchable? | In RSS? | In sitemap? |
|
|
28
|
+
|-------|---------|-------------|---------|-------------|
|
|
29
|
+
| `publish: true` | Yes | Yes | Yes | Yes |
|
|
30
|
+
| `publish: false` | No | No | No | No |
|
|
31
|
+
| missing | No | No | No | No |
|
|
32
|
+
|
|
33
|
+
## Audit your site
|
|
34
|
+
|
|
35
|
+
After every build, `assert-privacy.js` outputs a summary of what shipped. Check it in your CI logs.
|
|
36
|
+
|
|
37
|
+
For a manual check: `node node_modules/@karaoke-cms/assert-privacy/dist/index.js dist`
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
---
|
|
2
|
+
title: "" # required — build fails without it
|
|
3
|
+
publish: false # required to appear on site (default: false)
|
|
4
|
+
date: 2026-01-15 # optional — YYYY-MM-DD, used for sorting
|
|
5
|
+
author: "" # optional — string or array ["Alice", "Bob"]
|
|
6
|
+
description: "" # optional — used in OG meta tags and RSS
|
|
7
|
+
tags: [general] # optional — enables tag pages at /tags/[tag]
|
|
8
|
+
notetype: blog
|
|
9
|
+
---
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
---
|
|
2
|
+
title: "" # required — build fails without it
|
|
3
|
+
publish: false # required to appear on site (default: false)
|
|
4
|
+
date: 2026-01-15 # optional — YYYY-MM-DD, used for sorting
|
|
5
|
+
author: "" # optional — string or array ["Alice", "Bob"]
|
|
6
|
+
description: "" # optional — used in OG meta tags and RSS
|
|
7
|
+
tags: [general] # optional — enables tag pages at /tags/[tag]
|
|
8
|
+
notetype: blog
|
|
9
|
+
---
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
---
|
|
2
|
+
title: "" # required — build fails without it
|
|
3
|
+
publish: false # required to appear on site (default: false)
|
|
4
|
+
date: 2026-01-15 # optional — YYYY-MM-DD, used for sorting
|
|
5
|
+
author: "" # optional — string or array ["Alice", "Bob"]
|
|
6
|
+
description: "..." # optional — used in OG meta tags and RSS
|
|
7
|
+
tags: [general] # optional — enables tag pages at /tags/[tag]
|
|
8
|
+
---
|
package/package.json
CHANGED
|
@@ -1,18 +1,29 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@karaoke-cms/create",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "0.6.
|
|
4
|
+
"version": "0.6.3",
|
|
5
5
|
"description": "Scaffold a new karaoke-cms project",
|
|
6
6
|
"bin": {
|
|
7
7
|
"create-karaoke-cms": "./src/index.js"
|
|
8
8
|
},
|
|
9
|
+
"files": [
|
|
10
|
+
"src/",
|
|
11
|
+
"karaoke-create-vault/"
|
|
12
|
+
],
|
|
13
|
+
"engines": {
|
|
14
|
+
"node": ">=22.12.0"
|
|
15
|
+
},
|
|
9
16
|
"keywords": [
|
|
10
17
|
"astro",
|
|
11
18
|
"cms",
|
|
12
19
|
"create",
|
|
13
|
-
"scaffold"
|
|
20
|
+
"scaffold",
|
|
21
|
+
"obsidian"
|
|
14
22
|
],
|
|
23
|
+
"devDependencies": {
|
|
24
|
+
"vitest": "^4.1.1"
|
|
25
|
+
},
|
|
15
26
|
"scripts": {
|
|
16
|
-
"test": "
|
|
27
|
+
"test": "vitest run test/templates.test.js"
|
|
17
28
|
}
|
|
18
29
|
}
|