getfilepress 0.1.2 → 0.1.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/README.md +35 -9
- package/package.json +6 -3
- package/packages/app/package.json +1 -1
- package/packages/app/src/lib/genie/GeniePanel.svelte +672 -144
- package/packages/app/src/lib/genie/config-patch.ts +72 -0
- package/packages/app/src/lib/genie/ops.ts +231 -10
- package/packages/app/src/lib/genie/store.ts +12 -3
- package/packages/app/src/lib/pages.server.ts +4 -2
- package/packages/app/src/routes/sitemap.xml/+server.ts +5 -2
- package/packages/app/vite-plugin-genie.ts +64 -1
- package/packages/app/vite-plugin-path-mounts.ts +107 -0
- package/packages/app/vite.config.ts +112 -81
- package/packages/core/package.json +1 -1
- package/packages/core/src/lib/config.ts +12 -1
- package/packages/core/src/lib/content/feeds.ts +5 -1
- package/packages/core/src/lib/content/pages.ts +11 -1
- package/packages/core/src/lib/content/parse.ts +12 -3
- package/packages/core/src/lib/index.ts +2 -1
- package/packages/core/src/lib/paths-shared.ts +89 -0
- package/packages/core/src/lib/paths.ts +84 -0
- package/packages/core/src/lib/server.ts +8 -1
- package/packages/core/src/lib/styles/theme.css +3 -2
- package/packages/import/package.json +2 -1
- package/packages/import/src/cli.ts +77 -3
- package/packages/import/src/ollama.ts +43 -1
- package/packages/import/src/ollanet-scan.ts +132 -0
- package/packages/import/tsconfig.json +1 -1
- package/scripts/copy-path-mounts.mjs +40 -0
- package/scripts/create-site.mjs +4 -11
- package/scripts/filepress.mjs +31 -3
package/README.md
CHANGED
|
@@ -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.
|
|
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
|
|
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
|
|
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.
|
|
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 (e.g. 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**
|
|
113
|
-
|
|
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 — versioned under `.filepress-genie/`,
|
|
132
|
+
baked into `theme.css` / `static/` / config on activate. 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
|
-
|
|
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.1"` or `github:Catalyst-Forge-LLC/filepress#v0.1.1`). Do not use `link:` in CI. Set config `url` to the live origin.
|
|
170
196
|
|
|
171
|
-
|
|
197
|
+
Any other static host works the same way: publish `build/` as the web root.
|
|
172
198
|
|
|
173
|
-
|
|
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,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "getfilepress",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.3",
|
|
4
4
|
"private": false,
|
|
5
5
|
"type": "module",
|
|
6
6
|
"description": "FilePress — file-based Markdown blog engine. Link this package from a content-only site (config + posts), then run `filepress build`.",
|
|
@@ -34,6 +34,7 @@
|
|
|
34
34
|
},
|
|
35
35
|
"files": [
|
|
36
36
|
"scripts/filepress.mjs",
|
|
37
|
+
"scripts/copy-path-mounts.mjs",
|
|
37
38
|
"scripts/create-site.mjs",
|
|
38
39
|
"scripts/postinstall.mjs",
|
|
39
40
|
"scripts/link-embedded-packages.mjs",
|
|
@@ -47,12 +48,13 @@
|
|
|
47
48
|
"scripts": {
|
|
48
49
|
"postinstall": "node scripts/postinstall.mjs",
|
|
49
50
|
"filepress": "node scripts/filepress.mjs",
|
|
50
|
-
"test": "pnpm --filter @filepress/core test && pnpm --filter @filepress/import test",
|
|
51
|
+
"test": "pnpm --filter @filepress/core test && pnpm --filter @filepress/import test && pnpm --filter @filepress/app test",
|
|
51
52
|
"check": "pnpm filepress check --site demo",
|
|
52
53
|
"build": "pnpm filepress build --site demo",
|
|
53
54
|
"build:demo": "pnpm filepress build --site demo",
|
|
54
55
|
"build:www": "pnpm filepress build --site getfilepress",
|
|
55
|
-
"
|
|
56
|
+
"ship": "pnpm build:www && wrangler pages deploy sites/getfilepress/build --project-name getfilepress",
|
|
57
|
+
"deploy:www": "pnpm ship",
|
|
56
58
|
"dev": "pnpm filepress dev --site demo",
|
|
57
59
|
"dev:demo": "pnpm filepress dev --site demo",
|
|
58
60
|
"dev:www": "pnpm filepress dev --site getfilepress",
|
|
@@ -73,6 +75,7 @@
|
|
|
73
75
|
"gray-matter": "^4.0.3",
|
|
74
76
|
"highlight.js": "^11.11.1",
|
|
75
77
|
"linkedom": "^0.18.12",
|
|
78
|
+
"ollanet": "^0.4.0",
|
|
76
79
|
"rehype-autolink-headings": "^7.1.0",
|
|
77
80
|
"rehype-highlight": "^7.0.2",
|
|
78
81
|
"rehype-raw": "^7.0.0",
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@filepress/app",
|
|
3
3
|
"private": true,
|
|
4
|
-
"version": "0.1.
|
|
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": {
|