gethtmlpress 0.2.2 → 0.3.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/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "gethtmlpress",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.3.0",
|
|
4
4
|
"description": "Turn a folder of HTML pages into a site: one layout, one theme, live reload, made for agents",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"agents",
|
|
@@ -30,11 +30,11 @@
|
|
|
30
30
|
"node": ">=20"
|
|
31
31
|
},
|
|
32
32
|
"optionalDependencies": {
|
|
33
|
-
"@htmlpress/linux-x64": "0.
|
|
34
|
-
"@htmlpress/linux-arm64": "0.
|
|
35
|
-
"@htmlpress/darwin-x64": "0.
|
|
36
|
-
"@htmlpress/darwin-arm64": "0.
|
|
37
|
-
"@htmlpress/win32-x64": "0.
|
|
38
|
-
"@htmlpress/win32-arm64": "0.
|
|
33
|
+
"@htmlpress/linux-x64": "0.3.0",
|
|
34
|
+
"@htmlpress/linux-arm64": "0.3.0",
|
|
35
|
+
"@htmlpress/darwin-x64": "0.3.0",
|
|
36
|
+
"@htmlpress/darwin-arm64": "0.3.0",
|
|
37
|
+
"@htmlpress/win32-x64": "0.3.0",
|
|
38
|
+
"@htmlpress/win32-arm64": "0.3.0"
|
|
39
39
|
}
|
|
40
40
|
}
|
|
@@ -82,6 +82,26 @@ listed in every language with a badge and link to the original. Without a transl
|
|
|
82
82
|
- A heading takes `data-toc="false"` (shown, not in the TOC) or `data-toc="only"` (in the TOC,
|
|
83
83
|
not shown); `<htmlpress-toc level="2">` (2–4, default 3) in a page renders its TOC inline.
|
|
84
84
|
|
|
85
|
+
## The layout owns the frame
|
|
86
|
+
|
|
87
|
+
The layout already gives every page its `<main>`, width, gutters, header, footer and spacing.
|
|
88
|
+
A page that brings its own frame nests one inside the other and gets double padding.
|
|
89
|
+
|
|
90
|
+
- **No wrapper.** Content starts at the top level: no `<main>`, `<article>`, `<div class="container">`
|
|
91
|
+
or `<section>` around the whole page, and no `<header>` or `<footer>` of the page's own.
|
|
92
|
+
- **No frame CSS.** Never style `html`, `body`, `main` or a page root: no `max-width`, `margin`,
|
|
93
|
+
`padding`, `font-family`, `background` or `color` scheme. These come from tokens.
|
|
94
|
+
- **One `<h1>`, first.** The `<h1>` is the first content element, says what `<title>` says, and is
|
|
95
|
+
the only one; no eyebrow, logo or date above it (`date` and `author` metas make the byline).
|
|
96
|
+
- **Headings descend in steps**: `<h2>` for sections, `<h3>` inside them, never skipping a
|
|
97
|
+
level to get a smaller size. A component's heading is `<h3>` (cards, steps).
|
|
98
|
+
- **No spacing hacks**: no `<br>` runs, empty `<p>`, ` ` indents or `<hr>` between sections;
|
|
99
|
+
headings already space the page.
|
|
100
|
+
- **Converting a standalone HTML page** (a report, an export, an artifact): keep its body content,
|
|
101
|
+
drop its `<style>` frame, wrapper, header and footer, map its stat tiles, badges and callouts to
|
|
102
|
+
the components below, and keep a page `<style>` only for a figure the theme cannot draw, scoped
|
|
103
|
+
to that figure and using `--htmlpress-*` tokens only.
|
|
104
|
+
|
|
85
105
|
## Semantic HTML first
|
|
86
106
|
|
|
87
107
|
The theme styles the elements themselves: headings, `<p>`, lists, `<table>`, `<pre><code>`,
|
|
@@ -0,0 +1,80 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: htmlpress-knowledge
|
|
3
|
+
description: Use when writing internal docs for people with htmlpress — a project's knowledge base of research, reports, registers and decisions in `.humans/`, kept beside the code and read as one site.
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# Htmlpress Knowledge
|
|
7
|
+
|
|
8
|
+
A knowledge base is what the people on a project read to know why it is the way it is: research,
|
|
9
|
+
reports, registers of things counted, and the decisions made. It is not the user docs, which
|
|
10
|
+
teach a product, and not agent instructions (`AGENTS.md`, skills), which steer an agent. Htmlpress
|
|
11
|
+
builds it the way it builds any site: one HTML page per document, one theme, one navigation.
|
|
12
|
+
|
|
13
|
+
## When to use this skill
|
|
14
|
+
|
|
15
|
+
Invoke when the user asks to:
|
|
16
|
+
|
|
17
|
+
- Write up research, an investigation, a comparison, a market or competitor scan, or a report.
|
|
18
|
+
- Keep a register (sources, dealers, vendors) or a decision log.
|
|
19
|
+
- Turn notes, a Markdown file or a standalone HTML report into a page people will read.
|
|
20
|
+
- Set up a place for a project's internal docs.
|
|
21
|
+
|
|
22
|
+
How to write a page is in `htmlpress-authoring`; read it first. This skill is what a knowledge
|
|
23
|
+
base adds on top.
|
|
24
|
+
|
|
25
|
+
## Setup
|
|
26
|
+
|
|
27
|
+
`.humans/` at the repo root is the folder, a dot-directory so code globs skip it. It is its own
|
|
28
|
+
htmlpress project:
|
|
29
|
+
|
|
30
|
+
```yaml
|
|
31
|
+
# .humans/htmlpress.yaml
|
|
32
|
+
title: Project
|
|
33
|
+
description:
|
|
34
|
+
en: Research, reports and decisions for people
|
|
35
|
+
```
|
|
36
|
+
|
|
37
|
+
```json
|
|
38
|
+
{ "scripts": { "read": "htmlpress start .humans" } }
|
|
39
|
+
```
|
|
40
|
+
|
|
41
|
+
Ignore `.humans/.htmlpress/build/` in git. Files a page uses (images, CSV) sit beside it in a
|
|
42
|
+
folder named after it (`image-quality.html` and `image-quality/`).
|
|
43
|
+
|
|
44
|
+
## Pages
|
|
45
|
+
|
|
46
|
+
- **One document, one page**, named for its subject in kebab case (`competitors.html`), never by
|
|
47
|
+
date or author. A family of pages (one per country) gets a folder with an `index.html`.
|
|
48
|
+
- **Metas**: `<title>`, `description` (what a reader learns, in one line), `date` (when the
|
|
49
|
+
content was last true) and `order` for the pages a newcomer should read first.
|
|
50
|
+
- **Lead with the answer.** The paragraph under the `<h1>` gives the conclusion or the
|
|
51
|
+
recommendation; the evidence follows. Headline numbers go in an `htmlpress-grid` of
|
|
52
|
+
`htmlpress-card`s right after it.
|
|
53
|
+
- **Numbers carry their date and source**, near the top: a register goes stale, and the reader
|
|
54
|
+
must see when it was measured and from where. Cite each source with a link.
|
|
55
|
+
- **Statuses are badges** with one fixed meaning per site: `success` decided or done, `warning`
|
|
56
|
+
a call still to confirm, `danger` open or blocked. Say so in a legend if a page uses them.
|
|
57
|
+
- **Tables hold short cells.** A table never wraps a cell, so a row that needs prose becomes a
|
|
58
|
+
`<dl>`: the item as `<dt>`, its reasons as `<dd>`. Wrap a sortable table in `htmlpress-table`.
|
|
59
|
+
- **Diagrams are inline SVG**, drawn for the real structure, in a `<figure>` with a
|
|
60
|
+
`<figcaption>`, styled by a page `<style>` scoped to that figure with `--htmlpress-*` tokens
|
|
61
|
+
only, so it follows light and dark. `htmlpress-mermaid` for a quick flow.
|
|
62
|
+
|
|
63
|
+
## A decision log
|
|
64
|
+
|
|
65
|
+
One page, `decisions.html`, with `<h2>` sections Decided, To confirm and Open. Each entry is an
|
|
66
|
+
`<h3>` naming the decision, its badge, its date, why, and the alternatives rejected. A decision
|
|
67
|
+
changes the log in the same commit as the code that carries it out; an entry moves sections,
|
|
68
|
+
it is never deleted.
|
|
69
|
+
|
|
70
|
+
## Keep it true
|
|
71
|
+
|
|
72
|
+
A page is a claim about the code or the world on its `date`. When a change makes one false,
|
|
73
|
+
fix the page in the same commit, or add a `warning` callout saying what is stale. Delete a page
|
|
74
|
+
nobody can keep true rather than leave it wrong.
|
|
75
|
+
|
|
76
|
+
## Verification
|
|
77
|
+
|
|
78
|
+
Run `htmlpress build .humans --json` and confirm `pages` counts every page, then
|
|
79
|
+
`htmlpress start .humans` and read each changed page at phone width: no sideways scroll, no
|
|
80
|
+
double padding, one `<h1>`.
|
|
@@ -95,6 +95,7 @@ project has something real to say in; three strong ones beat seven thin ones.
|
|
|
95
95
|
|
|
96
96
|
- Links are root-relative (`/introduction/`, or the file, `/introduction.html`); `base` is added
|
|
97
97
|
at build time.
|
|
98
|
+
- The landing has exactly one `<h1>`, in the hero; every section below starts at `<h2>`.
|
|
98
99
|
- Keep the landing out of the sidebar (`sidebar` false) but give it a real `<title>` and
|
|
99
100
|
`description`: it is the site's social preview.
|
|
100
101
|
- Every component must read well with its JS off: the slides are already in the HTML.
|