Skip to content

Document installing Docsy from the npm registry - #2688

Merged
chalin merged 19 commits into
docsy:mainfrom
chalin:chalin-m24-npm-install-docs-2026-0725
Jul 26, 2026
Merged

chalin merged 19 commits into
docsy:mainfrom
chalin:chalin-m24-npm-install-docs-2026-0725

Conversation

@chalin

@chalin chalin commented Jul 25, 2026 •

Copy link
Copy Markdown
Collaborator
  • Contributes to Publish theme to the npm registry as @docsy/theme #2683
  • Installation direction — the get-started guide's npm option now leads with the registry install (@docsy/theme); git/GitHub installs move to a development-versions note (existing anchors preserved); the npm option is also surfaced on the get-started landing page and in the README
  • Release safeguards:
    • Support policy defines what an official release is, per install channel
    • Registry smoke test always runs
    • Minimum Hugo version now has one canonical home: the theme's module config
  • Version interpolation fix — install commands now render tdVersion.latest, a resolvable release tag in every site environment, instead of version, which identifies the site variant and is a dev identifier outside production; the published site variants are now documented in the git-repo page
  • Package boundary — AGENTS.md documents how the theme directory is addressed when building the site from a theme checkout
  • Merge timing — documented install commands and the README badge resolve 0.16.0-rc.1 until the tag-time stable publish re-points latest; merge close to tag time
  • Deferred — the 0.16.0 release post's install snippet keeps the git flow; that delta belongs to the release-artifacts refresh
  • Previews:

chalin added 19 commits July 25, 2026 07:23
- Rewrites get-started Option 3 to lead with the @docsy/theme registry
  package; git/GitHub installs move to a dev-versions note
- Lists the npm option first on the get-started landing page; adds npm
  version badge and install-mode mention to the README
- Existing section anchors unchanged, so inbound links keep working
- Rewords the page-intro npm pitch to the no-extra-toolchain
  differentiator, avoiding a second "simplest" claim alongside the
  Hugo Modules option
- Links the GitHub revision-selector summary to the npm-install docs,
  its canonical home
Site builds hardcode --themesDir ../.. with theme: docsy/theme, so
builds fail from a checkout not named docsy, such as a git worktree.
Documents the HUGO_THEME override that unblocks such checkouts.
Extends the latest-release support bullet to define an official
release as a stable semver vX.Y.Z, identical whether consumed as a
GitHub release, git tag, or the @docsy/theme npm package, and
classifies pre-releases and main as unsupported development versions
- matching the terms the registry-install docs link here for.
theme.toml's min_version was declared the canonical source, contrary to
current upstream guidance: Hugo reads it only as a fallback when the
module config sets no version, and even the themes-showcase README now
homes version support in the module config. Flip canonicality to
theme/hugo.yaml module.hugoVersion.min and describe theme.toml's actual
role (legacy descriptor; showcase-only, ingested from the git repo) --
which also documents why the npm package's files allowlist omits it.
Follow-up to 3e0626b, which named theme/hugo.yaml module.hugoVersion.min
the canonical min-version home while the tests still read theme.toml:

- hugo-versions.test.mjs: theme/hugo.yaml now anchors the sync assertion,
  the <=-pin check, and the blog-post freeze values; theme.toml remains in
  the sync guard as a declaration that must agree.
- smoke.test.mjs: pin the min-Hugo build from module.hugoVersion.min.
- Maintainer notes: theme.toml's sole remaining *external* consumer is the
  themes showcase (the sync guard still reads it).
@docsy/theme now permanently has a `latest` dist-tag (first publish set
it, and it can only be re-pointed, never removed), so the install-time
skip — keyed to DOCSY_THEME_PKG being unset, with a message claiming no
version exists under `latest` — had become a false-green: a plain
`npm run test:smoke`, the prescribed stable-publish vet, went green
while skipping the registry path the docs now lead with.

Run the test unconditionally: default to the bare `@docsy/theme` spec
(evergreen — resolves to whatever `latest` serves plain-install users),
keep DOCSY_THEME_PKG as the RC/version override, and surface the spec
under vet in the test name.

Proven red (bogus version override fails the install assertion) and
green (default run: 1 pass, 0 skip — was 0 pass, 1 skip).
DRY audit follow-up on the get-started guide (both spots already link
their canonical home):

- The guide intro repeated the chooser page's no-extra-toolchain
  rationale for the npm option; now it just names and links the option.
- The GitHub-install note restated npm's #/#semver: selector grammar;
  now it defers to the linked npm install reference.
The smoke suite reuses the extraction regex from hugo-versions.test.mjs
rather than importing it: each suite runs standalone (importing a .test
file would execute its tests), and drift fails loud via the adjacent
assert. A comment now records that and names the sync anchor.
- Install commands render `tdVersion.latest` instead of `version`, which is a dev identifier outside production and a prose label on the doc-rooted variant
- Documents the published site variants (branch, version params) in git-repo.md; a params.yaml comment and an AGENTS.md bullet carry the version-vs-release-ref rule
@chalin
chalin marked this pull request as ready for review July 26, 2026 12:52
@chalin
chalin merged commit 9b1d995 into docsy:main Jul 26, 2026
16 checks passed
@chalin
chalin deleted the chalin-m24-npm-install-docs-2026-0725 branch July 26, 2026 12:53
chalin added a commit to chalin/docsy that referenced this pull request Jul 27, 2026
- States what the channel is for rather than what it is not, matching the other-options.md framing from docsy#2688; policy is the home, post and changelog entry summarize + link
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant