getfilepress 0.1.2 → 0.1.4

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 (32) hide show
  1. package/README.md +36 -10
  2. package/package.json +99 -99
  3. package/packages/app/README.md +19 -0
  4. package/packages/app/package.json +1 -1
  5. package/packages/app/src/lib/genie/GeniePanel.svelte +672 -144
  6. package/packages/app/src/lib/genie/config-patch.ts +72 -0
  7. package/packages/app/src/lib/genie/ops.ts +231 -10
  8. package/packages/app/src/lib/genie/store.ts +12 -3
  9. package/packages/app/src/lib/pages.server.ts +4 -2
  10. package/packages/app/src/routes/sitemap.xml/+server.ts +5 -2
  11. package/packages/app/vite-plugin-genie.ts +64 -1
  12. package/packages/app/vite-plugin-path-mounts.ts +107 -0
  13. package/packages/app/vite.config.ts +112 -81
  14. package/packages/core/README.md +29 -0
  15. package/packages/core/package.json +1 -1
  16. package/packages/core/src/lib/config.ts +12 -1
  17. package/packages/core/src/lib/content/feeds.ts +5 -1
  18. package/packages/core/src/lib/content/pages.ts +11 -1
  19. package/packages/core/src/lib/content/parse.ts +12 -3
  20. package/packages/core/src/lib/index.ts +2 -1
  21. package/packages/core/src/lib/paths-shared.ts +89 -0
  22. package/packages/core/src/lib/paths.ts +84 -0
  23. package/packages/core/src/lib/server.ts +8 -1
  24. package/packages/core/src/lib/styles/theme.css +3 -2
  25. package/packages/import/package.json +2 -1
  26. package/packages/import/src/cli.ts +77 -3
  27. package/packages/import/src/ollama.ts +43 -1
  28. package/packages/import/src/ollanet-scan.ts +132 -0
  29. package/packages/import/tsconfig.json +1 -1
  30. package/scripts/copy-path-mounts.mjs +40 -0
  31. package/scripts/create-site.mjs +4 -11
  32. package/scripts/filepress.mjs +31 -3
package/README.md CHANGED
@@ -2,7 +2,7 @@
2
2
 
3
3
  > File-based Markdown blogs. No admin UI. No database. Just git.
4
4
 
5
- A file-based Markdown blog engine. Posts are plain `.md` files with YAML frontmatter edit them in the GitHub mobile app, the web editor, or any text editor. There is no admin UI, no database, and no server at runtime: a static build produces HTML you can host anywhere (e.g. Cloudflare Pages).
5
+ A file-based Markdown blog engine. Posts are plain `.md` files with YAML frontmatter. Edit them in the GitHub mobile app, the web editor, or any text editor. There is no admin UI, no database, and no server at runtime: a static build produces HTML you can host anywhere (for example Cloudflare Pages).
6
6
 
7
7
  | | |
8
8
  | --- | --- |
@@ -34,12 +34,13 @@ The site folder only needs:
34
34
  - `filepress.config.ts` — title, URL, and other site settings
35
35
  - `posts/` — Markdown posts (`/posts/<slug>`)
36
36
  - `pages/` — optional static Markdown pages (`about.md` → `/about`)
37
+ - `paths` mounts — optional site-owned HTML/CSS/JS trees at a URL prefix (e.g. `/docs`)
37
38
  - `static/` — favicon, images, etc.
38
- - `package.json` — depends on this engine (`"getfilepress": "link:../filepress"` locally, `"getfilepress": "^0.1.1"` from npm, or a git URL + tag/SHA)
39
+ - `package.json` — depends on this engine (`"getfilepress": "link:../filepress"` locally, `"getfilepress": "^0.1.3"` from npm, or a git URL + tag/SHA)
39
40
 
40
41
  ### Import an existing site
41
42
 
42
- Crawl a public site (sitemap/RSS preferred), extract posts and pages, scaffold a sibling FilePress site, and optionally ask a local Ollama model for a token theme:
43
+ Crawl a public site (sitemap/RSS preferred), extract posts and pages, scaffold a sibling FilePress site, and optionally ask Ollama (local or a host found with `--scan`) for a token theme:
43
44
 
44
45
  ```bash
45
46
  pnpm install
@@ -69,7 +70,7 @@ pnpm dev # → demo fixture
69
70
  pnpm build # → sites/demo/build/
70
71
  pnpm dev:www # → product site
71
72
  pnpm build:www # → sites/getfilepress/build/
72
- pnpm deploy:www # build + Wrangler Pages deploy (project: getfilepress)
73
+ pnpm ship # build + Wrangler Pages deploy (project: getfilepress)
73
74
  ```
74
75
 
75
76
  ## Site configuration
@@ -101,7 +102,23 @@ export default defineFilepressConfig({
101
102
  });
102
103
  ```
103
104
 
104
- `title` and `url` are required; missing values fail the build with a clear error. Nav/footer items may set `icon: 'github'` for a built-in mark.
105
+ `title` and `url` are required; missing values fail the build with a clear error.
106
+
107
+ **Nav / footer:** `nav` is the header; `footerLinks` replaces the default RSS + Topics footer row when set (include those entries yourself if you still want them). Items may set `icon: 'github'` for a built-in mark (`.nav-github` in themes).
108
+
109
+ ### Path mounts
110
+
111
+ Attach a site-owned HTML/CSS/JS tree at a URL prefix. FilePress copies it into `build/` after the Kit build and serves it in `filepress dev`. It does **not** parse Markdown or inject Essay chrome into the mount. The site owns the shell (for example a docs sidebar).
112
+
113
+ ```ts
114
+ paths: [
115
+ { url: '/docs', dir: 'docs/dist' }
116
+ ]
117
+ ```
118
+
119
+ - `dir` is site-relative; `url` starts with `/` and must not collide with engine routes (`posts`, `writing`, `tags`, …).
120
+ - The first URL segment is reserved against `pages/<slug>.md`.
121
+ - HTML files under the mount are included in `sitemap.xml`.
105
122
 
106
123
  ## Theming
107
124
 
@@ -109,8 +126,12 @@ The engine ships a default Essay look. To restyle a site, add `theme.css` next t
109
126
  `filepress.config.ts`. It loads after the default theme, so you can override CSS
110
127
  variables and structural classes without forking the app.
111
128
 
112
- In local `pnpm dev`, **Genie Mode** lets you steer tokens, stock backgrounds, and
113
- versioned theme activations without leaving the browser (dev-only; not in production builds).
129
+ In local `filepress dev` / `pnpm dev`, **Genie Mode** (floating FAB) is a design cockpit:
130
+ steers, Openverse / uploads, live inspire URLs, optional Ollama refine, and
131
+ `lede` / `tagline` / `logo` config patches. Experiments live under `.filepress-genie/`.
132
+ Activate writes `theme.css`, `static/`, and config. Dev-only; absent from
133
+ `preview` and production builds. See [`docs/GENIE_MODE_SPEC.md`](docs/GENIE_MODE_SPEC.md)
134
+ and [getfilepress.com/genie](https://getfilepress.com/genie).
114
135
 
115
136
  ```css
116
137
  /* theme.css */
@@ -161,16 +182,21 @@ Body content in **Markdown**.
161
182
 
162
183
  ## Deploy
163
184
 
