seemore 1.10.8 → 1.11.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/README.md +32 -2
- package/dist/cli/index.js +642 -212
- package/dist/cli/index.js.map +1 -1
- package/dist/index.d.ts +24 -1
- package/package.json +1 -1
- package/src/app/entry.client.tsx +13 -0
- package/src/app/layout/Header.tsx +9 -1
- package/src/app/lib/auth.ts +31 -0
- package/src/app/lib/chunkReload.ts +23 -0
- package/src/app/mdx/Pdf.tsx +38 -2
- package/src/app/styles/globals.css +7 -5
- package/src/app/virtual.d.ts +5 -0
- package/src/shared/auth/crypto.ts +190 -0
- package/src/shared/auth/files.ts +37 -0
- package/src/shared/auth/lock.ts +152 -0
- package/src/shared/auth/store.ts +54 -0
- package/src/shared/auth/sw.ts +57 -0
- package/src/shared/auth/worker.ts +408 -0
package/README.md
CHANGED
|
@@ -101,7 +101,7 @@ Or invoke the skill by name:
|
|
|
101
101
|
- **[As a static site](#publish-it-to-the-web)**: `npx seemore build` exports plain HTML you can host anywhere, so it doubles as a docs framework, not just a preview tool.
|
|
102
102
|
|
|
103
103
|
<p align="center">
|
|
104
|
-
<video src="https://github.com/user-attachments/assets/
|
|
104
|
+
<video src="https://github.com/user-attachments/assets/0a27b76d-f765-47b7-a3de-4b6f3aefbb74" width="640" controls muted></video>
|
|
105
105
|
</p>
|
|
106
106
|
|
|
107
107
|
## What you get
|
|
@@ -113,6 +113,7 @@ Point seemore at anything already sitting in Markdown (AI-written notes, project
|
|
|
113
113
|
- **Edit in place**: double-click any block in the preview to fix its Markdown
|
|
114
114
|
- **Editor integration**: one extension covers VS Code, Cursor, Antigravity and other VS Code-compatible editors, remote workspaces included
|
|
115
115
|
- **Documentation framework**: `seemore build` prerenders the whole site to HTML, ready to deploy on any host
|
|
116
|
+
- **Password protection**: protect the built site with one shared password, with no server required
|
|
116
117
|
- **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
|
|
117
118
|
- **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
|
|
118
119
|
- **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
|
|
@@ -158,6 +159,32 @@ The result is a `dist/` folder of plain web files: drop it on [Netlify](https://
|
|
|
158
159
|
> [!TIP]
|
|
159
160
|
> Publishing to GitHub Pages? If your site lives at `username.github.io/my-repo/` rather than the root, tell seemore the subpath once with `base: '/my-repo/'`.
|
|
160
161
|
|
|
162
|
+
### Password-protect a site
|
|
163
|
+
|
|
164
|
+
Add `auth: true` to `seemore.config.ts`. Set the password when you build:
|
|
165
|
+
|
|
166
|
+
```bash
|
|
167
|
+
SEEMORE_PASSWORD='a-long-passphrase' npx seemore build
|
|
168
|
+
```
|
|
169
|
+
|
|
170
|
+
On Windows PowerShell:
|
|
171
|
+
|
|
172
|
+
```powershell
|
|
173
|
+
$env:SEEMORE_PASSWORD='a-long-passphrase'; npx seemore build
|
|
174
|
+
```
|
|
175
|
+
|
|
176
|
+
<p align="center">
|
|
177
|
+
<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"/>
|
|
178
|
+
</p>
|
|
179
|
+
|
|
180
|
+
By default, visitors stay unlocked for one day after their last visit. Change this with `remember`:
|
|
181
|
+
|
|
182
|
+
```ts
|
|
183
|
+
auth: { remember: '7d' } // or '12h'
|
|
184
|
+
```
|
|
185
|
+
|
|
186
|
+
Password protection works only for `seemore build`. To try the lock screen, build and serve `dist/` on `localhost`.
|
|
187
|
+
|
|
161
188
|
### Share a single page to Slack, email
|
|
162
189
|
|
|
163
190
|
To share a single page instead of a site, the **Actions** button above every page 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:
|
|
@@ -166,7 +193,7 @@ To share a single page instead of a site, the **Actions** button above every pag
|
|
|
166
193
|
npx seemore export docs/spec.md # writes spec.html next to the Markdown
|
|
167
194
|
```
|
|
168
195
|
|
|
169
|
-
More on
|
|
196
|
+
More on all three in [publishing](https://arifszn.github.io/seemore/publishing).
|
|
170
197
|
|
|
171
198
|
## Configuration
|
|
172
199
|
|
|
@@ -188,6 +215,7 @@ export default {
|
|
|
188
215
|
search: 'static', // or { provider: 'orama-cloud', endpoint, apiKey } / { provider: 'algolia', appId, apiKey, indexName }
|
|
189
216
|
pageActions: ['copy-markdown', 'export-html'],
|
|
190
217
|
exclude: ['drafts/**'],
|
|
218
|
+
auth: true, // password from SEEMORE_PASSWORD at build time
|
|
191
219
|
};
|
|
192
220
|
```
|
|
193
221
|
|
|
@@ -270,6 +298,8 @@ Run `seemore --help` for the options, or see the [CLI reference](https://arifszn
|
|
|
270
298
|
|
|
271
299
|
**Will it move or rewrite my files?** No. seemore reads your folder where it is. It writes only when you save an inline edit, or when you run `build` or `export`.
|
|
272
300
|
|
|
301
|
+
**Is the password protection real?** Yes. Site content is encrypted, so a copy of the build cannot be read without the password. There is no per-person access or revocation, and a short password can be guessed offline, so use a long one.
|
|
302
|
+
|
|
273
303
|
**Is it 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.
|
|
274
304
|
|
|
275
305
|
## Under the hood
|