@karaoke-cms/create 0.6.2 → 0.9.0

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 (30) hide show
  1. package/README.md +76 -0
  2. package/karaoke-create-vault/.obsidian/app.json +14 -0
  3. package/karaoke-create-vault/.obsidian/appearance.json +1 -0
  4. package/karaoke-create-vault/.obsidian/community-plugins.json +4 -0
  5. package/karaoke-create-vault/.obsidian/core-plugins.json +33 -0
  6. package/karaoke-create-vault/.obsidian/plugins/folder-notes/data.json +131 -0
  7. package/karaoke-create-vault/.obsidian/plugins/folder-notes/main.js +9190 -0
  8. package/karaoke-create-vault/.obsidian/plugins/folder-notes/manifest.json +12 -0
  9. package/karaoke-create-vault/.obsidian/plugins/folder-notes/styles.css +355 -0
  10. package/karaoke-create-vault/.obsidian/plugins/templater-obsidian/main.js +45 -0
  11. package/karaoke-create-vault/.obsidian/plugins/templater-obsidian/manifest.json +11 -0
  12. package/karaoke-create-vault/.obsidian/plugins/templater-obsidian/styles.css +226 -0
  13. package/karaoke-create-vault/.obsidian/workspace.json +225 -0
  14. package/karaoke-create-vault/blog/draft-post.md +15 -0
  15. package/karaoke-create-vault/blog/hello-world.md +26 -0
  16. package/karaoke-create-vault/docs/getting-started.md +49 -0
  17. package/karaoke-create-vault/docs/testing.md +0 -0
  18. package/karaoke-create-vault/karaoke-cms/config/collections.yaml +10 -0
  19. package/karaoke-create-vault/karaoke-cms/config/menus.yaml +33 -0
  20. package/karaoke-create-vault/karaoke-cms/manual/configuration.md +77 -0
  21. package/karaoke-create-vault/karaoke-cms/manual/content.md +38 -0
  22. package/karaoke-create-vault/karaoke-cms/manual/deployment.md +46 -0
  23. package/karaoke-create-vault/karaoke-cms/manual/index.md +41 -0
  24. package/karaoke-create-vault/karaoke-cms/manual/privacy.md +37 -0
  25. package/karaoke-create-vault/karaoke-cms/templates/blog-header.md +9 -0
  26. package/karaoke-create-vault/karaoke-cms/templates/docs-header.md +9 -0
  27. package/karaoke-create-vault/karaoke-cms/templates/index-by-foldernote.md +8 -0
  28. package/package.json +3 -2
  29. package/src/index.js +34 -13
  30. package/src/templates.js +31 -78
