Hugo static-site source for the DbGate documentation, published at dbgate.io. This repo contains no application code — only Markdown content, a small set of theme overrides, and site config. The visual theme (hugo-theme-relearn) is a git submodule, not vendored source.
- Hugo extended (currently builds with v0.140.x)
- Node.js and yarn
# first-time setup / after pulling — fetches the theme submodule
git submodule update --init --recursive
# install JS deps (pulls in @mdi/font icons and copies them into static/mdi via postinstall)
yarn install
# local dev server with live reload, served at http://localhost:1313
hugo server
# production build — output goes to public/
hugo --gc --minifyThere is no lint, test, or typecheck command in this repo — it's Markdown content plus Hugo templates.
content/— all documentation pages, one Markdown file per page. The site home page (content/_index.md) is a product picker. Top-level entries are the products:dbgate-classic/(the desktop/self-hosted app —getting-started/,working-with-data/,database-operations/,customization/,admin/,developer/categories plusdbgate-cloud.mdnested underneath), and the hosted productsdbgate-lite.md,dbgate-central/,dbgate-shopify-app.md. A section directory needs an_index.mdfor its landing page, and can nest further sections (e.g.dbgate-classic/getting-started/installation/,dbgate-central/). Ordering within the left nav is controlled by theweightfront matter field (lower = earlier), not by filename or directory order. Pages moved between categories carry analiases:front matter entry pointing at their old URL, so existing links keep working.layouts/— thin overrides/additions on top of thehugo-theme-relearnsubmodule theme:layouts/partials/overrides theme partials (custom-header.html,favicon.html,logo.html).layouts/shortcodes/defines custom Hugo shortcodes used throughoutcontent/:{{< mdi "icon-name" >}}(Material Design Icons),{{< check >}}(checkmark, used in the database support matrix),{{< center >}}(centers content, e.g. table headers).
themes/hugo-theme-relearn/— git submodule; do not edit directly. Theme-level look-and-feel changes belong inassets/css/theme-dbgate.css(thedbgatetheme variant referenced bythemeVariantinhugo.toml) or in thelayouts/overrides above.hugo.toml— site config. Notable:markup.goldmark.renderer.unsafe = true(raw HTML in Markdown is allowed),sitemap.exclude = ["purchase"], theme variant isdbgate.static/— files served as-is at the site root (favicon, screenshots referenced from content, MDI font files copied in by thepostinstallyarn script — don't hand-editstatic/mdi/).
Images referenced from content/*.md are mostly hotlinked from https://media.dbgate.io/img/... rather than stored in this repo; a smaller set of local screenshots lives under static/img/ and static/screenshots/.
Two CI paths exist:
.github/workflows/azure-static-web-apps-ambitious-pebble-0eed14903.yml— active workflow, builds withyarn install && hugoand deploys to Azure Static Web Apps on push/PR tomaster..github/workflows/hugo.yaml.bak— disabled (.bak) GitHub Pages deployment workflow, kept for reference.
Both build against the submodule theme, so a PR that updates themes/hugo-theme-relearn must commit the new submodule commit pointer, and CI must check out with submodules enabled.