-
Notifications
You must be signed in to change notification settings - Fork 1
Expand README/Antora/changelog rules; keep established chrome #4
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -9,8 +9,11 @@ Read this file when you **author, structure, or publish** project documentation | |
|
|
||
| ## Antora (when used) | ||
|
|
||
| - **Default stack:** Antora + **Valentus** UI (`antora-supplemental/valentus-theme`). Customize colors and logo from the org’s existing brand assets (org `.github` profile, eponymous site repo, or other central branding repo)—do not invent a one-off palette per component. | ||
| - If the project uses **Antora**, follow the publishing and layout guidance in the Dev-Centr documentation repository: `dev-centr/devcentr` — see `docs/modules/publishing/pages/antora-deployment.adoc` for deployment-oriented details. | ||
| - **One Antora site per org** that already has a hub (e.g. https://docs.devcentr.org). Do not publish secondary per-repo Antora sites on GitHub Pages. Keep `docs/` in the product repo; **wire** into the hub playbook. See `general/antora-docs-sites.md`. Actively deduplicate when you find errant sites. Does **not** apply to mixtures of different docs systems (Antora + Fumadocs is fine). | ||
| - **One Antora site per org** that already has a hub (e.g. https://docs.devcentr.org). Do not publish secondary per-repo Antora sites on GitHub Pages. Keep `docs/` in the product repo; **wire** into the hub playbook. See `general/antora-docs-sites.md`. Actively deduplicate when you find errant sites. Does **not** apply to mixtures of different docs systems (Antora + Fumadocs is fine). Repo-local `antora-playbook.yml` for **preview/validation CI** is fine if it does **not** publish a second public site. | ||
| - **Search:** Enable `@antora/lunr-extension` on every published Antora site. Add the AI-assisted search/help layer from **`antora-supplemental`** — prefer [`@antora-supplemental/antora-search-chat`](https://github.com/antora-supplemental/antora-search-chat) (Lunr-first Search/Ask omnibox). Related: [`antora-ai-help-extension`](https://github.com/antora-supplemental/antora-ai-help-extension). Register Lunr before wrappers that depend on it. | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Good addition. Follow-up for |
||
| - If `antora-supplemental` (or those extensions) cannot be found after a reasonable search (rename/move), **stop and alert the user** (email, Slack, or whatever channel is available) so they can notify whoever owns this automation rule — then wait for a reply before inventing a substitute. | ||
|
|
||
| ## Relationship to creator rules | ||
|
|
||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -2,11 +2,28 @@ | |
|
|
||
| Read this when creating or revising a **GitHub-facing** `README.md` / `README.adoc` for owned or org repos. Structure inspiration: [othneildrew/Best-README-Template](https://github.com/othneildrew/Best-README-Template). Canonical blanks: [dev-centr/readme-template](https://github.com/dev-centr/readme-template) (fork to other orgs / personal profile as needed). | ||
|
|
||
| Do **not** batch-script README rewrites across repos. Hand-edit each file so stack grouping, contact, and omitted sections stay accurate. | ||
| Do **not** batch-script README rewrites across repos. Hand-edit each file so stack grouping, contact, and omitted sections stay accurate. Not every repo needs the full template — omit fields that will never apply (e.g. no logo). That template assumes the repo is a project hub; lighter repos stay simpler. | ||
|
|
||
| ## Format choice | ||
|
|
||
| | Situation | README format | | ||
| |-----------|----------------| | ||
| | **Default (owned / first-party)** | Prefer **AsciiDoc** (`README.adoc`). On GitHub, use embedded HTML for the centered title/header; use `[.text-center]` (or HTML) for other centered blocks. | | ||
| | **Fork of an upstream project** | **Retain Markdown** if upstream is Markdown. Do not convert away from the fork’s face format. | | ||
| | **Package registry that only parses Markdown** (npm, crates.io listing copy, etc.) | Keep or add a **Markdown** README (or registry-facing copy) for the registry. Do **not** delete a Markdown copy that exists for that reason. Deep docs may still be AsciiDoc/Antora. | | ||
| | **Major user-facing + Best-README HTML centering** | GitHub’s AsciiDoc subset centers poorly; **`README.md`** as the repo face is fine (deep docs under `docs/`). | | ||
|
|
||
| ## Docs link (org repos) | ||
|
|
||
| For **organization** repositories with a README: include an **Explore the docs »** text link in the centered header (same pattern as `dev-centr/readme-template` / `switchyard`), pointing at the **org docs hub** component URL (e.g. `https://docs.devcentr.org/<component>/`), not a secondary per-repo Pages Antora site. Do **not** add a separate `Docs | Org` shield — that fights the established contributors/forks/stars/issues/(license) chrome. | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Intentional and correct for Dev-Centr chrome. The documentation automation template still mentions a |
||
|
|
||
| **CI status badges** are optional. Prefer leaving them out of the centered header unless the repo already uses one; do not require a CI chip for every workflow-enabled repo. | ||
|
|
||
| Personal-user repos: skip the org-hub docs CTA unless that user publishes a docs site you should link. | ||
|
|
||
| ## Why the prior refresh broke | ||
|
|
||
| 1. **Badge targets** — Shields must open the *thing they represent* (contributors graph, stargazers, issues, license blob, tech homepage). Never the shield image URL. | ||
| 1. **Badge targets** — Shields must open the *thing they represent* (contributors graph, stargazers, issues, license blob, tech homepage). Never the shield image URL. Docs discovery is the **Explore the docs »** text link (hub URL), not an extra Docs shield. | ||
| 2. **Markdown inside `<div align="center">`** — GitHub often does **not** resolve `[![x][shield]][url]` inside HTML blocks, so badges appear to link only to the image (or nowhere useful). **In the centered header, use HTML:** `<a href="DEST"><img src="https://img.shields.io/…" alt="…"></a>`. | ||
| 3. **AsciiDoc `env-github` trap** — Do **not** strip `link=` under `ifdef::env-github[]`. Prefer HTML `<a href><img>` on GitHub, or always keep `link=` on `image:` macros. | ||
| 4. **Centering** — One centered block for **badges + title + one-liner + quick links**. Title-only centering with badges left above is incomplete. | ||
|
|
@@ -17,11 +34,13 @@ Do **not** batch-script README rewrites across repos. Hand-edit each file so sta | |
|
|
||
| | Audience | Layout | | ||
| |----------|--------| | ||
| | **User-facing / downstream** (apps, installable CLIs, public libs, product sites) | Full: centered header, linked shields, structured Built With, TOC, section back-to-top, Contact, optional contrib.rocks | | ||
| | **User-facing / downstream** (apps, installable CLIs, public libs, product sites) | Full: centered header (contributors/forks/stars/issues/license as applicable), **Explore the docs »** → hub when docs exist, structured Built With, TOC when >3 sections, section back-to-top, Contact, optional contrib.rocks | | ||
| | **Internal / non-downstream** | Simplified: linked shields + short About + install/usage if needed + License/Contact. Skip LinkedIn, empty Roadmap/Acknowledgments, contrib.rocks, demo marketing links | | ||
| | **Skip** | School repos, org `.github` profiles, archived, package-tap / registry-instruction-only, empty repos | | ||
|
|
||
| Prefer keeping `README.adoc` when the repo is AsciiDoc-native **except** major user-facing repos that need Best-README HTML centering: GitHub’s AsciiDoc subset does not center like Markdown. For those, use **`README.md`** as the repo face (deep docs stay under `docs/`). | ||
| ## Table of contents | ||
|
|
||
| Include a TOC when the README has **more than three** sections (collapsible `<details>` is fine on Markdown). | ||
|
|
||
| ## Markdown header (required shape) | ||
|
|
||
|
|
@@ -39,7 +58,7 @@ Prefer keeping `README.adoc` when the repo is AsciiDoc-native **except** major u | |
| <p align="center"> | ||
| project_description | ||
| <br /> | ||
| <a href="DOCS_OR_REPO"><strong>Explore the docs »</strong></a> | ||
| <a href="https://docs.devcentr.org/COMPONENT/"><strong>Explore the docs »</strong></a> | ||
| <br /> | ||
| <br /> | ||
| <a href="DEMO_OR_OMIT">View Demo</a> | ||
|
|
@@ -51,7 +70,7 @@ Prefer keeping `README.adoc` when the repo is AsciiDoc-native **except** major u | |
| </div> | ||
| ``` | ||
|
|
||
| Omit license badge / demo / docs links when absent. Collapsible TOC via `<details>` is fine. | ||
| Omit license / demo / docs links when absent. Point **Explore the docs** at the org hub component URL when the org has a docs site. Collapsible TOC via `<details>` is fine when the README has more than three sections. | ||
|
|
||
| ### Built With (outside the HTML header) | ||
|
|
||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Strong guidance. This repo still lacked a changelog at PR open — a follow-up PR adds
changelog.adoc+changelog-details/backfilled from git history and wires it into nav/README per these rules.