seemore 1.0.0
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/LICENSE +21 -0
- package/README.md +213 -0
- package/dist/cli/index.js +1635 -0
- package/dist/cli/index.js.map +1 -0
- package/dist/index.d.ts +150 -0
- package/dist/index.js +8 -0
- package/dist/index.js.map +1 -0
- package/package.json +98 -0
- package/src/app/entry.client.tsx +30 -0
- package/src/app/entry.prerender.tsx +67 -0
- package/src/app/features/anchors.ts +23 -0
- package/src/app/features/highlight.ts +77 -0
- package/src/app/features/prefetch.ts +55 -0
- package/src/app/features/preview.tsx +73 -0
- package/src/app/index.html +12 -0
- package/src/app/layout/Breadcrumb.tsx +29 -0
- package/src/app/layout/DocsLayout.tsx +103 -0
- package/src/app/layout/Footer.tsx +72 -0
- package/src/app/layout/Header.tsx +59 -0
- package/src/app/layout/Provider.tsx +60 -0
- package/src/app/layout/Sidebar.tsx +90 -0
- package/src/app/layout/Toc.tsx +59 -0
- package/src/app/lib/features.ts +7 -0
- package/src/app/lib/pages.ts +81 -0
- package/src/app/lib/tree.ts +41 -0
- package/src/app/mdx/Mermaid.tsx +57 -0
- package/src/app/mdx/Pdf.tsx +25 -0
- package/src/app/mdx/components.tsx +57 -0
- package/src/app/router.tsx +43 -0
- package/src/app/search/SearchDialog.tsx +103 -0
- package/src/app/search/client.ts +143 -0
- package/src/app/search/worker.ts +42 -0
- package/src/app/styles/globals.css +224 -0
- package/src/app/virtual.d.ts +17 -0
- package/src/shared/base.ts +67 -0
- package/src/shared/og.ts +12 -0
- package/src/shared/types.ts +77 -0
package/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 Ariful Alam
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
package/README.md
ADDED
|
@@ -0,0 +1,213 @@
|
|
|
1
|
+
# seemore
|
|
2
|
+
|
|
3
|
+
Let AI write the Markdown. Let seemore show it better.
|
|
4
|
+
|
|
5
|
+
[](https://www.npmjs.com/package/seemore)
|
|
6
|
+
[](https://github.com/arifszn/seemore/actions/workflows/ci.yml)
|
|
7
|
+
[](LICENSE)
|
|
8
|
+
|
|
9
|
+
AI tools write Markdown — specs, notes, guides, READMEs, whole folders of it, faster than
|
|
10
|
+
anyone can read. A pile of `.md` files is write-only memory: nothing to click, nothing to
|
|
11
|
+
search, no order.
|
|
12
|
+
|
|
13
|
+
seemore is the other half. Point it at a folder that already exists and read it in your
|
|
14
|
+
browser instead — every file rendered, with navigation, search and a clean reading
|
|
15
|
+
layout. You don't move the files, you don't write any code, and there is nothing to set
|
|
16
|
+
up.
|
|
17
|
+
|
|
18
|
+
```bash
|
|
19
|
+
npx seemore # see the current folder in your browser, live, no setup
|
|
20
|
+
npx seemore build # static export to dist/ for any host
|
|
21
|
+
```
|
|
22
|
+
|
|
23
|
+
## Getting started
|
|
24
|
+
|
|
25
|
+
1. Open a terminal in your folder of Markdown files.
|
|
26
|
+
2. Run `npx seemore`, then open the address it prints —
|
|
27
|
+
`http://localhost:4040` by default — in your browser.
|
|
28
|
+
|
|
29
|
+
From there it's live: every file you add, rename, retitle or delete is reflected
|
|
30
|
+
immediately, navigation included. When you're happy, `npx seemore build`
|
|
31
|
+
produces a folder
|
|
32
|
+
of ordinary web files you can put on any host (more on that under
|
|
33
|
+
[Publishing](#publishing)).
|
|
34
|
+
|
|
35
|
+
With no folder given, seemore looks for `docs/`, then `content/`, then uses the folder you
|
|
36
|
+
are standing in.
|
|
37
|
+
|
|
38
|
+
## What you get by default
|
|
39
|
+
|
|
40
|
+
- **Real pages in your browser, not a placeholder.** Every page arrives with its full
|
|
41
|
+
text already in it — nothing waits on JavaScript, and what you see is what a search
|
|
42
|
+
engine sees. A test asserts it.
|
|
43
|
+
- **Fast, app-like browsing.** Pages start loading when you point at a link, and page
|
|
44
|
+
changes animate smoothly — without giving up the plain-files output above.
|
|
45
|
+
- **A preview that keeps up.** Add, rename, retitle, reorder or delete a file and the
|
|
46
|
+
site updates instantly — no restart, no full page reload.
|
|
47
|
+
- **Search built in.** The whole site is searchable out of the box, with no server to run
|
|
48
|
+
and nothing to pay for. If your site grows past what a no-server search can carry, the
|
|
49
|
+
build says so and points at the alternatives.
|
|
50
|
+
- **Sub-folder sites that work.** If your site lives at `example.com/my-repo/` instead of
|
|
51
|
+
the root, set `base` once and links, search and assets all follow. A test builds the
|
|
52
|
+
site under a sub-folder and asserts nothing leaks.
|
|
53
|
+
- **Publish anywhere.** The build is a folder of ordinary files — no special server
|
|
54
|
+
setup. The few conventions individual hosts look for are written for you.
|
|
55
|
+
|
|
56
|
+
## Content
|
|
57
|
+
|
|
58
|
+
`.md` and `.mdx` alike, with the format inferred per file, so plain Markdown never needs
|
|
59
|
+
MDX syntax.
|
|
60
|
+
|
|
61
|
+
- GitHub Flavoured Markdown, admonitions (note / tip / warning boxes), step-by-step
|
|
62
|
+
lists, and colour-highlighted code blocks
|
|
63
|
+
- `[[wikilinks]]`, including `[[Page|label]]` and `[[Page#Heading]]` — the easiest way
|
|
64
|
+
for you or your AI to link pages, with no relative paths to get right
|
|
65
|
+
- Relative `.md` links are resolved to working links automatically
|
|
66
|
+
- Mermaid diagrams, rendered in the browser
|
|
67
|
+
- Sibling images inlined as hashed assets, sibling PDFs open in the browser's own viewer
|
|
68
|
+
- Frontmatter (the `key: value` block at the top of a file) is validated, with errors
|
|
69
|
+
that name the file and the field
|
|
70
|
+
|
|
71
|
+
### Page addresses
|
|
72
|
+
|
|
73
|
+
| File | Address |
|
|
74
|
+
| --- | --- |
|
|
75
|
+
| `index.md` | `/` |
|
|
76
|
+
| `README.md` (root) | `/` |
|
|
77
|
+
| `getting-started.md` | `/getting-started` |
|
|
78
|
+
| `guide/index.md` | `/guide` |
|
|
79
|
+
| `guide/Deep Dive.md` | `/guide/deep-dive` |
|
|
80
|
+
|
|
81
|
+
Both `/guide` and `/guide/` work on every host.
|
|
82
|
+
|
|
83
|
+
### Ordering
|
|
84
|
+
|
|
85
|
+
Pages are ordered by:
|
|
86
|
+
|
|
87
|
+
1. `meta.json` in the directory
|
|
88
|
+
2. Frontmatter `order`
|
|
89
|
+
3. Alphabetical by title
|
|
90
|
+
|
|
91
|
+
## Configuration
|
|
92
|
+
|
|
93
|
+
Optional. A folder with no config file builds correctly. If you want to adjust things,
|
|
94
|
+
create `seemore.config.ts` next to your content:
|
|
95
|
+
|
|
96
|
+
```ts
|
|
97
|
+
// seemore.config.ts
|
|
98
|
+
import { defineConfig } from 'seemore';
|
|
99
|
+
|
|
100
|
+
export default defineConfig({
|
|
101
|
+
title: 'My Docs',
|
|
102
|
+
description: 'Everything about the thing.',
|
|
103
|
+
favicon: './favicon.svg',
|
|
104
|
+
base: '/my-repo/',
|
|
105
|
+
theme: 'ocean',
|
|
106
|
+
css: './custom.css',
|
|
107
|
+
features: ['navigation.path', 'navigation.instant.preview'],
|
|
108
|
+
nav: [{ text: 'GitHub', link: 'https://github.com/you/repo' }],
|
|
109
|
+
footer: { text: '© 2026' },
|
|
110
|
+
editLink: { base: 'https://github.com/you/repo/edit/main/docs' },
|
|
111
|
+
search: 'static',
|
|
112
|
+
exclude: ['drafts/**'],
|
|
113
|
+
});
|
|
114
|
+
```
|
|
115
|
+
|
|
116
|
+
### Themes
|
|
117
|
+
|
|
118
|
+
Eleven built-in colour presets: `neutral` (default), `black`, `catppuccin`, `dusk`,
|
|
119
|
+
`ocean`, `purple`, `ruby`, `solar`, `aspen`, `emerald`, `shadcn`. For anything else, put
|
|
120
|
+
your own CSS in `css` — it is appended last and wins. Dark and light follow your system
|
|
121
|
+
setting, with a toggle that remembers your choice.
|
|
122
|
+
|
|
123
|
+
### Features
|
|
124
|
+
|
|
125
|
+
A flat list of switches for readers who want fine control. Prefix one with `!` to switch
|
|
126
|
+
off something that is on by default.
|
|
127
|
+
|
|
128
|
+
| Flag | Default | Effect |
|
|
129
|
+
| --- | --- | --- |
|
|
130
|
+
| `navigation.instant.prefetch` | on | Load the target page on hover |
|
|
131
|
+
| `navigation.instant.preview` | off | Hover popover showing the target page |
|
|
132
|
+
| `navigation.footer` | on | Previous and next links |
|
|
133
|
+
| `navigation.top` | on | Back-to-top button |
|
|
134
|
+
| `navigation.path` | off | Breadcrumbs |
|
|
135
|
+
| `navigation.sections` | off | Top-level entries as sidebar groups |
|
|
136
|
+
| `navigation.prune` | off | Render only the visible subtree |
|
|
137
|
+
| `toc.follow` | on | Keep the active heading visible |
|
|
138
|
+
| `toc.integrate` | off | Merge the table of contents into the sidebar |
|
|
139
|
+
| `content.code.copy` | on | Copy button on code blocks |
|
|
140
|
+
| `content.action.edit` | on with `editLink` | Edit-this-page link |
|
|
141
|
+
| `search.suggest` | on | Inline query completion |
|
|
142
|
+
| `search.highlight` | on | Highlight the query on the page you land on |
|
|
143
|
+
| `social.cards` | off | Per-page OG images (needs `takumi-js`) |
|
|
144
|
+
|
|
145
|
+
Combinations that cannot work are a config error naming both flags and the fix.
|
|
146
|
+
|
|
147
|
+
## Publishing
|
|
148
|
+
|
|
149
|
+
```bash
|
|
150
|
+
npx seemore build
|
|
151
|
+
```
|
|
152
|
+
|
|
153
|
+
The result is a `dist/` folder of plain web files — drop it on
|
|
154
|
+
[Netlify](https://netlify.com), [Surge](https://surge.sh),
|
|
155
|
+
[Cloudflare Pages](https://pages.cloudflare.com) or
|
|
156
|
+
[GitHub Pages](https://pages.github.com), or hand it to any web host. Every page is its
|
|
157
|
+
own file, so no host needs special rules to serve a deep link, and reloading after moving
|
|
158
|
+
around the site works everywhere. Alongside the pages, seemore writes the few conventions
|
|
159
|
+
individual hosts look for:
|
|
160
|
+
|
|
161
|
+
| File | Read by |
|
|
162
|
+
| --- | --- |
|
|
163
|
+
| `404.html` | GitHub Pages, Netlify, Cloudflare Pages, Vercel, S3 |
|
|
164
|
+
| `_redirects` | Netlify, Cloudflare Pages |
|
|
165
|
+
| `200.html` | Surge |
|
|
166
|
+
| `.nojekyll` | GitHub Pages — without it, Jekyll drops every path starting with `_` |
|
|
167
|
+
|
|
168
|
+
None of these are required for a host that is not listed. If yours serves a folder of
|
|
169
|
+
files, it serves a seemore build.
|
|
170
|
+
|
|
171
|
+
**GitHub Pages, one thing to know:** project sites live at
|
|
172
|
+
`username.github.io/my-repo/`, not at the root. Tell seemore once:
|
|
173
|
+
|
|
174
|
+
```ts
|
|
175
|
+
export default defineConfig({ base: '/my-repo/' });
|
|
176
|
+
```
|
|
177
|
+
|
|
178
|
+
or `seemore build --base /my-repo/`. Under GitHub Actions with no `base` set, the build
|
|
179
|
+
prints the exact line to add.
|
|
180
|
+
|
|
181
|
+
## Command reference
|
|
182
|
+
|
|
183
|
+
```
|
|
184
|
+
seemore [dir] start the live preview
|
|
185
|
+
seemore build [dir] static export into dist/
|
|
186
|
+
|
|
187
|
+
--port <number> preview server port (default 4040)
|
|
188
|
+
--host [host] expose the preview server on the network
|
|
189
|
+
--open / --no-open open a browser on start (default: no)
|
|
190
|
+
--config <path> path to seemore.config.ts
|
|
191
|
+
--out <dir> build output directory (default: dist)
|
|
192
|
+
--base <path> subpath the site is served from
|
|
193
|
+
```
|
|
194
|
+
|
|
195
|
+
## What seemore is not
|
|
196
|
+
|
|
197
|
+
seemore shows folders of Markdown in your browser and exports them for hosting — that's
|
|
198
|
+
all it does. It is not a general site builder, not a CMS, and not a place to build
|
|
199
|
+
custom web apps.
|
|
200
|
+
Multi-version docs, translations, and opening the site by double-clicking a file on disk
|
|
201
|
+
are out of scope.
|
|
202
|
+
|
|
203
|
+
## Under the hood
|
|
204
|
+
|
|
205
|
+
Built in the open on open tools: [fumadocs](https://fumadocs.vercel.app) provides the
|
|
206
|
+
interface presets, with [Shiki](https://shiki.style), [Mermaid](https://mermaid.js.org),
|
|
207
|
+
[Vite](https://vite.dev) and [React Router](https://reactrouter.com) underneath. Bug
|
|
208
|
+
reports and pull requests are welcome at
|
|
209
|
+
[github.com/arifszn/seemore](https://github.com/arifszn/seemore).
|
|
210
|
+
|
|
211
|
+
## Licence
|
|
212
|
+
|
|
213
|
+
[MIT](LICENSE)
|