livemark 0.7.0 → 0.7.2
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/build/commands/escape.js +2 -2
- package/build/entrypoints/main.js +0 -0
- package/build/livemark.config.d.ts +5 -5
- package/build/package.json +138 -0
- package/build/program.js +3 -1
- package/build/settings.d.ts +2 -0
- package/build/settings.js +7 -0
- package/build/website/plugins/vite-livemark.ts +0 -7
- package/build/website/vite.config.ts +2 -1
- package/package.json +4 -4
- package/skills/authoring/SKILL.md +97 -0
- package/skills/configuration/SKILL.md +120 -0
- package/skills/customization/SKILL.md +118 -0
- package/entrypoints/main.ts +0 -12
package/build/commands/escape.js
CHANGED
|
@@ -2,7 +2,7 @@ import { existsSync, mkdirSync, readdirSync, readFileSync, statSync, writeFileSy
|
|
|
2
2
|
import { dirname, join } from "node:path";
|
|
3
3
|
import { Command } from "commander";
|
|
4
4
|
import pc from "picocolors";
|
|
5
|
-
import { OVERRIDE_SUBDIRS } from "../
|
|
5
|
+
import { OVERRIDE_SUBDIRS } from "../settings.js";
|
|
6
6
|
const defaultsRoot = join(import.meta.dirname, "..", "website");
|
|
7
7
|
/**
|
|
8
8
|
* List or copy overridable livemark files into `.livemark/`.
|
|
@@ -53,4 +53,4 @@ function listOverridable() {
|
|
|
53
53
|
}
|
|
54
54
|
return files.sort();
|
|
55
55
|
}
|
|
56
|
-
//# sourceMappingURL=data:application/json;base64,
|
|
56
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiZXNjYXBlLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vY29tbWFuZHMvZXNjYXBlLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUFBLE9BQU8sRUFDTCxVQUFVLEVBQ1YsU0FBUyxFQUNULFdBQVcsRUFDWCxZQUFZLEVBQ1osUUFBUSxFQUNSLGFBQWEsR0FDZCxNQUFNLF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pIHtcbiAgICAgIGNvbnNvbGUuZXJyb3IocGMucmVkKGBFcnJvcjogLmxpdmVtYXJrLyR7cmVsUGF0aH0gYWxyZWFkeSBleGlzdHNgKSlcbiAgICAgIHByb2Nlc3MuZXhpdCgxKVxuICAgIH1cblxuICAgIG1rZGlyU3luYyhkaXJuYW1lKGRlc3QpLCB7IHJlY3Vyc2l2ZTogdHJ1ZSB9KVxuICAgIHdyaXRlRmlsZVN5bmMoZGVzdCwgcmVhZEZpbGVTeW5jKHNyYykpXG4gICAgY29uc29sZS5sb2coXG4gICAgICBgQ29waWVkICR7cGMuZGltKHJlbFBhdGgpfSDihpIgJHtwYy5ncmVlbihgLmxpdmVtYXJrLyR7cmVsUGF0aH1gKX1gLFxuICAgIClcbiAgfSlcblxuZnVuY3Rpb24gbGlzdE92ZXJyaWRhYmxlKCkge1xuICBjb25zdCBmaWxlczogc3RyaW5nW10gPSBbXVxuICBmb3IgKGNvbnN0IHN1YmRpciBvZiBPVkVSUklERV9TVUJESVJTKSB7XG4gICAgY29uc3QgZGlyID0gam9pbihkZWZhdWx0c1Jvb3QsIHN1YmRpcilcbiAgICBpZiAoIWV4aXN0c1N5bmMoZGlyKSkgY29udGludWVcbiAgICBmb3IgKGNvbnN0IGVudHJ5IG9mIHJlYWRkaXJTeW5jKGRpcikpIHtcbiAgICAgIGlmIChzdGF0U3luYyhqb2luKGRpciwgZW50cnkpKS5pc0ZpbGUoKSkgZmlsZXMucHVzaChgJHtzdWJkaXJ9LyR7ZW50cnl9YClcbiAgICB9XG4gIH1cbiAgcmV0dXJuIGZpbGVzLnNvcnQoKVxufVxuIl19
|
|
File without changes
|
|
@@ -20,21 +20,21 @@ declare const _default: {
|
|
|
20
20
|
title: string;
|
|
21
21
|
prefix: string;
|
|
22
22
|
position: "header" | "sidebar";
|
|
23
|
-
type: "
|
|
23
|
+
type: "changelog";
|
|
24
|
+
source: string;
|
|
25
|
+
version?: boolean | undefined;
|
|
24
26
|
} | {
|
|
25
27
|
icon?: string | undefined;
|
|
26
28
|
title: string;
|
|
27
29
|
prefix: string;
|
|
28
30
|
position: "header" | "sidebar";
|
|
29
|
-
type: "
|
|
31
|
+
type: "article";
|
|
30
32
|
} | {
|
|
31
33
|
icon?: string | undefined;
|
|
32
34
|
title: string;
|
|
33
35
|
prefix: string;
|
|
34
36
|
position: "header" | "sidebar";
|
|
35
|
-
type: "
|
|
36
|
-
source: string;
|
|
37
|
-
version?: boolean | undefined;
|
|
37
|
+
type: "blog";
|
|
38
38
|
})[] | undefined;
|
|
39
39
|
patches?: {
|
|
40
40
|
file: string;
|
|
@@ -0,0 +1,138 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "livemark",
|
|
3
|
+
"version": "0.7.2",
|
|
4
|
+
"description": "Livemark description",
|
|
5
|
+
"license": "MIT",
|
|
6
|
+
"author": "Evgeny Karev",
|
|
7
|
+
"repository": "https://github.com/datisthq/livemark",
|
|
8
|
+
"bin": {
|
|
9
|
+
"livemark": "./build/entrypoints/main.js"
|
|
10
|
+
},
|
|
11
|
+
"files": [
|
|
12
|
+
"build",
|
|
13
|
+
"skills"
|
|
14
|
+
],
|
|
15
|
+
"type": "module",
|
|
16
|
+
"sideEffects": false,
|
|
17
|
+
"imports": {
|
|
18
|
+
"#*": "./*"
|
|
19
|
+
},
|
|
20
|
+
"exports": {
|
|
21
|
+
".": "./build/index.js",
|
|
22
|
+
"./components/*": "./build/website/components/*.tsx",
|
|
23
|
+
"./elements/*": "./build/website/elements/*.tsx",
|
|
24
|
+
"./styles/*": "./build/website/styles/*.css"
|
|
25
|
+
},
|
|
26
|
+
"scripts": {
|
|
27
|
+
"build": "tsgo && rm -rf build/website && cp -r website build",
|
|
28
|
+
"bump": "ncu -u",
|
|
29
|
+
"clean": "rm -rf pnpm-lock.yaml node_modules build",
|
|
30
|
+
"docs:build": "node entrypoints/main.ts build",
|
|
31
|
+
"docs:start": "node entrypoints/main.ts start",
|
|
32
|
+
"format": "vp fmt",
|
|
33
|
+
"lint": "vp fmt --check && vp lint",
|
|
34
|
+
"prepare": "is-ci || lefthook install --force",
|
|
35
|
+
"release": "pnpm publish --access public --ignore-scripts --no-git-checks",
|
|
36
|
+
"setversion": "pnpm version --no-git-tag-version",
|
|
37
|
+
"unit": "vp test",
|
|
38
|
+
"test": "pnpm lint && pnpm type && pnpm unit",
|
|
39
|
+
"type": "tsgo --noEmit"
|
|
40
|
+
},
|
|
41
|
+
"dependencies": {
|
|
42
|
+
"@base-ui/react": "1.3.0",
|
|
43
|
+
"@content-collections/core": "0.14.3",
|
|
44
|
+
"@content-collections/mdx": "0.2.2",
|
|
45
|
+
"@content-collections/vite": "0.3.0",
|
|
46
|
+
"@orama/orama": "^3.1.18",
|
|
47
|
+
"@shikijs/rehype": "4.0.2",
|
|
48
|
+
"@shikijs/twoslash": "^4.0.2",
|
|
49
|
+
"@sindresorhus/slugify": "^3.0.0",
|
|
50
|
+
"@tailwindcss/typography": "^0.5.19",
|
|
51
|
+
"@tailwindcss/vite": "4.2.4",
|
|
52
|
+
"@tanstack/devtools-vite": "0.6.0",
|
|
53
|
+
"@tanstack/react-devtools": "0.10.0",
|
|
54
|
+
"@tanstack/react-hotkeys": "^0.9.1",
|
|
55
|
+
"@tanstack/react-query": "5.91.3",
|
|
56
|
+
"@tanstack/react-query-devtools": "5.91.3",
|
|
57
|
+
"@tanstack/react-router": "1.168.1",
|
|
58
|
+
"@tanstack/react-router-devtools": "1.166.10",
|
|
59
|
+
"@tanstack/react-router-ssr-query": "1.166.10",
|
|
60
|
+
"@tanstack/react-start": "1.167.2",
|
|
61
|
+
"@tanstack/virtual-file-routes": "^1.161.7",
|
|
62
|
+
"@types/mdast": "^4.0.4",
|
|
63
|
+
"@types/react": "19.2.14",
|
|
64
|
+
"@types/react-dom": "19.2.3",
|
|
65
|
+
"@vitejs/plugin-react": "6.0.1",
|
|
66
|
+
"class-variance-authority": "0.7.1",
|
|
67
|
+
"clsx": "2.1.1",
|
|
68
|
+
"cmdk": "1.1.1",
|
|
69
|
+
"commander": "14.0.3",
|
|
70
|
+
"embla-carousel-react": "8.6.0",
|
|
71
|
+
"es-toolkit": "1.44.0",
|
|
72
|
+
"github-slugger": "^2.0.0",
|
|
73
|
+
"input-otp": "1.4.2",
|
|
74
|
+
"katex": "^0.16.44",
|
|
75
|
+
"lucide-react": "0.577.0",
|
|
76
|
+
"mdast-util-directive": "^3.1.0",
|
|
77
|
+
"mdast-util-to-string": "^4.0.0",
|
|
78
|
+
"mermaid": "^11.14.0",
|
|
79
|
+
"npm-to-yarn": "^3.0.1",
|
|
80
|
+
"picocolors": "1.1.1",
|
|
81
|
+
"react": "19.2.4",
|
|
82
|
+
"react-day-picker": "9.14.0",
|
|
83
|
+
"react-dom": "19.2.4",
|
|
84
|
+
"react-medium-image-zoom": "^5.4.2",
|
|
85
|
+
"react-resizable-panels": "4.9.0",
|
|
86
|
+
"recharts": "3.8.1",
|
|
87
|
+
"rehype-katex": "7.0.1",
|
|
88
|
+
"rehype-sanitize": "6.0.0",
|
|
89
|
+
"rehype-slug": "^6.0.0",
|
|
90
|
+
"remark-definition-list": "^2.0.0",
|
|
91
|
+
"remark-directive": "^4.0.0",
|
|
92
|
+
"remark-gemoji": "^8.0.0",
|
|
93
|
+
"remark-gfm": "4.0.1",
|
|
94
|
+
"remark-math": "6.0.0",
|
|
95
|
+
"remark-parse": "^11.0.0",
|
|
96
|
+
"remark-stringify": "^11.0.0",
|
|
97
|
+
"shadcn": "3.7.0",
|
|
98
|
+
"shiki": "4.0.2",
|
|
99
|
+
"sonner": "2.0.7",
|
|
100
|
+
"tailwind-merge": "3.5.0",
|
|
101
|
+
"tailwindcss": "4.2.2",
|
|
102
|
+
"tw-animate-css": "1.4.0",
|
|
103
|
+
"unified": "^11.0.5",
|
|
104
|
+
"unist-util-visit": "^5.1.0",
|
|
105
|
+
"vaul": "1.1.2",
|
|
106
|
+
"vite": "8.0.10",
|
|
107
|
+
"vite-plugin-svgr": "5.2.0",
|
|
108
|
+
"zod": "4.3.6"
|
|
109
|
+
},
|
|
110
|
+
"devDependencies": {
|
|
111
|
+
"@semantic-release/exec": "7.1.0",
|
|
112
|
+
"@types/node": "24.2.0",
|
|
113
|
+
"@typescript/native-preview": "7.0.0-dev.20260316.1",
|
|
114
|
+
"@vitest/coverage-v8": "4.1.5",
|
|
115
|
+
"conventional-changelog-conventionalcommits": "9.1.0",
|
|
116
|
+
"husky": "9.1.7",
|
|
117
|
+
"is-ci": "4.1.0",
|
|
118
|
+
"lefthook": "2.1.1",
|
|
119
|
+
"npm-check-updates": "18.0.1",
|
|
120
|
+
"semantic-release": "24.2.9",
|
|
121
|
+
"tempy": "3.2.0",
|
|
122
|
+
"vite-plus": "0.1.19",
|
|
123
|
+
"vitest-polly": "2.1.0",
|
|
124
|
+
"wrangler": "4.85.0"
|
|
125
|
+
},
|
|
126
|
+
"engines": {
|
|
127
|
+
"node": "^24.0.0",
|
|
128
|
+
"pnpm": "^10.0.0"
|
|
129
|
+
},
|
|
130
|
+
"packageManager": "pnpm@10.11.0+sha512.6540583f41cc5f628eb3d9773ecee802f4f9ef9923cc45b69890fb47991d4b092964694ec3a4f738a420c918a333062c8b925d312f42e4f0c263eb603551f977",
|
|
131
|
+
"pnpm": {
|
|
132
|
+
"peerDependencyRules": {
|
|
133
|
+
"allowedVersions": {
|
|
134
|
+
"@content-collections/vite>vite": "8"
|
|
135
|
+
}
|
|
136
|
+
}
|
|
137
|
+
}
|
|
138
|
+
}
|
package/build/program.js
CHANGED
|
@@ -4,13 +4,15 @@ import { escape } from "./commands/escape.js";
|
|
|
4
4
|
import { preview } from "./commands/preview.js";
|
|
5
5
|
import { start } from "./commands/start.js";
|
|
6
6
|
import { helpConfiguration } from "./helpers/program.js";
|
|
7
|
+
import packageJson from "./package.json" with { type: "json" };
|
|
7
8
|
export const program = new Command()
|
|
8
9
|
.name("livemark")
|
|
9
10
|
.description("Livemark static site generator")
|
|
11
|
+
.version(packageJson.version, "-v, --version", "display the livemark version")
|
|
10
12
|
.option("-c, --config <path>", "path to config file")
|
|
11
13
|
.configureHelp(helpConfiguration)
|
|
12
14
|
.addCommand(start)
|
|
13
15
|
.addCommand(build)
|
|
14
16
|
.addCommand(preview)
|
|
15
17
|
.addCommand(escape);
|
|
16
|
-
//# sourceMappingURL=data:application/json;base64,
|
|
18
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoicHJvZ3JhbS5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uL3Byb2dyYW0udHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUEsT0FBTyxFQUFFLE9BQU8sRUFBRSxNQUFNLFdBQVcsQ0FBQTtBQUNuQyxPQUFPLEVBQUUsS0FBSyxFQUFFLE1BQU0scUJBQXFCLENBQUE7QUFDM0MsT0FBTyxFQUFFLE1BQU0sRUFBRSxNQUFNLHNCQUFzQixDQUFBO0FBQzdDLE9BQU8sRUFBRSxPQUFPLEVBQUUsTUFBTSx1QkFBdUIsQ0FBQTtBQUMvQyxPQUFPLEVBQUUsS0FBSyxFQUFFLE1BQU0scUJBQXFCLENBQUE7QUFDM0MsT0FBTyxFQUFFLGlCQUFpQixFQUFFLE1BQU0sc0JBQXNCLENBQUE7QUFDeEQsT0FBTyxXQUFXLE1BQU0sZ0JBQWdCLENBQUMsT0FBTyxJQUFJLEVBQUUsTUFBTSxFQUFFLENBQUE7QUFFOUQsTUFBTSxDQUFDLE1BQU0sT0FBTyxHQUFHLElBQUksT0FBTyxFQUFFO0tBQ2pDLElBQUksQ0FBQyxVQUFVLENBQUM7S0FDaEIsV0FBVyxDQUFDLGdDQUFnQyxDQUFDO0tBQzdDLE9BQU8sQ0FBQyxXQUFXLENBQUMsT0FBTyxFQUFFLGVBQWUsRUFBRSw4QkFBOEIsQ0FBQztLQUM3RSxNQUFNLENBQUMscUJBQXFCLEVBQUUscUJBQXFCLENBQUM7S0FDcEQsYUFBYSxDQUFDLGlCQUFpQixDQUFDO0tBQ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ZGRDb21tYW5kKGJ1aWxkKVxuICAuYWRkQ29tbWFuZChwcmV2aWV3KVxuICAuYWRkQ29tbWFuZChlc2NhcGUpXG4iXX0=
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
/** Sub-directories of `website/` that participate in the override mechanism. */
|
|
2
|
+
export const OVERRIDE_SUBDIRS = [
|
|
3
|
+
"components",
|
|
4
|
+
"elements",
|
|
5
|
+
"styles",
|
|
6
|
+
];
|
|
7
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoic2V0dGluZ3MuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi9zZXR0aW5ncy50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFBQSxnRkFBZ0Y7QUFDaEYsTUFBTSxDQUFDLE1BQU0sZ0JBQWdCLEdBQXNCO0lBQ2pELFlBQVk7SUFDWixVQUFVO0lBQ1YsUUFBUTtDQUNULENBQUEiLCJzb3VyY2VzQ29udGVudCI6WyIvKiogU3ViLWRpcmVjdG9yaWVzIG9mIGB3ZWJzaXRlL2AgdGhhdCBwYXJ0aWNpcGF0ZSBpbiB0aGUgb3ZlcnJpZGUgbWVjaGFuaXNtLiAqL1xuZXhwb3J0IGNvbnN0IE9WRVJSSURFX1NVQkRJUlM6IHJlYWRvbmx5IHN0cmluZ1tdID0gW1xuICBcImNvbXBvbmVudHNcIixcbiAgXCJlbGVtZW50c1wiLFxuICBcInN0eWxlc1wiLFxuXVxuIl19
|
|
@@ -2,13 +2,6 @@ import { existsSync } from "node:fs"
|
|
|
2
2
|
import { join } from "node:path"
|
|
3
3
|
import type { Plugin } from "vite"
|
|
4
4
|
|
|
5
|
-
/** Sub-directories of `website/` that participate in the override mechanism. */
|
|
6
|
-
export const OVERRIDE_SUBDIRS: readonly string[] = [
|
|
7
|
-
"components",
|
|
8
|
-
"elements",
|
|
9
|
-
"styles",
|
|
10
|
-
]
|
|
11
|
-
|
|
12
5
|
export interface LivemarkOptions {
|
|
13
6
|
defaultsRoot: string
|
|
14
7
|
overridesRoot: string
|
|
@@ -15,7 +15,8 @@ import { defineConfig } from "vite"
|
|
|
15
15
|
import svgr from "vite-plugin-svgr"
|
|
16
16
|
import { loadConfig } from "../actions/config/load.ts"
|
|
17
17
|
import { WebsiteConfig } from "../models/config.ts"
|
|
18
|
-
import {
|
|
18
|
+
import { OVERRIDE_SUBDIRS } from "../settings.ts"
|
|
19
|
+
import { livemark } from "./plugins/vite-livemark.ts"
|
|
19
20
|
|
|
20
21
|
const config = await loadConfig()
|
|
21
22
|
const websiteDir = import.meta.dirname
|
package/package.json
CHANGED
|
@@ -1,15 +1,16 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "livemark",
|
|
3
|
-
"version": "0.7.
|
|
3
|
+
"version": "0.7.2",
|
|
4
4
|
"description": "Livemark description",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"author": "Evgeny Karev",
|
|
7
7
|
"repository": "https://github.com/datisthq/livemark",
|
|
8
8
|
"bin": {
|
|
9
|
-
"livemark": "./entrypoints/main.
|
|
9
|
+
"livemark": "./build/entrypoints/main.js"
|
|
10
10
|
},
|
|
11
11
|
"files": [
|
|
12
|
-
"build"
|
|
12
|
+
"build",
|
|
13
|
+
"skills"
|
|
13
14
|
],
|
|
14
15
|
"type": "module",
|
|
15
16
|
"sideEffects": false,
|
|
@@ -117,7 +118,6 @@
|
|
|
117
118
|
"clean": "rm -rf pnpm-lock.yaml node_modules build",
|
|
118
119
|
"docs:build": "node entrypoints/main.ts build",
|
|
119
120
|
"docs:start": "node entrypoints/main.ts start",
|
|
120
|
-
"docs:preview": "node entrypoints/main.ts preview",
|
|
121
121
|
"format": "vp fmt",
|
|
122
122
|
"lint": "vp fmt --check && vp lint",
|
|
123
123
|
"release": "pnpm publish --access public --ignore-scripts --no-git-checks",
|
|
@@ -0,0 +1,97 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: livemark-authoring
|
|
3
|
+
description: Use when adding or editing Markdown articles in a Livemark project — covers file placement under include globs, frontmatter fields, sidebar grouping, URL derivation, images/assets, and the patches mechanism for files that can't carry frontmatter.
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# Livemark Authoring
|
|
7
|
+
|
|
8
|
+
Guidance for writing and maintaining Markdown content in a Livemark project.
|
|
9
|
+
|
|
10
|
+
## When to use this skill
|
|
11
|
+
|
|
12
|
+
Invoke when the user asks to:
|
|
13
|
+
|
|
14
|
+
- Add a new article, page, or docs section.
|
|
15
|
+
- Rename, reorder, hide, or regroup an existing article.
|
|
16
|
+
- Set metadata (title, icon, tags, date, author, OG image).
|
|
17
|
+
- Patch a file (typically `README.md`) that needs Livemark metadata without dirtying its upstream rendering.
|
|
18
|
+
|
|
19
|
+
## Where articles live
|
|
20
|
+
|
|
21
|
+
- Livemark collects Markdown files that match the `include` glob(s) in `livemark.config.ts`. The default project layout is `docs/**/*.md`. Respect existing convention in the repo.
|
|
22
|
+
- Files ending in `.md` are supported by default. Drafts/partials can be co-located but excluded via the `exclude` glob (e.g. `docs/**/_*.md`).
|
|
23
|
+
|
|
24
|
+
## Frontmatter template
|
|
25
|
+
|
|
26
|
+
Every field is optional. Livemark derives defaults from the file itself.
|
|
27
|
+
|
|
28
|
+
```yaml
|
|
29
|
+
---
|
|
30
|
+
title: Getting Started # default: first `# ` heading, else filename
|
|
31
|
+
label: Start # short variant used in sidebar/breadcrumbs
|
|
32
|
+
description: A one-line blurb. # used in <meta description> and OG
|
|
33
|
+
icon: rocket # lucide icon name
|
|
34
|
+
order: 1 # sidebar sort; negatives pin to end
|
|
35
|
+
group: Docs # sidebar section label
|
|
36
|
+
path: /getting-started/ # default: slugified filename + leading/trailing slashes
|
|
37
|
+
sidebar: true # false hides from nav but keeps URL reachable
|
|
38
|
+
toc: true # false suppresses right-hand TOC
|
|
39
|
+
image: ./cover.png # OG/social card; relative resolves against the file
|
|
40
|
+
author: Ada Lovelace # or [Ada Lovelace, Grace Hopper]
|
|
41
|
+
date: 2026-04-20 # ISO — drives blog section sort order
|
|
42
|
+
tags: [release, announcement] # blog-section tag pages /prefix/tags/<tag>/
|
|
43
|
+
---
|
|
44
|
+
```
|
|
45
|
+
|
|
46
|
+
## Rules of thumb
|
|
47
|
+
|
|
48
|
+
1. **One H1 per file.** Livemark uses the first `# ` for the title when frontmatter `title` is omitted. Don't add a duplicate H1 in the body if the frontmatter already sets `title`.
|
|
49
|
+
2. **Order is piecewise.** Positive numbers sort first ascending, unordered articles come next, negative numbers land at the end (`-1` last, `-2` second-to-last). Leave the middle alone — only set `order` on items you want pinned.
|
|
50
|
+
3. **Grouping.** Contiguous root-level articles with the same `group` string render under a labelled sidebar section. Mixing groups breaks visual grouping.
|
|
51
|
+
4. **URLs.** Don't set `path` unless you need to override the default slug. Livemark derives `path` from the filename plus leading/trailing slashes.
|
|
52
|
+
5. **Images.** Relative paths in `image`, Markdown ``, and MDX `<img src>` resolve against the article file — keep assets co-located or under `docs/images/`.
|
|
53
|
+
|
|
54
|
+
## Patching a file you can't touch
|
|
55
|
+
|
|
56
|
+
When a file already lives on disk (for example `README.md` that GitHub renders) and you don't want to pollute it with frontmatter, inject metadata via `patches` in `livemark.config.ts`:
|
|
57
|
+
|
|
58
|
+
```ts
|
|
59
|
+
patches: [
|
|
60
|
+
{
|
|
61
|
+
file: "README.md",
|
|
62
|
+
article: { title: "Overview", icon: "sparkles", order: 0 },
|
|
63
|
+
},
|
|
64
|
+
]
|
|
65
|
+
```
|
|
66
|
+
|
|
67
|
+
The `file` field is exact-match on the collection-relative path. `content` cannot be patched — zod rejects at config load.
|
|
68
|
+
|
|
69
|
+
## Blog posts
|
|
70
|
+
|
|
71
|
+
For a blog section:
|
|
72
|
+
|
|
73
|
+
```yaml
|
|
74
|
+
---
|
|
75
|
+
title: "Announcing v0.3"
|
|
76
|
+
date: 2026-04-20
|
|
77
|
+
author: Livemark Team
|
|
78
|
+
tags: [release, announcement]
|
|
79
|
+
image: ./images/v0-3.png
|
|
80
|
+
description: What's new in 0.3, in 400 words.
|
|
81
|
+
---
|
|
82
|
+
```
|
|
83
|
+
|
|
84
|
+
`date` is required for correct chronological sort. `tags` drive the `/<prefix>/tags/<tag>/` pages.
|
|
85
|
+
|
|
86
|
+
## Verification
|
|
87
|
+
|
|
88
|
+
After authoring, run:
|
|
89
|
+
|
|
90
|
+
- `pnpm docs:build` — confirms the file prerenders without error.
|
|
91
|
+
- Grep built HTML (`.livemark/build/client/<path>/index.html`) to confirm title and metadata land as intended.
|
|
92
|
+
|
|
93
|
+
## References
|
|
94
|
+
|
|
95
|
+
- Full frontmatter reference: `docs/markdown/frontmatter.md`.
|
|
96
|
+
- Schema source of truth: `website/models/article.ts`.
|
|
97
|
+
- Transform pipeline: `website/content-collections.ts`.
|
|
@@ -0,0 +1,120 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: livemark-configuration
|
|
3
|
+
description: Use when editing livemark.config.ts — site metadata, include/exclude globs, syntax themes, sections (article/blog/changelog), navigation links, and patches.
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# Livemark Configuration
|
|
7
|
+
|
|
8
|
+
Guidance for editing `livemark.config.ts` at the project root.
|
|
9
|
+
|
|
10
|
+
## When to use this skill
|
|
11
|
+
|
|
12
|
+
Invoke when the user asks to:
|
|
13
|
+
|
|
14
|
+
- Set the site title, description, canonical URL, logo, favicon.
|
|
15
|
+
- Change which files are included or excluded.
|
|
16
|
+
- Switch code-block syntax highlighting themes.
|
|
17
|
+
- Add, reorder, or retype a section (docs/blog/changelog).
|
|
18
|
+
- Add or remove header/sidebar links.
|
|
19
|
+
- Patch a specific file's frontmatter without editing its source.
|
|
20
|
+
|
|
21
|
+
## The config shape
|
|
22
|
+
|
|
23
|
+
```ts
|
|
24
|
+
// livemark.config.ts
|
|
25
|
+
import { defineConfig } from "livemark"
|
|
26
|
+
|
|
27
|
+
export default defineConfig({
|
|
28
|
+
// Required
|
|
29
|
+
include: "docs/**/*.md", // string | string[] of glob patterns
|
|
30
|
+
|
|
31
|
+
// Optional: site metadata
|
|
32
|
+
site: "https://example.com", // canonical origin — enables sitemap
|
|
33
|
+
title: "My Docs", // <title>, og:title, header
|
|
34
|
+
description: "Short blurb.", // <meta description>, og:description
|
|
35
|
+
logo: "/logo.svg", // header mark; also default favicon
|
|
36
|
+
favicon: "/favicon.ico", // browser tab icon
|
|
37
|
+
|
|
38
|
+
// Optional: content selection
|
|
39
|
+
exclude: "docs/drafts/**", // string | string[]
|
|
40
|
+
|
|
41
|
+
// Optional: syntax themes (Shiki)
|
|
42
|
+
codeThemeLight: "catppuccin-latte", // default
|
|
43
|
+
codeThemeDark: "catppuccin-mocha", // default
|
|
44
|
+
|
|
45
|
+
// Optional: navigation
|
|
46
|
+
links: [{ url: "https://github.com/x/y", title: "GitHub", icon: "github" }],
|
|
47
|
+
|
|
48
|
+
// Optional: sections
|
|
49
|
+
sections: [
|
|
50
|
+
{ title: "Docs", prefix: "/" },
|
|
51
|
+
{ title: "Blog", prefix: "/blog/", type: "blog" },
|
|
52
|
+
{
|
|
53
|
+
title: "Changelog",
|
|
54
|
+
prefix: "/changelog/",
|
|
55
|
+
type: "changelog",
|
|
56
|
+
source: "CHANGELOG.md",
|
|
57
|
+
version: true,
|
|
58
|
+
},
|
|
59
|
+
],
|
|
60
|
+
|
|
61
|
+
// Optional: per-file frontmatter overrides
|
|
62
|
+
patches: [
|
|
63
|
+
{ file: "README.md", article: { title: "Overview", icon: "sparkles" } },
|
|
64
|
+
],
|
|
65
|
+
})
|
|
66
|
+
```
|
|
67
|
+
|
|
68
|
+
## Sections: the three types
|
|
69
|
+
|
|
70
|
+
`sections` is optional. Omitting it gives a single default docs section.
|
|
71
|
+
|
|
72
|
+
- **Article** (default when `type` is omitted): flat docs with a tree sidebar.
|
|
73
|
+
- **Blog** (`type: "blog"`): auto-generated index at `prefix`, sorts by `date`, exposes `/prefix/tags/<tag>/` pages.
|
|
74
|
+
- **Changelog** (`type: "changelog"`): reads `source` file; with `version: true`, splits on semver headings into per-version articles.
|
|
75
|
+
|
|
76
|
+
Shared fields on every section: `title`, `prefix` (keep trailing-slashed), `type`, `icon` (lucide), `position` (`"header"` default, `"sidebar"` also available).
|
|
77
|
+
|
|
78
|
+
Article-to-section matching is longest-prefix-wins on the article's URL `path`.
|
|
79
|
+
|
|
80
|
+
## Links
|
|
81
|
+
|
|
82
|
+
```ts
|
|
83
|
+
{
|
|
84
|
+
url: "https://example.com",
|
|
85
|
+
title: "Example",
|
|
86
|
+
icon: "github", // lucide name, kebab-case
|
|
87
|
+
position: "header", // or "sidebar"
|
|
88
|
+
prefix: "/blog/", // optional: only show in this section
|
|
89
|
+
}
|
|
90
|
+
```
|
|
91
|
+
|
|
92
|
+
Default `position` is `"header"`. Use `prefix` to scope a sidebar link to a single section.
|
|
93
|
+
|
|
94
|
+
## Syntax themes
|
|
95
|
+
|
|
96
|
+
Any [Shiki theme](https://shiki.style/themes) name works. Defaults keep the catppuccin pairing. If you swap the light theme, audit code-block token contrast against the theme's background (WCAG AA wants 4.5:1).
|
|
97
|
+
|
|
98
|
+
## Editing rules of thumb
|
|
99
|
+
|
|
100
|
+
1. **Don't invent fields.** Livemark's `UserConfig` is a strict zod schema. Unknown keys throw at config load.
|
|
101
|
+
2. **Strings are literals.** Section `prefix` values are compared exactly; keep them consistent (`/blog/`, not `/blog`).
|
|
102
|
+
3. **Array order matters** for `sections` and `links` — it drives tab / link display order.
|
|
103
|
+
4. **Patches are silent on miss.** If `file` doesn't match any included article, nothing happens (no warning). Spell the path carefully.
|
|
104
|
+
|
|
105
|
+
## Autoreload
|
|
106
|
+
|
|
107
|
+
The dev server watches `livemark.config.ts` and restarts on edit. No need to kill `pnpm docs:start` after tweaking the config.
|
|
108
|
+
|
|
109
|
+
## Verification
|
|
110
|
+
|
|
111
|
+
- `pnpm type` — catches schema mismatches.
|
|
112
|
+
- `pnpm docs:build` — prerenders with the new config; the output listing shows whether section routes resolved.
|
|
113
|
+
|
|
114
|
+
## References
|
|
115
|
+
|
|
116
|
+
- Config schema: `models/config.ts`.
|
|
117
|
+
- Section variants: `models/section.ts`.
|
|
118
|
+
- Link shape: `models/link.ts`.
|
|
119
|
+
- Patch shape: `models/patch.ts`.
|
|
120
|
+
- Narrative docs: `docs/customization/`.
|
|
@@ -0,0 +1,118 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: livemark-customization
|
|
3
|
+
description: Use when overriding Livemark's built-in UI or adding custom routes — drop same-named files under .livemark/{components,elements,styles} to shadow defaults, author .livemark/routes/*.tsx for new pages, or copy defaults with the `livemark escape` command.
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# Livemark Customization
|
|
7
|
+
|
|
8
|
+
Guidance for customizing the UI layer of a Livemark project beyond what `livemark.config.ts` exposes.
|
|
9
|
+
|
|
10
|
+
## When to use this skill
|
|
11
|
+
|
|
12
|
+
Invoke when the user asks to:
|
|
13
|
+
|
|
14
|
+
- Change a built-in component's layout or markup (Footer, Sidebar, Banner, …).
|
|
15
|
+
- Restyle a shared primitive (buttons, inputs, cards, sheet, …).
|
|
16
|
+
- Rebrand via CSS tokens (colors, radii, typography).
|
|
17
|
+
- Add a brand-new page that isn't a Markdown article (landing hero, pricing page, about page).
|
|
18
|
+
- Replace Livemark's default landing page with a custom React component.
|
|
19
|
+
- Serve a custom `favicon.svg`, `robots.txt`, `og-image.png`, or other static asset.
|
|
20
|
+
|
|
21
|
+
## Three overlapping mechanisms
|
|
22
|
+
|
|
23
|
+
| Goal | Mechanism |
|
|
24
|
+
| --------------------------------- | ----------------------------------------------------- |
|
|
25
|
+
| Replace a default component/style | Drop a file at `.livemark/components/<Name>.tsx` etc. |
|
|
26
|
+
| Add a new page at an exact URL | Create `.livemark/routes/<path>.tsx` |
|
|
27
|
+
| Serve a static asset at `/<path>` | Put the file in `.livemark/public/<path>` |
|
|
28
|
+
|
|
29
|
+
None require config changes. The Vite plugin (`website/plugins/vite-livemark.ts`) watches `.livemark/**` and hot-reloads.
|
|
30
|
+
|
|
31
|
+
## Discovering what's overridable
|
|
32
|
+
|
|
33
|
+
Run the `escape` command. No arg lists every overridable file:
|
|
34
|
+
|
|
35
|
+
```bash
|
|
36
|
+
livemark escape
|
|
37
|
+
```
|
|
38
|
+
|
|
39
|
+
Output is a flat `<subdir>/<file>` list across `components/`, `elements/`, and `styles/`. With an argument, the command copies the default into `.livemark/`:
|
|
40
|
+
|
|
41
|
+
```bash
|
|
42
|
+
livemark escape components/Footer.tsx # → .livemark/components/Footer.tsx
|
|
43
|
+
livemark escape elements/button.tsx # → .livemark/elements/button.tsx
|
|
44
|
+
livemark escape styles/general.css # → .livemark/styles/general.css
|
|
45
|
+
```
|
|
46
|
+
|
|
47
|
+
The command refuses to overwrite an existing override. Delete the override first if you want a fresh start.
|
|
48
|
+
|
|
49
|
+
## Typical workflow: override a component
|
|
50
|
+
|
|
51
|
+
1. `livemark escape components/Footer.tsx` — copy the default.
|
|
52
|
+
2. Edit `.livemark/components/Footer.tsx`. All the site's Footer renders shift to the new file on save.
|
|
53
|
+
3. Inside the override, import other Livemark modules from the `livemark/<subdir>/*` subpath exports:
|
|
54
|
+
```tsx
|
|
55
|
+
import { cn } from "livemark/helpers/style"
|
|
56
|
+
import { Button } from "livemark/elements/button"
|
|
57
|
+
```
|
|
58
|
+
|
|
59
|
+
## Typical workflow: rebrand
|
|
60
|
+
|
|
61
|
+
1. `livemark escape styles/general.css`.
|
|
62
|
+
2. Edit the `:root` and `.dark` blocks in `.livemark/styles/general.css`:
|
|
63
|
+
- `--primary` — brand accent (Tailwind-flavoured oklch values work).
|
|
64
|
+
- `--radius` — corner roundness base.
|
|
65
|
+
- Sidebar / chart tokens if you want deeper tweaks.
|
|
66
|
+
3. Save — the dev server applies immediately.
|
|
67
|
+
|
|
68
|
+
Whole-site contrast is audited: light mode targets blue-600, dark mode targets blue-500. Keep new token values AA-compliant on both backgrounds (≥4.5:1 for text).
|
|
69
|
+
|
|
70
|
+
## Typical workflow: add a page
|
|
71
|
+
|
|
72
|
+
Custom routes use [TanStack Router](https://tanstack.com/router). Minimal example:
|
|
73
|
+
|
|
74
|
+
```tsx title=".livemark/routes/about.tsx"
|
|
75
|
+
import { createFileRoute } from "@tanstack/react-router"
|
|
76
|
+
|
|
77
|
+
export const Route = createFileRoute("/about")({
|
|
78
|
+
component: () => (
|
|
79
|
+
<main className="mx-auto max-w-3xl px-6 py-16 prose">
|
|
80
|
+
<h1>About</h1>
|
|
81
|
+
<p>Hello.</p>
|
|
82
|
+
</main>
|
|
83
|
+
),
|
|
84
|
+
})
|
|
85
|
+
```
|
|
86
|
+
|
|
87
|
+
Filename maps to URL path: `.livemark/routes/pricing.tsx` → `/pricing/`. Nested paths work via nested folders.
|
|
88
|
+
|
|
89
|
+
An `index.tsx` in `.livemark/routes/` **replaces** Livemark's default landing at `/`.
|
|
90
|
+
|
|
91
|
+
Custom routes win over the Markdown catch-all at exact URLs. Don't create a route that collides with an article URL unless you intend to hide the article.
|
|
92
|
+
|
|
93
|
+
## Rules of thumb
|
|
94
|
+
|
|
95
|
+
1. **Don't fork the repo** for routine customization. Use `.livemark/` first — it reliably survives Livemark upgrades.
|
|
96
|
+
2. **Same filename, same path under `.livemark/`.** The override plugin is case-sensitive and mirrors the subdirectory structure exactly.
|
|
97
|
+
3. **Override files are full replacements**, not diffs. Copy the default first (via `escape`), then edit.
|
|
98
|
+
4. **Import Livemark internals via `livemark/*`**, not via relative paths — the plugin routes those through the override resolver, so chained overrides (e.g., your Layout using your Sidebar) compose correctly.
|
|
99
|
+
5. **Static files belong in `.livemark/public/`**, which Vite exposes at the site root.
|
|
100
|
+
|
|
101
|
+
## What's NOT overridable
|
|
102
|
+
|
|
103
|
+
- `actions/`, `commands/`, `program.ts` — server/CLI code. Fork upstream if you need to change these.
|
|
104
|
+
- `livemark.config.ts` schema — fixed.
|
|
105
|
+
- Content-collections transform pipeline. Customize markdown via remark/rehype plugins in a fork (or PR upstream).
|
|
106
|
+
|
|
107
|
+
## Verification
|
|
108
|
+
|
|
109
|
+
- `pnpm type` — confirms overrides typecheck.
|
|
110
|
+
- `pnpm docs:build` — smoke-test the override lands in the bundle.
|
|
111
|
+
- Browser: load an article page with the dev server; custom Footer/Sidebar/etc. should render without a full reload.
|
|
112
|
+
|
|
113
|
+
## References
|
|
114
|
+
|
|
115
|
+
- Narrative docs: `docs/customization/file-overrides.md`, `docs/customization/custom-routes.md`.
|
|
116
|
+
- Plugin implementation: `website/plugins/vite-livemark.ts`.
|
|
117
|
+
- Escape command: `commands/escape.ts`.
|
|
118
|
+
- Subpath exports: `package.json` `exports` block.
|
package/entrypoints/main.ts
DELETED
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
#!/usr/bin/env node
|
|
2
|
-
|
|
3
|
-
process.removeAllListeners("warning")
|
|
4
|
-
process.on("warning", warning => {
|
|
5
|
-
if (warning.name === "ExperimentalWarning") {
|
|
6
|
-
return
|
|
7
|
-
}
|
|
8
|
-
console.warn(warning)
|
|
9
|
-
})
|
|
10
|
-
|
|
11
|
-
const { program } = await import("../program.ts")
|
|
12
|
-
program.parse()
|