for-humanity 0.13.1 → 0.14.1
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/CHANGELOG.md +27 -2
- package/README.md +41 -66
- package/dist/browser.js +4 -4
- package/dist/cli.css +1 -1
- package/dist/cli.js +7 -7
- package/dist/config.js +1 -1
- package/dist/constant/site.d.ts +8 -0
- package/dist/{load-site-B-u5-jv0.js → load-site-BpLDY-YA.js} +636 -383
- package/dist/{logger-Dv1i9xSV.js → logger-CLH67K3L.js} +1 -1
- package/dist/{run-site-command-cqCjpIlc.js → run-site-command--qSrkFie.js} +41 -18
- package/dist/{site-config-bllORGpm.js → site-config-FmStUQ2W.js} +44 -0
- package/dist/site.js +1 -1
- package/dist/{start-dev-server-x7Ja5uwv.js → start-dev-server-BL2HA7v6.js} +1 -2
- package/dist/type/content-config.d.ts +9 -0
- package/dist/type/site-config.d.ts +9 -0
- package/package.json +4 -3
- package/src/asset/font/architects-daughter/architects-daughter.css +1 -1
- package/src/asset/font/ibm-plex-sans-kr/ibm-plex-sans-kr.css +3 -3
- package/src/asset/font/monoplex-kr/monoplex-kr.css +2 -2
- package/template/content/README.md +5 -0
- package/template/content/asset/.gitkeep +0 -0
- package/template/content/private/.gitkeep +0 -0
- package/template/content/public/getting-started.md +26 -0
- package/template/for-humanity.config.ts +8 -0
package/CHANGELOG.md
CHANGED
|
@@ -2,11 +2,36 @@
|
|
|
2
2
|
|
|
3
3
|
## Unreleased
|
|
4
4
|
|
|
5
|
+
## 0.14.1 — 2026-10-19
|
|
6
|
+
|
|
7
|
+
**Upgrade:** CLI commands, configuration, document syntax and Node.js requirements remain unchanged.
|
|
8
|
+
|
|
9
|
+
**Known issue:** The intermittent Windows cursor check (`NAV-010`) fails again in CI, and its cause is being investigated. See [Maintenance](https://github.com/minu-ha/for-humanity/blob/main/content/private/maintenance.md#known-windows-check-issue).
|
|
10
|
+
|
|
11
|
+
- Reorganize the documentation site into Start, Guide and Updates. Installation has its own page, Commands covers command options and troubleshooting, and the changelog is published with update instructions. The Reference and Releases pages are removed; their content is in Commands, Settings, Writing and Changelog.
|
|
12
|
+
- Let the mouse wheel scroll the document over the document list and the outline when they fit on screen. Chrome previously kept the wheel inside them.
|
|
13
|
+
- Restore the scroll position instantly when reloading or going back to an address with a heading, without first jumping to the heading or sliding down from the top.
|
|
14
|
+
- End documents with a regular section margin instead of nearly a screen of blank space. Over the last screen, the outline steps through the remaining headings in order, and a heading opened from a link stays marked until you scroll.
|
|
15
|
+
- Land anchor links with the heading at 40% of the screen height instead of near the top, and switch the outline at the same line.
|
|
16
|
+
- Land anchor links in the last screen exactly where the outline switches to them, so clicking an outline entry never briefly marks another heading.
|
|
17
|
+
|
|
18
|
+
## 0.14.0 — 2026-10-19
|
|
19
|
+
|
|
20
|
+
**Breaking change:** Configuration now belongs in the project root. CLI paths identify a project, not a Markdown folder. Move published documents into `content/public`, local-only documents into `content/private`, and the site home into `content/README.md`; use `content.root`, `content.public` and `content.private` to customize these paths. Existing flat document folders are not automatically published. See the [migration guide](https://for-humanity.fyi/migration/). Node.js 22.12.0 or later is still required.
|
|
21
|
+
|
|
22
|
+
- Focus public documentation on installation, configuration, authoring and deployment. Keep internal plans, release operations, development history and fictional project studies in local-only content.
|
|
23
|
+
- Show both document collections in `dev`; build and preview only the public site in `content/dist`.
|
|
24
|
+
- Preserve public document URLs and reserve `/private/` for local internal pages. Exclude internal pages, navigation data, sitemap entries and their assets from public builds.
|
|
25
|
+
- Reject public references to internal Markdown, images and snippets, including raw HTML and symlink targets.
|
|
26
|
+
- Move this repository's documentation to `content` and its configuration to the project root.
|
|
27
|
+
- Include a reusable `template/` starter with public/private folders and document migration from flat Markdown projects.
|
|
28
|
+
- Reject content-root symlinks into build output, Git metadata and installed dependencies.
|
|
29
|
+
|
|
5
30
|
## 0.13.1 — 2026-10-16
|
|
6
31
|
|
|
7
32
|
**Upgrade:** CLI commands, configuration and Node.js requirements remain unchanged. Navigation scroll positions saved by older versions may reset once after upgrading.
|
|
8
33
|
|
|
9
|
-
**Known issue:** The previously recorded intermittent Windows cursor check (`NAV-010`) remains deferred. See [Maintenance](https://for-humanity
|
|
34
|
+
**Known issue:** The previously recorded intermittent Windows cursor check (`NAV-010`) remains deferred. See [Maintenance](https://github.com/minu-ha/for-humanity/blob/main/content/private/maintenance.md#known-windows-check-issue).
|
|
10
35
|
|
|
11
36
|
- Let Zustand persist own navigation scroll storage and hydration; remove direct storage reads, legacy layout-key compatibility and duplicate restoration helpers.
|
|
12
37
|
- Validate saved navigation positions once with a shared Zod schema, discard malformed snapshots, and compare navigation data without traversing DOM links on every scroll event.
|
|
@@ -16,7 +41,7 @@
|
|
|
16
41
|
|
|
17
42
|
**Upgrade:** Node.js 22.12.0 or later is now required; upgrade Node before installing. Existing `dev`, `build`, `preview` commands and `.mjs` configurations remain supported. To use typed configuration, replace the `.mjs` file with `for-humanity.config.ts`; keep only one configuration file per document folder. Development and preview servers bind to localhost.
|
|
18
43
|
|
|
19
|
-
**Known issue:** The Windows browser check for cursor visibility after a reload (`NAV-010`) intermittently fails. The other browser checks and installed-package dev/preview checks pass; further cursor lifecycle investigation is deferred. See [Maintenance](https://for-humanity
|
|
44
|
+
**Known issue:** The Windows browser check for cursor visibility after a reload (`NAV-010`) intermittently fails. The other browser checks and installed-package dev/preview checks pass; further cursor lifecycle investigation is deferred. See [Maintenance](https://github.com/minu-ha/for-humanity/blob/main/content/private/maintenance.md#known-windows-check-issue).
|
|
20
45
|
|
|
21
46
|
- Render page titles, metadata and resource tags with a request-local Unhead server instance; deduplicate links, preserve literal metadata text, and keep CSS and font loading in the initial HTML.
|
|
22
47
|
- Use Citty for CLI commands and help/version output, reject unsupported options and extra paths before running, and format build results and document warnings with Consola.
|
package/README.md
CHANGED
|
@@ -13,122 +13,97 @@ Write Markdown. Keep the context. Share a static site.
|
|
|
13
13
|
[](https://github.com/minu-ha/for-humanity/blob/main/LICENSE)
|
|
14
14
|
[](https://www.npmjs.com/package/for-humanity)
|
|
15
15
|

|
|
16
|
-

|
|
17
16
|

|
|
18
17
|
|
|
19
|
-
[Quick start](#quick-start) · [Guide](https://github.com/minu-ha/for-humanity/blob/main/
|
|
18
|
+
[Quick start](#quick-start) · [Guide](https://github.com/minu-ha/for-humanity/blob/main/content/public/writing.md) · [Commands](https://github.com/minu-ha/for-humanity/blob/main/content/public/commands.md) · [Deployment](https://github.com/minu-ha/for-humanity/blob/main/content/public/deployment.md) · [Korean](https://github.com/minu-ha/for-humanity/blob/main/language/README.ko.md)
|
|
20
19
|
|
|
21
20
|
</div>
|
|
22
21
|
|
|
23
|
-
##
|
|
22
|
+
## Write, organize, publish
|
|
24
23
|
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
- **Share the result.** Static HTML, self-hosted fonts and a small browser script. Browser interactions stay separate from Markdown rendering.
|
|
29
|
-
- **Read your way.** System-matched light and dark themes, keyboard navigation and a layout for narrow screens.
|
|
24
|
+
Write Markdown with code examples, tables, images and Mermaid diagrams. Organize pages into groups and nested navigation. Use notes for context and collapsible details for longer explanations.
|
|
25
|
+
|
|
26
|
+
The result is a static site with bundled fonts, light and dark themes, keyboard navigation and a layout that adapts to narrow screens.
|
|
30
27
|
|
|
31
28
|
## Quick start
|
|
32
29
|
|
|
33
|
-
Node.js 22.12.0 or later and pnpm.
|
|
30
|
+
You need Node.js 22.12.0 or later and pnpm. In a project with a `package.json`, install the package:
|
|
34
31
|
|
|
35
32
|
```sh
|
|
36
|
-
pnpm add -D --save-exact for-humanity@0.
|
|
37
|
-
mkdir docs
|
|
33
|
+
pnpm add -D --save-exact for-humanity@0.14.1
|
|
38
34
|
```
|
|
39
35
|
|
|
40
|
-
|
|
36
|
+
Copy `for-humanity.config.ts` and the `content` folder from `node_modules/for-humanity/template` into your project. If you already have documentation, follow [Migration](https://github.com/minu-ha/for-humanity/blob/main/content/public/migration.md) before moving files.
|
|
41
37
|
|
|
42
|
-
|
|
43
|
-
pnpm exec for-humanity dev docs
|
|
44
|
-
```
|
|
38
|
+
Edit `content/README.md` for your home page:
|
|
45
39
|
|
|
46
|
-
|
|
40
|
+
```markdown
|
|
41
|
+
# Project notes
|
|
47
42
|
|
|
48
|
-
|
|
49
|
-
pnpm exec for-humanity build docs # Generate docs/dist
|
|
50
|
-
pnpm exec for-humanity preview docs
|
|
43
|
+
Welcome to the project documentation.
|
|
51
44
|
```
|
|
52
45
|
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
Version `0.13.1` supports `dev`, `build` and `preview`. `init` is planned; see the [Roadmap](https://github.com/minu-ha/for-humanity/blob/main/templates/document/roadmap.md) and [Changelog](https://github.com/minu-ha/for-humanity/blob/main/CHANGELOG.md).
|
|
56
|
-
Cloudflare Pages can host the generated site. See [Deployment](https://github.com/minu-ha/for-humanity/blob/main/templates/document/deployment.md) for the build settings.
|
|
57
|
-
Set an optional public root `url` in the site configuration to generate `robots.txt` and `sitemap.xml`; projects without a URL emit neither file. See [Crawling](https://github.com/minu-ha/for-humanity/blob/main/templates/document/crawling.md).
|
|
58
|
-
|
|
59
|
-
### Develop the kit
|
|
60
|
-
|
|
61
|
-
Version 0.13.0 requires Node.js 22.12.0 or later. Repository development uses one Vite server with Hono, source TSX reloads and CSS HMR.
|
|
62
|
-
|
|
63
|
-
To work on the CLI or read this library's guides and examples locally, run the project from source:
|
|
46
|
+
Start the local server:
|
|
64
47
|
|
|
65
48
|
```sh
|
|
66
|
-
|
|
67
|
-
cd for-humanity
|
|
68
|
-
pnpm install
|
|
69
|
-
pnpm dev
|
|
49
|
+
pnpm exec for-humanity dev
|
|
70
50
|
```
|
|
71
51
|
|
|
72
|
-
Open [localhost:4321](http://localhost:4321) to
|
|
52
|
+
Open [localhost:4321](http://localhost:4321). Edit the Markdown file and save to update the page. Follow [Installation](https://github.com/minu-ha/for-humanity/blob/main/content/public/installation.md) to add your first document.
|
|
53
|
+
|
|
54
|
+
Build and inspect the site before deployment:
|
|
73
55
|
|
|
74
56
|
```sh
|
|
75
|
-
pnpm
|
|
76
|
-
pnpm
|
|
77
|
-
pnpm build:pages # Add Cloudflare Pages headers and a 404 page
|
|
57
|
+
pnpm exec for-humanity build
|
|
58
|
+
pnpm exec for-humanity preview
|
|
78
59
|
```
|
|
79
60
|
|
|
80
|
-
|
|
81
|
-
|
|
61
|
+
Deploy the generated `content/dist` directory and add it to `.gitignore`. See [Deployment](https://github.com/minu-ha/for-humanity/blob/main/content/public/deployment.md) for hosting settings.
|
|
62
|
+
|
|
63
|
+
Keep published documents in `content/public` and local notes in `content/private`. The local server shows both; builds include only public documents and the home page. Folder names are configurable.
|
|
82
64
|
|
|
83
65
|
## Make it yours
|
|
84
66
|
|
|
85
|
-
|
|
86
|
-
The folder's `README.md` becomes the home page at `/`, with no frontmatter required. Click the site name to return home.
|
|
87
|
-
This repository generates [the documentation home](https://github.com/minu-ha/for-humanity/blob/main/templates/document/README.md) from its root README.md and [the site changelog](https://github.com/minu-ha/for-humanity/blob/main/templates/document/changelog.md) from CHANGELOG.md. Edit those source files, then run `pnpm sync:docs`; `pnpm dev` and `pnpm build` also sync them on startup.
|
|
88
|
-
Set your own name in `for-humanity.config.ts`, using the exported `SiteConfig` type for editor completion and static checking:
|
|
67
|
+
Set the site name and the order of navigation groups:
|
|
89
68
|
|
|
90
69
|
```ts
|
|
91
70
|
import type {SiteConfig} from "for-humanity";
|
|
92
71
|
|
|
93
72
|
export default {
|
|
94
73
|
title: "Project notes",
|
|
95
|
-
description: "
|
|
96
|
-
navigation: ["
|
|
74
|
+
description: "A guide to using the project.",
|
|
75
|
+
navigation: ["Start", "Guide", "Updates"],
|
|
97
76
|
} satisfies SiteConfig;
|
|
98
77
|
```
|
|
99
78
|
|
|
100
|
-
|
|
101
|
-
Use one configuration file per document folder. The CLI validates values at startup; run `tsc --noEmit` in your project for static type checking.
|
|
79
|
+
Save this as `for-humanity.config.ts` in the project root, alongside `package.json`. Existing `.mjs` configuration is also supported; keep only one configuration file.
|
|
102
80
|
|
|
103
|
-
See [
|
|
104
|
-
Each document other than the root README chooses a `group` and optional `order`. Pages stay independent; groups do not need parent documents or nested folders. Document names may share the same first letter.
|
|
105
|
-
Use `group: Guide` for one group or `group: [Projects, Example project, Research]` for nested navigation. Group paths do not change document URLs.
|
|
106
|
-
Use `parent: writing` to place a document below another document in the same group. File-relative references such as `parent: ./readme` also work. Parent pages remain clickable and each page keeps its own URL; see [Navigation](https://github.com/minu-ha/for-humanity/blob/main/templates/document/navigation.md).
|
|
81
|
+
Each document declares a title, description and navigation group in frontmatter. See [Writing](https://github.com/minu-ha/for-humanity/blob/main/content/public/writing.md) for a complete example and [Settings](https://github.com/minu-ha/for-humanity/blob/main/content/public/settings.md) for available options.
|
|
107
82
|
|
|
108
|
-
##
|
|
83
|
+
## Keep useful detail
|
|
109
84
|
|
|
110
85
|
```markdown
|
|
111
|
-
:::note[
|
|
112
|
-
|
|
86
|
+
:::note[Before you start]
|
|
87
|
+
Check the requirements before following the steps.
|
|
113
88
|
:::
|
|
114
89
|
|
|
115
|
-
:::details[
|
|
116
|
-
|
|
90
|
+
:::details[More information]
|
|
91
|
+
Add examples or explanations readers can open when needed.
|
|
117
92
|
:::
|
|
118
93
|
```
|
|
119
94
|
|
|
120
|
-
[Parts](https://github.com/minu-ha/for-humanity/blob/main/
|
|
95
|
+
[Parts](https://github.com/minu-ha/for-humanity/blob/main/content/public/parts.md) shows the syntax alongside its rendered output.
|
|
121
96
|
|
|
122
97
|
## Documentation
|
|
123
98
|
|
|
124
|
-
|
|
|
125
|
-
|
|
|
126
|
-
|
|
|
127
|
-
|
|
|
128
|
-
|
|
|
129
|
-
|
|
|
130
|
-
|
|
|
131
|
-
|
|
|
99
|
+
| Task | Guide |
|
|
100
|
+
| --- | --- |
|
|
101
|
+
| Install and run | [Installation](https://github.com/minu-ha/for-humanity/blob/main/content/public/installation.md) · [Commands](https://github.com/minu-ha/for-humanity/blob/main/content/public/commands.md) |
|
|
102
|
+
| Write and organize pages | [Writing](https://github.com/minu-ha/for-humanity/blob/main/content/public/writing.md) · [Navigation](https://github.com/minu-ha/for-humanity/blob/main/content/public/navigation.md) |
|
|
103
|
+
| Add rich content | [Parts](https://github.com/minu-ha/for-humanity/blob/main/content/public/parts.md) · [Diagrams](https://github.com/minu-ha/for-humanity/blob/main/content/public/diagrams.md) · [Images](https://github.com/minu-ha/for-humanity/blob/main/content/public/images.md) |
|
|
104
|
+
| Configure the site | [Settings](https://github.com/minu-ha/for-humanity/blob/main/content/public/settings.md) |
|
|
105
|
+
| Publish | [Deployment](https://github.com/minu-ha/for-humanity/blob/main/content/public/deployment.md) · [Crawling](https://github.com/minu-ha/for-humanity/blob/main/content/public/crawling.md) |
|
|
106
|
+
| Update | [Changelog](https://github.com/minu-ha/for-humanity/blob/main/content/public/changelog.md) · [Migration](https://github.com/minu-ha/for-humanity/blob/main/content/public/migration.md) |
|
|
132
107
|
|
|
133
108
|
## License
|
|
134
109
|
|