@@ -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,225 @@
1
+ {
2
+ "main": {
3
+ "id": "bf48daa9b3525d37",
4
+ "type": "split",
5
+ "children": [
6
+ {
7
+ "id": "4d1b0940e2f6130e",
8
+ "type": "tabs",
9
+ "children": [
10
+ {
11
+ "id": "d663da17c7b12a45",
12
+ "type": "leaf",
13
+ "state": {
14
+ "type": "markdown",
15
+ "state": {
16
+ "file": "docs/getting-started.md",
17
+ "mode": "source",
18
+ "source": false
19
+ },
20
+ "icon": "lucide-file",
21
+ "title": "getting-started"
22
+ }
23
+ },
24
+ {
25
+ "id": "52e565c48d7a7c39",
26
+ "type": "leaf",
27
+ "state": {
28
+ "type": "markdown",
29
+ "state": {
30
+ "file": "karaoke-cms/templates/docs-header.md",
31
+ "mode": "source",
32
+ "source": false
33
+ },
34
+ "icon": "lucide-file",
35
+ "title": "docs-header"
36
+ }
37
+ }
38
+ ],
39
+ "currentTab": 1
40
+ }
41
+ ],
42
+ "direction": "vertical"
43
+ },
44
+ "left": {
45
+ "id": "f848878ad9626a8e",
46
+ "type": "split",
47
+ "children": [
48
+ {
49
+ "id": "ea3061d9ba4255be",
50
+ "type": "tabs",
51
+ "children": [
52
+ {
53
+ "id": "94f03deca1f3d6ef",
54
+ "type": "leaf",
55
+ "state": {
56
+ "type": "file-explorer",
57
+ "state": {
58
+ "sortOrder": "alphabetical",
59
+ "autoReveal": false
60
+ },
61
+ "icon": "lucide-folder-closed",
62
+ "title": "Files"
63
+ }
64
+ },
65
+ {
66
+ "id": "b92a29ffd5bd2fcd",
67
+ "type": "leaf",
68
+ "state": {
69
+ "type": "search",
70
+ "state": {
71
+ "query": "",
72
+ "matchingCase": false,
73
+ "explainSearch": false,
74
+ "collapseAll": false,
75
+ "extraContext": false,
76
+ "sortOrder": "alphabetical"
77
+ },
78
+ "icon": "lucide-search",
79
+ "title": "Search"
80
+ }
81
+ },
82
+ {
83
+ "id": "2fa9963b38cc204e",
84
+ "type": "leaf",
85
+ "state": {
86
+ "type": "bookmarks",
87
+ "state": {},
88
+ "icon": "lucide-bookmark",
89
+ "title": "Bookmarks"
90
+ }
91
+ }
92
+ ]
93
+ }
94
+ ],
95
+ "direction": "horizontal",
96
+ "width": 300
97
+ },
98
+ "right": {
99
+ "id": "068d5dd11487213f",
100
+ "type": "split",
101
+ "children": [
102
+ {
103
+ "id": "b36a87ef12a5b05e",
104
+ "type": "tabs",
105
+ "children": [
106
+ {
107
+ "id": "5040cbb52c2ed323",
108
+ "type": "leaf",
109
+ "state": {
110
+ "type": "backlink",
111
+ "state": {
112
+ "collapseAll": false,
113
+ "extraContext": false,
114
+ "sortOrder": "alphabetical",
115
+ "showSearch": false,
116
+ "searchQuery": "",
117
+ "backlinkCollapsed": false,
118
+ "unlinkedCollapsed": true
119
+ },
120
+ "icon": "links-coming-in",
121
+ "title": "Backlinks"
122
+ }
123
+ },
124
+ {
125
+ "id": "262dc809ddada450",
126
+ "type": "leaf",
127
+ "state": {
128
+ "type": "outgoing-link",
129
+ "state": {
130
+ "linksCollapsed": false,
131
+ "unlinkedCollapsed": true
132
+ },
133
+ "icon": "links-going-out",
134
+ "title": "Outgoing links"
135
+ }
136
+ },
137
+ {
138
+ "id": "27e78afa43f86c41",
139
+ "type": "leaf",
140
+ "state": {
141
+ "type": "tag",
142
+ "state": {
143
+ "sortOrder": "frequency",
144
+ "useHierarchy": true,
145
+ "showSearch": false,
146
+ "searchQuery": ""
147
+ },
148
+ "icon": "lucide-tags",
149
+ "title": "Tags"
150
+ }
151
+ },
152
+ {
153
+ "id": "b25127a84b56f576",
154
+ "type": "leaf",
155
+ "state": {
156
+ "type": "all-properties",
157
+ "state": {
158
+ "sortOrder": "frequency",
159
+ "showSearch": false,
160
+ "searchQuery": ""
161
+ },
162
+ "icon": "lucide-archive",
163
+ "title": "All properties"
164
+ }
165
+ },
166
+ {
167
+ "id": "9144cec5db6c0b0e",
168
+ "type": "leaf",
169
+ "state": {
170
+ "type": "outline",
171
+ "state": {
172
+ "followCursor": false,
173
+ "showSearch": false,
174
+ "searchQuery": ""
175
+ },
176
+ "icon": "lucide-list",
177
+ "title": "Outline"
178
+ }
179
+ },
180
+ {
181
+ "id": "d5b8fda7e074d1fc",
182
+ "type": "leaf",
183
+ "state": {
184
+ "type": "file-properties",
185
+ "state": {
186
+ "file": "karaoke-cms/templates/docs-header.md"
187
+ },
188
+ "icon": "lucide-info",
189
+ "title": "File properties for docs-header"
190
+ }
191
+ }
192
+ ],
193
+ "currentTab": 5
194
+ }
195
+ ],
196
+ "direction": "horizontal",
197
+ "width": 300
198
+ },
199
+ "left-ribbon": {
200
+ "hiddenItems": {
201
+ "switcher:Open quick switcher": false,
202
+ "graph:Open graph view": false,
203
+ "canvas:Create new canvas": false,
204
+ "daily-notes:Open today's daily note": false,
205
+ "templates:Insert template": false,
206
+ "command-palette:Open command palette": false,
207
+ "bases:Create new base": false,
208
+ "templater-obsidian:Templater": false
209
+ }
210
+ },
211
+ "active": "52e565c48d7a7c39",
212
+ "lastOpenFiles": [
213
+ "karaoke-cms/templates/blog-header.md",
214
+ "karaoke-cms/templates/docs-header.md",
215
+ "karaoke-cms/templates/index-by-foldernote.md",
216
+ "karaoke-cms/manual/content.md",
217
+ "karaoke-cms/manual/configuration.md",
218
+ "blog/hello-world.md",
219
+ "karaoke-cms/templates",
220
+ "karaoke-cms/index.md",
221
+ "blog/draft-post.md",
222
+ "docs/testing.md",
223
+ "docs/getting-started.md"
224
+ ]
225
+ }
@@ -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,10 @@
1
+ collections:
2
+ blog:
3
+ modes: [dev, prod]
4
+ label: Blog
5
+ docs:
6
+ modes: [dev, prod]
7
+ label: Docs
8
+ karaoke-cms:
9
+ modes: [dev]
10
+ label: Handbook
@@ -0,0 +1,33 @@
1
+ # menus.yaml — define named menus for your site.
2
+ #
3
+ # Each menu has an orientation (horizontal or vertical) and a list of entries.
4
+ # Entries are sorted by weight (ascending). Submenus are defined by nesting entries.
5
+ #
6
+ # when: collection:name — hide entry when the collection is disabled or has no
7
+ # published posts. Omit `when` to always show.
8
+ #
9
+ # If this file is absent, karaoke-cms generates a default main menu (Blog/Docs/Tags)
10
+ # and a default footer menu (RSS) from your active collections.
11
+
12
+ menus:
13
+ main:
14
+ orientation: horizontal
15
+ entries:
16
+ - text: Blog
17
+ href: /blog
18
+ weight: 10
19
+ when: collection:blog
20
+ - text: Docs
21
+ href: /docs
22
+ weight: 20
23
+ when: collection:docs
24
+ - text: Tags
25
+ href: /tags
26
+ weight: 30
27
+
28
+ footer:
29
+ orientation: horizontal
30
+ entries:
31
+ - text: RSS
32
+ href: /rss.xml
33
+ weight: 10
@@ -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`.