Source of https://revive.run/, a Hugo site using the Lotus Docs theme.
Most of the content is generated from revive-lint/revive:
/docsfromREADME.md/rfromRULES_DESCRIPTIONS.md/imagesfromassets/
The generated site is committed to docs/ and served by GitHub Pages from the master branch.
The REVIVE_VERSION file holds the revive release the website was built from.
The Build workflow runs twice a month (and on workflow_dispatch):
if revive-lint/revive has a newer release, it checks out that tag, regenerates the site, and commits docs/ and REVIVE_VERSION to master.
Otherwise it does nothing.
To publish hand-written changes (landing page, guides, layouts, config) without a new revive release, run the workflow manually with the force input checked.
Requires Go and Hugo extended.
- Get the revive documentation:
git clone --depth 1 https://github.com/revive-lint/revive- Generate the content:
go run ./scripts/website- Start the local server:
hugo server -d /tmp/revive.run- Open http://localhost:1313/ in your browser.
Always pass -d to hugo server: without it the dev build (with localhost:1313 URLs) overwrites the committed docs/.
To rebuild docs/ the way CI does:
hugo --gc --minify --cleanDestinationDirHand-written:
hugo.yaml,go.mod,go.sum— site and theme configurationdata/landing.yaml— homepagecontent/docs/rule.md,content/docs/formatter.md— custom rule/formatter guidescontent/docs/api.md— sidebar entry redirecting to pkg.go.dev (the theme sidebar only links local pages, seelayouts/_default/redirect.html)layouts/partials/head.html,layouts/partials/docs/head.html— theme head partials without Lotus Docs' hardcoded description/author metadataassets/images/logos/— logo used in the headerstatic/— favicons,site.webmanifestandsw.jsscripts/website/— content generatorREVIVE_VERSION— revive release the published site is built from, updated by the Build workflow
Generated (git-ignored):
content/docs/documentation.md(/docs/),content/docs/rules.md(/r/),static/images/
Published (committed): docs/ — marked linguist-generated in .gitattributes, so GitHub collapses it in PR diffs.
static/sw.jsis a self-destroying service worker: the previous Gatsby site registered one, and without this file returning visitors would keep seeing the cached old site. Keep it deployed.- Links of the form
/r#<rule>and/r/#<rule>(the ones printed by revive) keep working: all rules live on the single/r/page and its heading anchors use GitHub-style slugs.