Repository tour
This page goes through every file and directory of a pgsty/oink.pgsty.com
clone: what must stay, what to replace with your own details, what belongs to
the documentation site and can be deleted whole — plus a safe order to delete
in.
The theme’s code is not in this repository. It is a Hugo Module pinned by
go.mod and stored in Go’s module cache. This repository holds content,
configuration, and a small number of site-level overrides.
Top-level structure
the cloned my-docs/
my-docs/
- hugo.ymlthe site's only configuration: identity, languages, menus, params, module imports
- go.modpins the theme version
- go.sumchecksums for the theme module
content/all content; the directory structure is the sidebar structure
- _index.mdhome page; _index.zh.md is its Chinese counterpart
- search.mdresults page for Google Programmable Search; delete if unused
- docs/documentation tree: OINK's own theme documentation
- blog/blog: engineering notes and release announcements
assets/resources that go through Hugo processing
- scss/site style overrides, three partials
- images/images that need resizing or cropping
- parts/Markdown and YAML fragments pulled in by the include shortcode
static/copied to the site root as is, unprocessed
- logo.svgbrand lockup; no parameter points at it
- favicon.svgbrowser tab icon
- favicon.ico
- apple-touch-icon.pngiOS add-to-home-screen
- images/screenshots and diagrams
layouts/site template overrides: override the narrowest one
- _shortcodes/the site's own shortcodes
data/data-driven pages
- home/home page sections: en.yaml / zh.yaml
- landing/landing page data
- download/release and download page data
.github/
- workflows/pages.yml deploys; the other two are this site's regression tests
tests/documentation site only: Playwright, goldens, build assertions
- browser/Playwright specs
- hugo-build/build assertions
- md-output/Markdown output goldens
- alt-site/alternate-configuration builds
- favicons/
- release-pin/
- fixtures/
scripts/documentation site only: translation parity and link checks
- check-doc-translations.mjs
- check-markdown-style.mjs
- check-rendered-links.mjs
- check-rendered-markdown.mjs
- check-release-pin.mjs
- Makefilebuild / serve call Hugo directly; dev / check point at a sibling ../oink
- package.jsonthe test toolchain; not used to build the site
- package-lock.json
- playwright.config.mjs
- agent-docs.config.ymlconfiguration for the agent-documentation scoring tool
- AGENTS.mdrepository notes for coding agents
- TRANSLATION.mdthe bilingual translation process
- CONTRIBUTING.md
- README.md
- LICENSEApache-2.0, for the site code
- LICENSE-CC-BY-4.0content licence
- NOTICE
Not listed above: .gitignore, .gitattributes, .nvmrc, .npmrc, and the
generated output excluded by .gitignore — public/ (build output),
resources/ (Hugo’s resource cache) and node_modules/. That last group never
enters version control.
There is no i18n/ in the repository: interface strings (“Previous”, “On this
page” and the like) come from the theme’s 32 language files. To change one of
them, create i18n/zh.yaml at the site root and write only the keys you
override.
What to do with each entry
| Path | What it is | What to do after forking |
|---|---|---|
hugo.yml |
The site’s only configuration file — no config/ directory and no per-environment overrides |
Replace with your details: identity, languages, menus, brand |
go.mod go.sum |
Pin the theme version and record its checksums | Must stay, and both are committed |
content/ |
All content; the directory structure decides the sidebar structure | Must stay; replace the docs/ and blog/ inside it with your own |
content/search.md |
A full-page search results page (layout: search); it only has content when Google Programmable Search is configured (params.gcs_engine_id) |
Delete it when using the theme’s local search |
assets/scss/ |
Site style overrides (_variables_project.scss and friends) |
Keep it to change colours and fonts; empty it if you change neither |
assets/images/ |
Images that need Hugo processing (resize, crop) | Replace with your own |
assets/parts/ |
Fragments the include shortcode pulls in |
Replace or delete with the pages that use them |
static/ |
Copied to the site root as is | Replace with yours: logo, favicon, screenshots |
layouts/_shortcodes/ |
This site’s four shortcodes, none referenced by current content | Can be deleted |
data/home/ |
Home page section data (hero, capability panels) | Change to yours; delete it and the home page falls back to an ordinary page |
data/landing/ data/download/ |
Data for landing pages and the release/download page | Delete if unused |
.github/workflows/pages.yml |
Builds and publishes to GitHub Pages on a push to main |
Keep, adjusted for your repository |
.github/workflows/site-checks.yml browser-quality.yml |
This site’s regression pipelines | Documentation site only; can be deleted |
tests/ scripts/ playwright.config.mjs package.json package-lock.json |
This site’s regression tests and check tooling | Documentation site only; can be deleted |
Makefile |
Shortcuts for developing the theme and the site together (expects a sibling ../oink) |
Documentation site only; can be deleted |
AGENTS.md TRANSLATION.md CONTRIBUTING.md agent-docs.config.yml |
This site’s collaboration conventions | Replace with your own, or delete |
README.md LICENSE LICENSE-CC-BY-4.0 NOTICE |
Description and licences | Replace with your own |
.nvmrc .npmrc |
Node version and npm configuration | Delete along with package.json |
The package.json, tests/ and scripts/ in this repository maintain the
documentation site itself. Building your site is one command:
hugo --gc --minify.
Deletion order
Delete the periphery first, then the content, then the data. Build after each step so a problem points back at one step.
-
Drop the scaffolding
None of this takes part in rendering, and removing it affects no page.
After deleting
scripts/you must edit.github/workflows/pages.yml: remove theSet up Node.jsandVerify advertised and pinned release matchsteps, or the deploy fails there. -
Drop the example content
content/docs/is OINK’s own theme documentation andcontent/blog/its engineering blog; neither has anything to do with your product.Edit
menus.mainunder each language inhugo.ymlat the same time: those entries point at paths such as/docs/tutorialand/blog/releasethat no longer exist.content/_index.mdis the home page — keep it and replace the body with yours. -
Trim the data
The three groups under
data/feed the home page, landing pages and release pages. Keep the home page data and edit it; delete the other two if unused.data/home/en.yamlanddata/home/zh.yamldecide which sections the home page has; each entry is explained in Home and landing pages. Deletingdata/home/entirely still builds, and the home page falls back to an ordinary content page. -
Swap the identity
Finally, change the site name,
params.productionURL,params.github_repoand the brand parameters inhugo.ymlto yours, replace the logo and favicon understatic/, and delete the OINK-specific configuration:services.googleAnalytics,params.commentsand theparams.version*keys. The itemized list is in step 3 of Quick start.
Where the theme lives
The theme is referenced as a Hugo Module, and two places point at it:
hugo.yml declares which theme to use, go.mod pins which version of it, and
go.sum records that version’s checksums. All three files are committed. The
theme source never enters your repository: Hugo downloads it into Go’s module
cache, and hugo mod graph shows what actually resolved.
Upgrade to the newest version:
Pin to one version:
Both commands rewrite go.mod and go.sum. A production site pins a release
tag rather than following main. What to check before and after an upgrade, and
how to roll back, is in Upgrade.
Site overrides
Files under layouts/ shadow the theme’s files of the same name, following
Hugo’s template lookup order. This site has only one kind:
layouts/_shortcodes/*.html— the site’s own shortcodes. Product documentation that needs a shortcode with business meaning puts it here too.
Self-linking heading anchors come from the theme’s own
_markup/render-heading.html; a site does not need to build that hook.
To change the shell (sidebar, footer, page end), override the narrowest partial
rather than copying baseof.html wholesale — a copy has to be merged by hand at
every theme upgrade.
Verify
Build after each deletion step so an error points at what you just removed:
Once the deleting is done, all of this should hold:
- The build ends with
Total in …and noWARNorERROR - No navbar entry links to a deleted directory
- Headings still have their self-link anchors (the theme’s own heading render hook; the site needs no override)
git statusshows nopublic/orresources/
Related
- Quick start — the full clone, configure and deploy path
- From scratch and other install methods — building from an empty directory instead of trimming
- Organizing content — how the
content/tree becomes the sidebar - Configuration — every
hugo.ymlkey and its default - Upgrade — upgrading the theme module, and the migration toolkit