getfilepress 0.1.1 → 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 +43 -8
- 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/components/NavIcon.svelte +19 -0
- package/packages/core/src/lib/components/SiteFooter.svelte +16 -2
- package/packages/core/src/lib/components/SiteHeader.svelte +14 -1
- package/packages/core/src/lib/config.ts +47 -2
- 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 +3 -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 +22 -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
|
|
@@ -84,6 +85,15 @@ export default defineFilepressConfig({
|
|
|
84
85
|
author: 'Me',
|
|
85
86
|
postsPerPage: 10,
|
|
86
87
|
topics: [{ label: 'Essays', tag: 'essays' }],
|
|
88
|
+
nav: [
|
|
89
|
+
{ label: 'Posts', href: '/' },
|
|
90
|
+
{ label: 'GitHub', href: 'https://github.com/acme/site', icon: 'github' }
|
|
91
|
+
],
|
|
92
|
+
// Replaces the default RSS + Topics row when set.
|
|
93
|
+
footerLinks: [
|
|
94
|
+
{ label: 'RSS', href: '/rss.xml' },
|
|
95
|
+
{ label: 'GitHub', href: 'https://github.com/acme/site', icon: 'github' }
|
|
96
|
+
],
|
|
87
97
|
newsletter: {
|
|
88
98
|
url: 'https://buttondown.email/me',
|
|
89
99
|
blurb: 'Occasional notes.',
|
|
@@ -94,14 +104,34 @@ export default defineFilepressConfig({
|
|
|
94
104
|
|
|
95
105
|
`title` and `url` are required; missing values fail the build with a clear error.
|
|
96
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`.
|
|
122
|
+
|
|
97
123
|
## Theming
|
|
98
124
|
|
|
99
125
|
The engine ships a default Essay look. To restyle a site, add `theme.css` next to
|
|
100
126
|
`filepress.config.ts`. It loads after the default theme, so you can override CSS
|
|
101
127
|
variables and structural classes without forking the app.
|
|
102
128
|
|
|
103
|
-
In local `pnpm dev`, **Genie Mode**
|
|
104
|
-
|
|
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).
|
|
105
135
|
|
|
106
136
|
```css
|
|
107
137
|
/* theme.css */
|
|
@@ -152,16 +182,21 @@ Body content in **Markdown**.
|
|
|
152
182
|
|
|
153
183
|
## Deploy
|
|
154
184
|
|
|
155
|
-
|
|
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).
|
|
156
188
|
|
|
157
189
|
| Setting | Value |
|
|
158
190
|
| --- | --- |
|
|
159
191
|
| Build command | `pnpm install && pnpm build` |
|
|
160
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.
|
|
161
196
|
|
|
162
|
-
|
|
197
|
+
Any other static host works the same way: publish `build/` as the web root.
|
|
163
198
|
|
|
164
|
-
|
|
199
|
+
Full notes (including an agent checklist): [`docs/DEPLOY.md`](docs/DEPLOY.md) · product page: [getfilepress.com/deploy](https://getfilepress.com/deploy).
|
|
165
200
|
|
|
166
201
|
## Repository layout
|
|
167
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": {
|