Hugo Theme for ChinaGearLab.com website.
  • CSS 48.4%
  • HTML 46.3%
  • JavaScript 4.1%
  • PHP 1.2%
Find a file
2026-08-03 05:28:48 +00:00
_design Scaffold theme repo: tokens, mockups, assets, archetype 2026-08-02 11:15:57 +00:00
archetypes/reviews Convert categories from single-item list to scalar field 2026-08-03 00:15:15 +00:00
assets Add click-to-enlarge lightbox for gallery and teardown photos 2026-08-03 04:46:08 +00:00
layouts Fix mail header injection vuln and add honeypot to contact form 2026-08-03 05:28:48 +00:00
static Fix mail header injection vuln and add honeypot to contact form 2026-08-03 05:28:48 +00:00
.gitignore Scaffold theme repo: tokens, mockups, assets, archetype 2026-08-02 11:15:57 +00:00
README.md Replace static owned_for string with dynamic owned_since date 2026-08-02 19:12:41 +00:00
theme.toml Scaffold theme repo: tokens, mockups, assets, archetype 2026-08-02 11:15:57 +00:00

ChinaGearLab Hugo Theme

A dense, catalogue-style Hugo theme for ChinaGearLab — a one-person review catalogue of Chinese-market tools and test equipment. No star ratings; every review resolves to a three-state verdict pill (yes / maybe / no) with an owned-for stamp. Teardown photography is the differentiator.

Requires: Hugo Extended (for Hugo Pipes asset processing)


Installation

As a theme directory

# From your site root:
git clone https://git.wiredincode.com/WiredInCode/chinagearlab-hugo-theme.git themes/chinagearlab

Then set theme = "chinagearlab" in your hugo.toml.


Content structure

content/
├── _index.md               # Homepage front matter (intro, stats)
├── reviews/
│   ├── _index.md
│   └── my-review.md
├── categories/              # optional — pin a category's slug/intro copy
│   └── power-tools/_index.md
├── about/
│   └── _index.md
├── buying-guides/
│   └── _index.md            # plain content page, not a review list
└── contact/
    └── _index.md            # renders the contact form (layouts/contact/list.html)

See archetypes/reviews.md for the full review front-matter schema (verdict, price history, specs, pros/cons, gallery, teardown). Note owned_since is a date (when you started using the product) — the "owned N weeks/months" text is computed live in the browser from that date via layouts/partials/owned-duration.html + assets/js/main.js, so it never goes stale between rebuilds. It is deliberately not the same as the front-matter date (which is the publish date).


Build

hugo server                    # dev
hugo --minify                   # production build
npx pagefind --site public      # rebuild the search index — do this after every build

The site repo's deploy.sh runs the last two steps together.


Design reference

The _design/ directory contains the original design handoff files (token CSS, base design system CSS, .dc.html mockups). These are not included in any Hugo build output — Hugo ignores _-prefixed directories. See _design/cgl-tokens.css for the source of truth on colour/type tokens.


License

MIT