getfilepress 0.1.8 → 0.1.10

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 (42) hide show
  1. package/README.md +21 -4
  2. package/package.json +110 -102
  3. package/packages/app/src/lib/genie/GeniePanel.svelte +286 -21
  4. package/packages/app/src/lib/genie/ops.ts +7 -1
  5. package/packages/app/src/lib/genie/store.ts +54 -1
  6. package/packages/app/src/lib/theme-entry.ts +2 -1
  7. package/packages/app/src/routes/+error.svelte +38 -0
  8. package/packages/app/src/routes/posts/+page.server.ts +12 -0
  9. package/packages/app/src/routes/posts/+page.svelte +38 -0
  10. package/packages/app/src/routes/posts/[slug]/+page.svelte +2 -1
  11. package/packages/app/src/routes/writing/+page.server.ts +2 -6
  12. package/packages/app/src/routes/writing/+page.svelte +1 -38
  13. package/packages/app/src/site-theme.d.ts +3 -0
  14. package/packages/app/vite-plugin-genie.ts +45 -1
  15. package/packages/app/vite.config.ts +38 -7
  16. package/packages/core/src/lib/components/PostCard.svelte +2 -1
  17. package/packages/core/src/lib/components/PostIndex.svelte +1 -1
  18. package/packages/core/src/lib/config.ts +51 -5
  19. package/packages/core/src/lib/content/feeds.ts +1 -1
  20. package/packages/core/src/lib/content/parse.ts +2 -0
  21. package/packages/core/src/lib/content/types.ts +2 -0
  22. package/packages/core/src/lib/format.ts +11 -0
  23. package/packages/core/src/lib/index.ts +7 -3
  24. package/packages/core/src/lib/redirects.ts +88 -0
  25. package/packages/core/src/lib/server.ts +9 -2
  26. package/packages/core/src/lib/styles/presets/essay.css +2 -0
  27. package/packages/core/src/lib/styles/presets/folio.css +27 -0
  28. package/packages/core/src/lib/styles/presets/ink.css +28 -0
  29. package/packages/core/src/lib/styles/theme.css +37 -0
  30. package/packages/import/src/cli.ts +1 -0
  31. package/packages/import/src/extract.ts +15 -2
  32. package/packages/import/src/ir.ts +2 -0
  33. package/packages/import/src/ollama.ts +119 -27
  34. package/packages/import/src/redirects.ts +17 -0
  35. package/packages/import/src/write-site.ts +25 -3
  36. package/scripts/copy-path-mounts.mjs +30 -1
  37. package/scripts/create-site.mjs +1 -0
  38. package/scripts/filepress.mjs +24 -14
  39. package/scripts/new-post.ts +125 -0
  40. package/scripts/preview.mjs +95 -0
  41. package/packages/app/README.md +0 -19
  42. package/packages/core/README.md +0 -29
