seemore 1.12.1 → 1.12.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 +57 -55
- package/package.json +1 -1
- package/src/app/lib/tree.ts +32 -2
package/README.md
CHANGED
|
@@ -33,9 +33,11 @@
|
|
|
33
33
|
</p>
|
|
34
34
|
</p>
|
|
35
35
|
|
|
36
|
-
AI tools write Markdown
|
|
36
|
+
AI tools write Markdown fast. They write specs, notes, guides, READMEs, and whole folders of files. No person can read that much Markdown at that speed.
|
|
37
37
|
|
|
38
|
-
|
|
38
|
+
A folder of `.md` files has no order. You cannot click a link between files. You cannot search across them.
|
|
39
|
+
|
|
40
|
+
**seemore** points at that folder and renders it as a real site. It does not move your files. It does not need any code.
|
|
39
41
|
|
|
40
42
|
<p align="center">
|
|
41
43
|
<img src="https://raw.githubusercontent.com/arifszn/seemore/main/packages/site/assets/home.png" alt="The seemore site: a terminal typing npx seemore to serve a folder of notes at localhost:4040, with an arrow pointing to the browser preview" width="640"/>
|
|
@@ -43,24 +45,24 @@ AI tools write Markdown faster than anyone can read it: specs, notes, guides, RE
|
|
|
43
45
|
|
|
44
46
|
## Quick start
|
|
45
47
|
|
|
46
|
-
|
|
48
|
+
seemore needs [Node.js](https://nodejs.org) 20 or newer. You do not install anything. You do not write a config file. You do not move any files.
|
|
47
49
|
|
|
48
50
|
```bash
|
|
49
51
|
cd my-docs
|
|
50
52
|
npx seemore # renders this folder at http://localhost:4040
|
|
51
53
|
```
|
|
52
54
|
|
|
53
|
-
`npx seemore` runs seemore without adding it to your
|
|
55
|
+
`npx seemore` runs seemore without adding it to your project's dependencies.
|
|
54
56
|
|
|
55
|
-
Open the address it prints.
|
|
57
|
+
Open the address it prints. The site stays live after that. Add, rename, retitle, or delete a file, and the site updates at once. Navigation and search update too.
|
|
56
58
|
|
|
57
|
-
The [seemore website](https://arifszn.github.io/seemore) is
|
|
59
|
+
The [seemore website](https://arifszn.github.io/seemore) is a folder of Markdown, rendered by seemore. Your own folder will look the same way.
|
|
58
60
|
|
|
59
61
|
<details open>
|
|
60
62
|
<summary><strong>Or ask an AI agent to set it up</strong></summary>
|
|
61
63
|
<br/>
|
|
62
64
|
|
|
63
|
-
|
|
65
|
+
If you do not want to use a terminal, use the [agent skill](https://github.com/arifszn/seemore-skill) instead. It does the setup for you.
|
|
64
66
|
|
|
65
67
|
### Claude Code (Plugin Marketplace)
|
|
66
68
|
|
|
@@ -74,9 +76,9 @@ Not comfortable in a terminal? There's an [agent skill](https://github.com/arifs
|
|
|
74
76
|
|
|
75
77
|
### Other agents (Codex, OpenCode, Antigravity, Gemini, Cursor, …)
|
|
76
78
|
|
|
77
|
-
This
|
|
79
|
+
This skill works in any agent that supports the `SKILL.md` format. See **[INSTALL.md](https://github.com/arifszn/seemore-skill/blob/main/INSTALL.md)** for the skill path and commands for each agent.
|
|
78
80
|
|
|
79
|
-
Or
|
|
81
|
+
Or paste this to your agent:
|
|
80
82
|
|
|
81
83
|
```
|
|
82
84
|
Fetch and follow the install instructions from
|
|
@@ -85,13 +87,13 @@ https://raw.githubusercontent.com/arifszn/seemore-skill/refs/heads/main/INSTALL.
|
|
|
85
87
|
|
|
86
88
|
### Usage
|
|
87
89
|
|
|
88
|
-
|
|
90
|
+
After you install the skill, tell your agent what you want:
|
|
89
91
|
|
|
90
92
|
```
|
|
91
93
|
Turn this folder of notes into a docs site I can read in my browser
|
|
92
94
|
```
|
|
93
95
|
|
|
94
|
-
Or
|
|
96
|
+
Or call the skill by name:
|
|
95
97
|
|
|
96
98
|
```
|
|
97
99
|
/seemore
|
|
@@ -101,49 +103,49 @@ Or invoke the skill by name:
|
|
|
101
103
|
|
|
102
104
|
## Three ways to use it
|
|
103
105
|
|
|
104
|
-
- **[In your browser](#edit-from-the-browser)**: `npx seemore` serves the folder you
|
|
105
|
-
- **[In your code editor](#view-in-your-code-editor)**: an extension
|
|
106
|
-
- **[As a static site](#publish-it-to-the-web)**: `npx seemore build` exports plain HTML you can host anywhere
|
|
106
|
+
- **[In your browser](#edit-from-the-browser)**: `npx seemore` serves the folder you are in. The site updates live as you edit.
|
|
107
|
+
- **[In your code editor](#view-in-your-code-editor)**: an extension shows the same site in a panel next to your file, in VS Code and VS Code-compatible editors like Cursor and Antigravity.
|
|
108
|
+
- **[As a static site](#publish-it-to-the-web)**: `npx seemore build` exports plain HTML you can host anywhere. seemore is a docs framework, not only a preview tool.
|
|
107
109
|
|
|
108
110
|
<p align="center">
|
|
109
|
-
<video src="https://github.com/user-attachments/assets/
|
|
111
|
+
<video src="https://github.com/user-attachments/assets/4238308d-8152-4386-9095-0f135447475f" width="640" controls muted></video>
|
|
110
112
|
</p>
|
|
111
113
|
|
|
112
114
|
## What you get
|
|
113
115
|
|
|
114
|
-
Point seemore at
|
|
116
|
+
Point seemore at any Markdown you already have: AI-written notes, project docs, RFCs, API references, specs, or an engineering handbook. You get:
|
|
115
117
|
|
|
116
|
-
- **Zero config**: no config file, no code, no files to move
|
|
117
|
-
- **Live preview**: files appear, disappear and reorder as you edit them
|
|
118
|
+
- **Zero config**: no config file, no code, no files to move. A plain folder works in the browser, in your editor, and as a static build
|
|
119
|
+
- **Live preview**: files appear, disappear and reorder as you edit them. Navigation and search update too
|
|
118
120
|
- **Edit in place**: double-click any block in the preview to fix its Markdown
|
|
119
|
-
- **Editor integration**: one extension covers VS Code, Cursor, Antigravity and other VS Code-compatible editors, remote workspaces
|
|
120
|
-
- **Documentation framework**: `seemore build`
|
|
121
|
+
- **Editor integration**: one extension covers VS Code, Cursor, Antigravity and other VS Code-compatible editors, including remote workspaces
|
|
122
|
+
- **Documentation framework**: `seemore build` renders the whole site to HTML, ready to deploy on any host
|
|
121
123
|
- **Password protection**: protect the built site with one shared password, with no server required
|
|
122
124
|
- **Page actions**: copy a page as Markdown, or export it as one self-contained HTML file to drop into Slack, email or an AI chat
|
|
123
|
-
- **Search built in**: static full-text search with no server and no account, with shareable highlighted results
|
|
125
|
+
- **Search built in**: static full-text search with no server and no account, with shareable highlighted results. [Algolia](https://algolia.com) and [Orama Cloud](https://orama.com) drop in when you want a hosted index
|
|
124
126
|
- **Rich Markdown**: GitHub Flavoured Markdown, admonitions, steps, `[[wikilinks]]`, [Mermaid](https://mermaid.js.org) and [D2](https://d2lang.com) diagrams, click-to-zoom images, embedded PDFs
|
|
125
127
|
- **Full MDX**: `.mdx` pages take real JSX, your own React components and CSS
|
|
126
|
-
- **12 themes**: dark and light follow the system, with a toggle that remembers your choice
|
|
128
|
+
- **12 themes**: dark and light follow the system, with a toggle that remembers your choice. Your own CSS always wins
|
|
127
129
|
|
|
128
|
-
### How
|
|
130
|
+
### How seemore is different
|
|
129
131
|
|
|
130
|
-
- **Starts where your files already are**: most docs frameworks
|
|
131
|
-
- **Preview first, site generator second**: the same content serves locally, renders beside your editor, and builds to static HTML
|
|
132
|
-
- **Nothing to migrate, nothing to undo**: your files
|
|
132
|
+
- **Starts where your files already are**: most docs frameworks need a project, with a scaffold, a config file, a `docs/` layout and a build step wired into your repo. seemore needs only a folder that already exists.
|
|
133
|
+
- **Preview first, site generator second**: the same content serves locally, renders beside your editor, and builds to static HTML. No separate setup is needed for each one.
|
|
134
|
+
- **Nothing to migrate, nothing to undo**: seemore never moves or rewrites your files. You can stop using it at any time, at no cost.
|
|
133
135
|
|
|
134
136
|
## Edit from the browser
|
|
135
137
|
|
|
136
|
-
The preview is also an editor. Double-click any paragraph, heading, list item, quote or table cell
|
|
138
|
+
The preview is also an editor. Double-click any paragraph, heading, list item, quote or table cell. A small editor opens with that block's **Markdown source**: `**bold**` stays `**bold**`, links stay links, tables stay tables. Fix the text, press **Save**, and seemore writes the change to the file on disk.
|
|
137
139
|
|
|
138
140
|
<p align="center">
|
|
139
141
|
<img src="https://raw.githubusercontent.com/arifszn/seemore/main/packages/site/assets/inline-editor.png" alt="seemore rendering a folder of Markdown in the browser, with a paragraph's Markdown source open in the inline editor" width="640"/>
|
|
140
142
|
</p>
|
|
141
143
|
|
|
142
|
-
Inline editing
|
|
144
|
+
Inline editing works only for local previews.
|
|
143
145
|
|
|
144
146
|
## View in your code editor
|
|
145
147
|
|
|
146
|
-
Install **seemore** from the [VS Code Marketplace](https://marketplace.visualstudio.com/items?itemName=arifszn.seemore-vscode) or [Open VSX](https://open-vsx.org/extension/arifszn/seemore-vscode)
|
|
148
|
+
Install **seemore** from the [VS Code Marketplace](https://marketplace.visualstudio.com/items?itemName=arifszn.seemore-vscode) or [Open VSX](https://open-vsx.org/extension/arifszn/seemore-vscode). You get the same rendered site as a panel beside your editor, with no terminal, no `npx` and no browser tab to manage. The extension bundles the CLI, so nothing downloads and nothing goes on your PATH. Open VSX also covers VS Code-compatible editors such as Cursor and Antigravity.
|
|
147
149
|
|
|
148
150
|
<p align="center">
|
|
149
151
|
<img src="https://raw.githubusercontent.com/arifszn/seemore/main/packages/site/assets/vscode-extension.png" alt="VS Code with features.md open in the editor and the seemore panel beside it, rendering the same page with a paragraph's Markdown source open in the inline editor" width="640"/>
|
|
@@ -159,10 +161,10 @@ Install **seemore** from the [VS Code Marketplace](https://marketplace.visualstu
|
|
|
159
161
|
npx seemore build # static export to dist/ for any host
|
|
160
162
|
```
|
|
161
163
|
|
|
162
|
-
The result is a `dist/` folder of plain web files
|
|
164
|
+
The result is a `dist/` folder of plain web files. Drop it on [Netlify](https://netlify.com), [Surge](https://surge.sh), [Cloudflare Pages](https://pages.cloudflare.com) or [GitHub Pages](https://pages.github.com), or hand it to any web host. Every page is a separate `index.html`, next to a `404.html` that every static host reads. seemore also writes the files each host needs (`_redirects`, `200.html`, `.nojekyll`).
|
|
163
165
|
|
|
164
166
|
> [!TIP]
|
|
165
|
-
>
|
|
167
|
+
> Do you publish to GitHub Pages at `username.github.io/my-repo/`, not at the root? Set the subpath once with `base: '/my-repo/'`.
|
|
166
168
|
|
|
167
169
|
### Password-protect a site
|
|
168
170
|
|
|
@@ -182,27 +184,27 @@ $env:SEEMORE_PASSWORD='a-long-passphrase'; npx seemore build
|
|
|
182
184
|
<img src="https://raw.githubusercontent.com/arifszn/seemore/main/packages/site/assets/password-protection.png" alt="The lock screen of a password-protected seemore site: the site's icon and title above a password field and an Unlock button" width="560"/>
|
|
183
185
|
</p>
|
|
184
186
|
|
|
185
|
-
By default,
|
|
187
|
+
By default, a visitor stays unlocked for one day after their last visit. Change this with `remember`:
|
|
186
188
|
|
|
187
189
|
```ts
|
|
188
190
|
auth: { remember: '7d' } // or '12h'
|
|
189
191
|
```
|
|
190
192
|
|
|
191
|
-
Password protection works only for `seemore build`. To
|
|
193
|
+
Password protection works only for `seemore build`. To test the lock screen, build the site and serve `dist/` on `localhost`.
|
|
192
194
|
|
|
193
195
|
### Share a single page to Slack, email
|
|
194
196
|
|
|
195
|
-
To share
|
|
197
|
+
To share one page instead of a site, use the **Actions** button above the page. It writes one self-contained HTML file (styles inlined, images embedded, diagrams kept) that opens offline from a double-click. The CLI does the same without a browser:
|
|
196
198
|
|
|
197
199
|
```bash
|
|
198
200
|
npx seemore export docs/spec.md # writes spec.html next to the Markdown
|
|
199
201
|
```
|
|
200
202
|
|
|
201
|
-
|
|
203
|
+
Read more about all three methods on the [publishing](https://arifszn.github.io/seemore/publishing) page.
|
|
202
204
|
|
|
203
205
|
## Configuration
|
|
204
206
|
|
|
205
|
-
Configuration is optional
|
|
207
|
+
Configuration is optional. A folder with no config file builds correctly everywhere. To change settings, create `seemore.config.ts` next to your content:
|
|
206
208
|
|
|
207
209
|
```ts
|
|
208
210
|
// seemore.config.ts
|
|
@@ -225,7 +227,7 @@ export default {
|
|
|
225
227
|
};
|
|
226
228
|
```
|
|
227
229
|
|
|
228
|
-
`features` is a set of switches. Name the
|
|
230
|
+
`features` is a set of switches. Name only the flags you want to change. Every other flag keeps its default value.
|
|
229
231
|
|
|
230
232
|
| Flag | Default | Effect |
|
|
231
233
|
| --- | --- | --- |
|
|
@@ -246,37 +248,37 @@ export default {
|
|
|
246
248
|
| `search.highlight` | on | Highlight the query on the page you land on |
|
|
247
249
|
| `social.cards` | off | Per-page OG images (needs `takumi-js`) |
|
|
248
250
|
|
|
249
|
-
|
|
251
|
+
The [configuration](https://arifszn.github.io/seemore/configuration) and [features](https://arifszn.github.io/seemore/features) pages document every key above.
|
|
250
252
|
|
|
251
253
|
### Themes
|
|
252
254
|
|
|
253
|
-
|
|
255
|
+
seemore has twelve built-in colour presets: `neutral` (default), `black`, `catppuccin`, `dusk`, `ocean`, `purple`, `ruby`, `solar`, `aspen`, `emerald`, `vitepress`, `shadcn`. Dark and light modes follow your system setting, with a toggle that remembers your choice. For anything else, put your own CSS in `css`. seemore appends it last, so it wins.
|
|
254
256
|
|
|
255
257
|
| `neutral` (default) | `black` |
|
|
256
258
|
| :--- | :--- |
|
|
257
259
|
| <img src="https://raw.githubusercontent.com/arifszn/seemore/main/packages/site/assets/themes/neutral.png" alt="neutral theme" width="100%"> | <img src="https://raw.githubusercontent.com/arifszn/seemore/main/packages/site/assets/themes/black.png" alt="black theme" width="100%"> |
|
|
258
260
|
|
|
259
|
-
|
|
261
|
+
The [themes page](https://arifszn.github.io/seemore/themes) shows all twelve.
|
|
260
262
|
|
|
261
263
|
## Content
|
|
262
264
|
|
|
263
265
|
Works with both `.md` and `.mdx`.
|
|
264
266
|
|
|
265
|
-
- GitHub Flavoured Markdown, admonitions (note
|
|
266
|
-
- `[[wikilinks]]`, including `[[Page|label]]` and `[[Page#Heading]]
|
|
267
|
-
- **[Mermaid](https://mermaid.js.org)** and **[D2](https://d2lang.com)** diagrams, rendered live in the browser
|
|
268
|
-
- Sibling images inlined as hashed assets with click-to-zoom, and PDFs opened inline in the browser's own viewer
|
|
269
|
-
- Page order comes from a `meta.json
|
|
267
|
+
- GitHub Flavoured Markdown, admonitions (note, tip and warning boxes), step-by-step lists, and colour-highlighted code blocks with optional filenames and line numbers
|
|
268
|
+
- `[[wikilinks]]`, including `[[Page|label]]` and `[[Page#Heading]]`. Use these to link pages without getting relative paths right. Plain relative `.md` links also resolve automatically
|
|
269
|
+
- **[Mermaid](https://mermaid.js.org)** and **[D2](https://d2lang.com)** diagrams, rendered live in the browser from a ` ```mermaid ` or ` ```d2 ` code fence
|
|
270
|
+
- Sibling images, inlined as hashed assets with click-to-zoom, and PDFs, opened inline in the browser's own viewer
|
|
271
|
+
- Page order comes from a `meta.json` file, a frontmatter `order` field, or the title, checked in that order
|
|
270
272
|
|
|
271
273
|
<p align="center">
|
|
272
274
|
<img src="https://raw.githubusercontent.com/arifszn/seemore/main/packages/site/assets/diagrams.png" alt="A mermaid flowchart reading Markdown, seemore, Static site rendered live on the Diagrams page, with a D2 diagram of the same chain below it" width="640"/>
|
|
273
275
|
</p>
|
|
274
276
|
|
|
275
|
-
|
|
277
|
+
The [content page](https://arifszn.github.io/seemore/content) renders every syntax above, live.
|
|
276
278
|
|
|
277
279
|
### PDF viewer
|
|
278
280
|
|
|
279
|
-
Reference a PDF with image syntax
|
|
281
|
+
Reference a PDF with image syntax. Use a sibling file or a remote URL. The PDF opens inline, with a download link underneath:
|
|
280
282
|
|
|
281
283
|
```md
|
|
282
284
|

|
|
@@ -294,31 +296,31 @@ seemore build [dir] build a static site into dist/
|
|
|
294
296
|
seemore export <file> export a page as a standalone HTML file
|
|
295
297
|
```
|
|
296
298
|
|
|
297
|
-
Run `seemore --help`
|
|
299
|
+
Run `seemore --help` to see the options, or see the [CLI reference](https://arifszn.github.io/seemore/cli-reference) page.
|
|
298
300
|
|
|
299
301
|
## FAQ
|
|
300
302
|
|
|
301
|
-
**Do I have to install anything?** No
|
|
303
|
+
**Do I have to install anything?** No. Just run `npx seemore`.
|
|
302
304
|
|
|
303
305
|
**Does anything leave my machine?** No. The dev server, the build and the export all run locally, with no account and no telemetry. The only network calls are ones you configure yourself, such as a hosted search provider.
|
|
304
306
|
|
|
305
|
-
**
|
|
307
|
+
**Does seemore move or rewrite my files?** No. seemore reads your folder in place. It writes to a file only when you save an inline edit, or run `build` or `export`.
|
|
306
308
|
|
|
307
|
-
**Is the password protection real?** Yes.
|
|
309
|
+
**Is the password protection real?** Yes. seemore encrypts the site content, so nobody can read a copy of the build without the password. There is no per-person access and no way to revoke one password alone. A short password can be guessed offline, so use a long one.
|
|
308
310
|
|
|
309
|
-
**Is
|
|
311
|
+
**Is seemore a preview tool or a docs framework?** Both, from the same folder: `seemore` previews it, the extension renders it beside your editor, and `seemore build` publishes it.
|
|
310
312
|
|
|
311
313
|
## Under the hood
|
|
312
314
|
|
|
313
|
-
[fumadocs](https://fumadocs.vercel.app) provides the interface presets
|
|
315
|
+
[fumadocs](https://fumadocs.vercel.app) provides the interface presets. [Shiki](https://shiki.style), [Mermaid](https://mermaid.js.org), [D2](https://d2lang.com), [Vite](https://vite.dev) and [React Router](https://reactrouter.com) run underneath it. The code editor extension runs the same CLI as a child process it manages.
|
|
314
316
|
|
|
315
317
|
## Contributing
|
|
316
318
|
|
|
317
|
-
|
|
319
|
+
seemore welcomes bug reports and pull requests. [CONTRIBUTING.md](https://github.com/arifszn/seemore/blob/main/CONTRIBUTING.md) covers how to get the repo running, the checks a pull request must pass, and how releases work.
|
|
318
320
|
|
|
319
321
|
## Star it
|
|
320
322
|
|
|
321
|
-
If seemore saved you
|
|
323
|
+
If seemore saved you time, [give it a star](https://github.com/arifszn/seemore). A star helps other people find it.
|
|
322
324
|
|
|
323
325
|
## Licence
|
|
324
326
|
|
package/package.json
CHANGED
package/src/app/lib/tree.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { useSyncExternalStore } from 'react';
|
|
2
|
-
import { deserializePageTree } from 'fumadocs-core/source/client';
|
|
2
|
+
import { deserializePageTree, type SerializedPageTree } from 'fumadocs-core/source/client';
|
|
3
3
|
import type * as PageTree from 'fumadocs-core/page-tree';
|
|
4
4
|
import { getTree, subscribeTree } from 'virtual:seemore/tree';
|
|
5
5
|
|
|
@@ -12,7 +12,37 @@ import { getTree, subscribeTree } from 'virtual:seemore/tree';
|
|
|
12
12
|
*/
|
|
13
13
|
export function usePageTree(): PageTree.Root {
|
|
14
14
|
const serialized = useSyncExternalStore(subscribeTree, getTree, getTree);
|
|
15
|
-
return
|
|
15
|
+
return resolveTree(serialized);
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
let current: { serialized: SerializedPageTree; content: string; tree: PageTree.Root } | undefined;
|
|
19
|
+
let revision = 0;
|
|
20
|
+
|
|
21
|
+
/**
|
|
22
|
+
* The deserialized tree for a payload, with a root `$id` that moves whenever the tree does.
|
|
23
|
+
*
|
|
24
|
+
* fumadocs' `TreeContextProvider` memoises its tree on `root.$id`, and the loader always calls
|
|
25
|
+
* the root "root" — so without a fresh id a created, renamed or retitled page reaches the
|
|
26
|
+
* store and never the sidebar. The id only moves when the content differs: the store is
|
|
27
|
+
* replaced on body edits too, and the sidebar list is keyed on that id, so bumping it for
|
|
28
|
+
* nothing would remount the list and close every folder the reader opened, on every save.
|
|
29
|
+
* The first tree keeps its id, so prerendered HTML and hydration agree. Exported for the
|
|
30
|
+
* tree store test.
|
|
31
|
+
*/
|
|
32
|
+
export function resolveTree(serialized: SerializedPageTree): PageTree.Root {
|
|
33
|
+
if (current?.serialized === serialized) return current.tree;
|
|
34
|
+
|
|
35
|
+
// Measured before deserialising: fumadocs rewrites names and icons into elements in place.
|
|
36
|
+
const content = JSON.stringify(serialized);
|
|
37
|
+
if (current?.content === content) {
|
|
38
|
+
current = { ...current, serialized };
|
|
39
|
+
return current.tree;
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
const tree = deserializePageTree(serialized);
|
|
43
|
+
if (current !== undefined) tree.$id = `${tree.$id ?? 'root'}:${++revision}`;
|
|
44
|
+
current = { serialized, content, tree };
|
|
45
|
+
return tree;
|
|
16
46
|
}
|
|
17
47
|
|
|
18
48
|
/**
|