164
- Build output is a static folder. For a site that depends on this engine:
185
+ `filepress build` emits a static `build/` folder. No Node server in production.
186
+
187
+ **Happy path: [Cloudflare Pages](https://pages.cloudflare.com/)** (git-connected site repo or Wrangler upload).
165
188
 
166
189
  | Setting | Value |
167
190
  | --- | --- |
168
191
  | Build command | `pnpm install && pnpm build` |
169
192
  | Output directory | `build` |
193
+ | Node | 20+ |
194
+
195
+ Pin the engine in the site `package.json` (`"getfilepress": "^0.1.3"` or `github:Catalyst-Forge-LLC/filepress#v0.1.3`). Do not use `link:` in CI. Set config `url` to the live origin.
170
196
 
171
- Point the site's dependency at a pinned commit or tag of this repo (not a floating branch) so upgrades are intentional. If this engine repo is private, the host's build needs permission to clone it.
197
+ Any other static host works the same way: publish `build/` as the web root.
172
198
 
173
- More at [getfilepress.com](https://getfilepress.com).
199
+ Full notes (including an agent checklist): [`docs/DEPLOY.md`](docs/DEPLOY.md) · product page: [getfilepress.com/deploy](https://getfilepress.com/deploy).
174
200
 
175
201
  ## Repository layout
176
202
 
package/package.json CHANGED
@@ -1,100 +1,100 @@
1
1
  {
2
- "name": "getfilepress",
3
- "version": "0.1.2",
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/create-site.mjs",
38
- "scripts/postinstall.mjs",
39
- "scripts/link-embedded-packages.mjs",
40
- "packages/core",
41
- "packages/app",
42
- "packages/import",
43
- "pnpm-workspace.yaml",
44
- "README.md",
45
- "LICENSE"
46
- ],
47
- "scripts": {
48
- "postinstall": "node scripts/postinstall.mjs",
49
- "filepress": "node scripts/filepress.mjs",
50
- "test": "pnpm --filter @filepress/core test && pnpm --filter @filepress/import test",
51
- "check": "pnpm filepress check --site demo",
52
- "build": "pnpm filepress build --site demo",
53
- "build:demo": "pnpm filepress build --site demo",
54
- "build:www": "pnpm filepress build --site getfilepress",
55
- "deploy:www": "pnpm build:www && wrangler pages deploy sites/getfilepress/build --project-name getfilepress",
56
- "dev": "pnpm filepress dev --site demo",
57
- "dev:demo": "pnpm filepress dev --site demo",
58
- "dev:www": "pnpm filepress dev --site getfilepress",
59
- "create-site": "node scripts/create-site.mjs",
60
- "import": "node scripts/filepress.mjs import",
61
- "prepack": "node scripts/prepack.mjs",
62
- "postpack": "node scripts/postpack.mjs",
63
- "pack:smoke": "node scripts/pack-smoke.mjs"
64
- },
65
- "dependencies": {
66
- "@fontsource-variable/inter": "^5.2.8",
67
- "@fontsource-variable/newsreader": "^5.2.10",
68
- "@sveltejs/adapter-static": "^3.0.10",
69
- "@sveltejs/kit": "^2.63.0",
70
- "@sveltejs/vite-plugin-svelte": "^7.1.2",
71
- "@types/turndown": "^5.0.5",
72
- "fast-xml-parser": "^5.2.5",
73
- "gray-matter": "^4.0.3",
74
- "highlight.js": "^11.11.1",
75
- "linkedom": "^0.18.12",
76
- "rehype-autolink-headings": "^7.1.0",
77
- "rehype-highlight": "^7.0.2",
78
- "rehype-raw": "^7.0.0",
79
- "rehype-slug": "^6.0.0",
80
- "rehype-stringify": "^10.0.1",
81
- "remark-gfm": "^4.0.1",
82
- "remark-parse": "^11.0.0",
83
- "remark-rehype": "^11.1.2",
84
- "sirv-cli": "^3.0.1",
85
- "svelte": "^5.56.1",
86
- "svelte-check": "^4.6.0",
87
- "tsx": "^4.20.5",
88
- "turndown": "^7.2.1",
89
- "typescript": "^6.0.3",
90
- "unified": "^11.0.5",
91
- "vite": "^8.0.16"
92
- },
93
- "engines": {
94
- "node": ">=20"
95
- },
96
- "packageManager": "pnpm@10.30.1",
97
- "devDependencies": {
98
- "wrangler": "^4.120.1"
99
- }
100
- }
2
+ "name": "getfilepress",
3
+ "version": "0.1.4",
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/postinstall.mjs",
40
+ "scripts/link-embedded-packages.mjs",
41
+ "packages/core",
42
+ "packages/app",
43
+ "packages/import",
44
+ "pnpm-workspace.yaml",
45
+ "README.md",
46
+ "LICENSE"
47
+ ],
48
+ "dependencies": {
49
+ "@fontsource-variable/inter": "^5.2.8",
50
+ "@fontsource-variable/newsreader": "^5.2.10",
51
+ "@sveltejs/adapter-static": "^3.0.10",
52
+ "@sveltejs/kit": "^2.63.0",
53
+ "@sveltejs/vite-plugin-svelte": "^7.1.2",
54
+ "@types/turndown": "^5.0.5",
55
+ "fast-xml-parser": "^5.2.5",
56
+ "gray-matter": "^4.0.3",
57
+ "highlight.js": "^11.11.1",
58
+ "linkedom": "^0.18.12",
59
+ "ollanet": "^0.4.0",
60
+ "rehype-autolink-headings": "^7.1.0",
61
+ "rehype-highlight": "^7.0.2",
62
+ "rehype-raw": "^7.0.0",
63
+ "rehype-slug": "^6.0.0",
64
+ "rehype-stringify": "^10.0.1",
65
+ "remark-gfm": "^4.0.1",
66
+ "remark-parse": "^11.0.0",
67
+ "remark-rehype": "^11.1.2",
68
+ "sirv-cli": "^3.0.1",
69
+ "svelte": "^5.56.1",
70
+ "svelte-check": "^4.6.0",
71
+ "tsx": "^4.20.5",
72
+ "turndown": "^7.2.1",
73
+ "typescript": "^6.0.3",
74
+ "unified": "^11.0.5",
75
+ "vite": "^8.0.16"
76
+ },
77
+ "engines": {
78
+ "node": ">=20"
79
+ },
80
+ "devDependencies": {
81
+ "wrangler": "^4.120.1"
82
+ },
83
+ "scripts": {
84
+ "postinstall": "node scripts/postinstall.mjs",
85
+ "filepress": "node scripts/filepress.mjs",
86
+ "test": "pnpm --filter @filepress/core test && pnpm --filter @filepress/import test && pnpm --filter @filepress/app test",
87
+ "check": "pnpm filepress check --site demo",
88
+ "build": "pnpm filepress build --site demo",
89
+ "build:demo": "pnpm filepress build --site demo",
90
+ "build:www": "pnpm filepress build --site getfilepress",
91
+ "ship": "pnpm build:www && wrangler pages deploy sites/getfilepress/build --project-name getfilepress",
92
+ "deploy:www": "pnpm ship",
93
+ "dev": "pnpm filepress dev --site demo",
94
+ "dev:demo": "pnpm filepress dev --site demo",
95
+ "dev:www": "pnpm filepress dev --site getfilepress",
96
+ "create-site": "node scripts/create-site.mjs",
97
+ "import": "node scripts/filepress.mjs import",
98
+ "pack:smoke": "node scripts/pack-smoke.mjs"
99
+ }
100
+ }
@@ -0,0 +1,19 @@
1
+ # @filepress/app
2
+
3
+ The only SvelteKit application in the filepress monorepo. All routes, layouts, and
4
+ Kit wiring live here. Content sites under [`../../sites`](../../sites) provide:
5
+
6
+ - `filepress.config.ts` — identity
7
+ - `posts/` — Markdown
8
+ - `static/` — favicon, images (optional)
9
+
10
+ ## Run against a site
11
+
12
+ From the repo root (do not run vite directly without `FILEPRESS_SITE_ROOT`):
13
+
14
+ ```bash
15
+ pnpm filepress dev --site demo
16
+ pnpm filepress build --site demo
17
+ ```
18
+
19
+ Build output is written to `sites/<name>/build/`.
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@filepress/app",
3
3
  "private": true,
4
- "version": "0.1.2",
4
+ "version": "0.1.3",
5
5
  "type": "module",
6
6
  "description": "The single SvelteKit app for filepress. Sites under sites/* supply config + posts + static; this package owns all routes.",
7
7
  "scripts": {