package/README.md CHANGED
@@ -96,6 +96,7 @@ export default defineFilepressConfig({
96
96
  { label: 'RSS', href: '/rss.xml' },
97
97
  { label: 'GitHub', href: 'https://github.com/acme/site', icon: 'github' }
98
98
  ],
99
+ theme: 'essay', // or 'ink' | 'folio'; site theme.css still wins last
99
100
  newsletter: {
100
101
  url: 'https://buttondown.email/me',
101
102
  blurb: 'Occasional notes.',
@@ -124,8 +125,9 @@ paths: [
124
125
 
125
126
  ## Theming
126
127
 
127
- The engine ships a default Essay look. To restyle a site, add `theme.css` next to
128
- `filepress.config.ts`. It loads after the default theme, so you can override CSS
128
+ The engine ships a default Essay look, plus two token presets (`ink`, `folio`)
129
+ via config `theme`. To restyle a site, add `theme.css` next to
130
+ `filepress.config.ts`. It loads last, so you can override CSS
129
131
  variables and structural classes without forking the app.
130
132
 
131
133
  In local `filepress dev` / `pnpm dev`, **Genie Mode** (floating FAB) is a design cockpit:
@@ -147,7 +149,14 @@ Token and class reference: [`docs/THEME.md`](docs/THEME.md).
147
149
 
148
150
  ## Writing a post
149
151
 
150
- Add a file under the site's `posts/` directory:
152
+ From the site root (or with `--site` / `--root` in this monorepo):
153
+
154
+ ```bash
155
+ filepress new "My Post"
156
+ filepress new "My Post" --draft
157
+ ```
158
+
159
+ That writes `posts/YYYY-MM-DD-my-post.md`. Or add a file by hand:
151
160
 
152
161
  ```markdown
153
162
  ---
@@ -174,7 +183,7 @@ Body content in **Markdown**.
174
183
  | `draft` | no | Hidden from production listings/feeds/sitemap; still builds at its URL. Listed with a Draft label under `pnpm dev` (localhost). |
175
184
  | `updated` | no | Shown when different from `date`. |
176
185
 
177
- **Images:** put files in `static/images/posts/<slug>/` and reference them as `/images/posts/<slug>/photo.jpg`.
186
+ **Images:** put files in `static/images/posts/<slug>/` and reference them as `/images/posts/<slug>/photo.jpg`. The demo site’s [Images in posts](sites/demo/posts/images-in-posts.md) post is a worked example.
178
187
 
179
188
  **Captions:** an image alone on a line becomes a `<figure>`; the title attribute is the caption:
180
189
 
@@ -200,6 +209,8 @@ Any other static host works the same way: publish `build/` as the web root. The
200
209
 
201
210
  Full notes (including an agent checklist): [`docs/DEPLOY.md`](docs/DEPLOY.md) · product page: [getfilepress.com/deploy](https://getfilepress.com/deploy).
202
211
 
212
+ If the site ships an agent skill, write the install page from [`docs/SKILL_PAGE.md`](docs/SKILL_PAGE.md) · [getfilepress.com/skill-page](https://getfilepress.com/skill-page).
213
+
203
214
  ## Repository layout
204
215
 
205
216
  ```
@@ -215,6 +226,12 @@ scripts/ filepress CLI and create-site scaffold
215
226
  pnpm test # engine unit tests
216
227
  ```
217
228
 
229
+ <!-- xfacts-nutrition-label -->
230
+
231
+ ## Nutrition label
232
+
233
+ - **AppFacts:** [viewer](https://appfacts.dev/v#af1.eNptkkGLGzEMhf-K0dnZoVefygZKt01KYbK9lKUotjLxxmMZWzNhCPnvxZNk9tAebX9Pen7SBUYwnzRE7AkMHHyglKkU0CBTqlc9R86UGDQUQRkKGEArfiTQELylWCq2fdndCHsCc4GAsRuwqy-7KVFrs0-iVTtSENLqG474uFu3rVZfd9sNaMhDFD87-cGOnt6rj0PGns6cT2Dgpv_uBTTsh-gCZTDwywvNzafgYwcG1m0LGo5c5H4OPLhDwEzqJ3ZU4KrBUSpgfl8ggoHPZS78XprTXDtVEWdSZ9qrDwNXfcNv9J17fVGW-8SRovyHHf1CPg8-OCXMQWF0ytGoCuWR8gLLkKPjc1wsxJGyzOkoYbXFfJqfH_wQ_cGTezi5nZTlKNVMymypFB87lXyi4CMtysAWw56yHO_iLUbsSCXOogJhoaIOnNXMVasUOPUUBa5vGspol-z-CVdDHUorKN6q-xCql9G7-tW3OjofXF2ThPaEHf3p5-ZVlmLq6_JRkSXolT2SrYlCXcTihfMEBo4iqZim6bwch_2T5b5Zo2CYiqy-cO5otdmsm4-Vvv4FzW_8rQ) · [raw](https://github.com/Catalyst-Forge-LLC/filepress/blob/main/APP_FACTS.md)
234
+
218
235
  ## License
219
236
 
220
237
  MIT — see [LICENSE](LICENSE).
package/package.json CHANGED
@@ -1,102 +1,110 @@
1
- {
2
- "name": "getfilepress",
3
- "version": "0.1.8",
4
- "private": false,
5
- "type": "module",
6
- "description": "FilePress — file-based Markdown blog engine. Link this package from a content-only site (config + posts), then run `filepress build`.",
7
- "license": "MIT",
8
- "homepage": "https://getfilepress.com",
9
- "repository": {
10
- "type": "git",
11
- "url": "git+https://github.com/Catalyst-Forge-LLC/filepress.git"
12
- },
13
- "bugs": {
14
- "url": "https://github.com/Catalyst-Forge-LLC/filepress/issues"
15
- },
16
- "bin": {
17
- "filepress": "./scripts/filepress.mjs",
18
- "getfilepress": "./scripts/filepress.mjs"
19
- },
20
- "exports": {
21
- ".": {
22
- "types": "./packages/core/src/lib/index.ts",
23
- "svelte": "./packages/core/src/lib/index.ts",
24
- "default": "./packages/core/src/lib/index.ts"
25
- },
26
- "./server": {
27
- "types": "./packages/core/src/lib/server.ts",
28
- "default": "./packages/core/src/lib/server.ts"
29
- },
30
- "./theme": {
31
- "default": "./packages/core/src/lib/theme.ts"
32
- },
33
- "./package.json": "./package.json"
34
- },
35
- "files": [
36
- "scripts/filepress.mjs",
37
- "scripts/copy-path-mounts.mjs",
38
- "scripts/create-site.mjs",
39
- "scripts/ensure-lease.mjs",
40
- "scripts/postinstall.mjs",
41
- "scripts/link-embedded-packages.mjs",
42
- "packages/core",
43
- "packages/app",
44
- "packages/import",
45
- "pnpm-workspace.yaml",
46
- "README.md",
47
- "LICENSE"
48
- ],
49
- "dependencies": {
50
- "@fontsource-variable/inter": "^5.2.8",
51
- "@fontsource-variable/newsreader": "^5.2.10",
52
- "@sveltejs/adapter-static": "^3.0.10",
53
- "@sveltejs/kit": "^2.63.0",
54
- "@sveltejs/vite-plugin-svelte": "^7.1.2",
55
- "@types/turndown": "^5.0.5",
56
- "fast-xml-parser": "^5.2.5",
57
- "gray-matter": "^4.0.3",
58
- "highlight.js": "^11.11.1",
59
- "linkedom": "^0.18.12",
60
- "ollanet": "^0.4.0",
61
- "rehype-autolink-headings": "^7.1.0",
62
- "rehype-highlight": "^7.0.2",
63
- "rehype-raw": "^7.0.0",
64
- "rehype-slug": "^6.0.0",
65
- "rehype-stringify": "^10.0.1",
66
- "remark-gfm": "^4.0.1",
67
- "remark-parse": "^11.0.0",
68
- "remark-rehype": "^11.1.2",
69
- "sirv-cli": "^3.0.1",
70
- "svelte": "^5.56.1",
71
- "svelte-check": "^4.6.0",
72
- "tsx": "^4.20.5",
73
- "turndown": "^7.2.1",
74
- "typescript": "^6.0.3",
75
- "unified": "^11.0.5",
76
- "vite": "^8.0.16"
77
- },
78
- "engines": {
79
- "node": ">=20"
80
- },
81
- "devDependencies": {
82
- "wrangler": "^4.120.1"
83
- },
84
- "scripts": {
85
- "postinstall": "node scripts/postinstall.mjs",
86
- "filepress": "node scripts/filepress.mjs",
87
- "test": "pnpm --filter @filepress/core test && pnpm --filter @filepress/import test && pnpm --filter @filepress/app test && tsx --test scripts/sync-sibling-sites.test.ts",
88
- "check": "pnpm filepress check --site demo",
89
- "build": "pnpm filepress build --site demo",
90
- "build:demo": "pnpm filepress build --site demo",
91
- "build:www": "pnpm filepress build --site getfilepress",
92
- "ship": "pnpm build:www && wrangler pages deploy sites/getfilepress/build --project-name getfilepress",
93
- "deploy:www": "pnpm ship",
94
- "dev": "node scripts/ensure-lease.mjs demo 5179 && pnpm filepress dev --site demo --host 0.0.0.0",
95
- "dev:demo": "node scripts/ensure-lease.mjs demo 5179 && pnpm filepress dev --site demo --host 0.0.0.0",
96
- "dev:www": "node scripts/ensure-lease.mjs getfilepress 5180 && pnpm filepress dev --site getfilepress --host 0.0.0.0",
97
- "create-site": "node scripts/create-site.mjs",
98
- "sync-siblings": "tsx scripts/sync-sibling-sites.ts",
99
- "import": "node scripts/filepress.mjs import",
100
- "pack:smoke": "node scripts/pack-smoke.mjs"
101
- }
102
- }
1
+ {
2
+ "name": "getfilepress",
3
+ "version": "0.1.10",
4
+ "private": false,
5
+ "type": "module",
6
+ "description": "FilePress — file-based Markdown blog engine. Link this package from a content-only site (config + posts), then run `filepress build`.",
7
+ "license": "MIT",
8
+ "homepage": "https://getfilepress.com",
9
+ "repository": {
10
+ "type": "git",
11
+ "url": "git+https://github.com/Catalyst-Forge-LLC/filepress.git"
12
+ },
13
+ "bugs": {
14
+ "url": "https://github.com/Catalyst-Forge-LLC/filepress/issues"
15
+ },
16
+ "bin": {
17
+ "filepress": "./scripts/filepress.mjs",
18
+ "getfilepress": "./scripts/filepress.mjs"
19
+ },
20
+ "exports": {
21
+ ".": {
22
+ "types": "./packages/core/src/lib/index.ts",
23
+ "svelte": "./packages/core/src/lib/index.ts",
24
+ "default": "./packages/core/src/lib/index.ts"
25
+ },
26
+ "./server": {
27
+ "types": "./packages/core/src/lib/server.ts",
28
+ "default": "./packages/core/src/lib/server.ts"
29
+ },
30
+ "./theme": {
31
+ "default": "./packages/core/src/lib/theme.ts"
32
+ },
33
+ "./package.json": "./package.json"
34
+ },
35
+ "files": [
36
+ "scripts/filepress.mjs",
37
+ "scripts/new-post.ts",
38
+ "scripts/preview.mjs",
39
+ "scripts/copy-path-mounts.mjs",
40
+ "scripts/create-site.mjs",
41
+ "scripts/ensure-lease.mjs",
42
+ "scripts/postinstall.mjs",
43
+ "scripts/link-embedded-packages.mjs",
44
+ "packages/core",
45
+ "packages/app",
46
+ "packages/import",
47
+ "pnpm-workspace.yaml",
48
+ "README.md",
49
+ "LICENSE"
50
+ ],
51
+ "scripts": {
52
+ "postinstall": "node scripts/postinstall.mjs",
53
+ "filepress": "node scripts/filepress.mjs",
54
+ "test": "pnpm --filter @filepress/core test && pnpm --filter @filepress/import test && pnpm --filter @filepress/app test && tsx --test scripts/sync-sibling-sites.test.ts scripts/new-post.test.ts scripts/preview.test.ts",
55
+ "check": "pnpm filepress check --site demo",
56
+ "build": "pnpm filepress build --site demo",
57
+ "build:demo": "pnpm filepress build --site demo",
58
+ "build:www": "pnpm filepress build --site getfilepress",
59
+ "ship": "pnpm build:www && wrangler pages deploy sites/getfilepress/build --project-name getfilepress",
60
+ "deploy:www": "pnpm ship",
61
+ "dev": "node scripts/ensure-lease.mjs demo 5179 && pnpm filepress dev --site demo --host 0.0.0.0",
62
+ "serve": "node scripts/ensure-lease.mjs demo 5179 && pnpm filepress dev --site demo --host 0.0.0.0",
63
+ "dev:demo": "node scripts/ensure-lease.mjs demo 5179 && pnpm filepress dev --site demo --host 0.0.0.0",
64
+ "dev:www": "node scripts/ensure-lease.mjs getfilepress 5180 && pnpm filepress dev --site getfilepress --host 0.0.0.0",
65
+ "create-site": "node scripts/create-site.mjs",
66
+ "sync-siblings": "tsx scripts/sync-sibling-sites.ts",
67
+ "siblings": "tsx scripts/siblings/server.ts",
68
+ "import": "node scripts/filepress.mjs import",
69
+ "prepublishOnly": "node scripts/publish-gate.mjs",
70
+ "prepack": "node scripts/prepack.mjs",
71
+ "postpack": "node scripts/postpack.mjs",
72
+ "pack:smoke": "node scripts/pack-smoke.mjs"
73
+ },
74
+ "dependencies": {
75
+ "@fontsource-variable/inter": "^5.2.8",
76
+ "@fontsource-variable/newsreader": "^5.2.10",
77
+ "@sveltejs/adapter-static": "^3.0.10",
78
+ "@sveltejs/kit": "^2.63.0",
79
+ "@sveltejs/vite-plugin-svelte": "^7.1.2",
80
+ "@types/turndown": "^5.0.5",
81
+ "fast-xml-parser": "^5.2.5",
82
+ "gray-matter": "^4.0.3",
83
+ "highlight.js": "^11.11.1",
84
+ "linkedom": "^0.18.12",
85
+ "ollanet": "^0.6.6",
86
+ "rehype-autolink-headings": "^7.1.0",
87
+ "rehype-highlight": "^7.0.2",
88
+ "rehype-raw": "^7.0.0",
89
+ "rehype-slug": "^6.0.0",
90
+ "rehype-stringify": "^10.0.1",
91
+ "remark-gfm": "^4.0.1",
92
+ "remark-parse": "^11.0.0",
93
+ "remark-rehype": "^11.1.2",
94
+ "sirv-cli": "^3.0.1",
95
+ "svelte": "^5.56.1",
96
+ "svelte-check": "^4.6.0",
97
+ "tsx": "^4.20.5",
98
+ "turndown": "^7.2.1",
99
+ "typescript": "^6.0.3",
100
+ "unified": "^11.0.5",
101
+ "vite": "^8.0.16"
102
+ },
103
+ "engines": {
104
+ "node": ">=20"
105
+ },
106
+ "packageManager": "pnpm@10.30.1",
107
+ "devDependencies": {
108
+ "wrangler": "^4.120.1"
109
+ }
110
+ }