Skip to content

gethinode/theme-agency

Repository files navigation

Hinode - Agency theme

A Hinode-powered agency theme for Hugo, an open-source static site generator

Hugo website Hinode theme Last commit Issues Pulls License

About

Logo

Hinode is a clean blog theme for Hugo, an open-source static site generator. This repository provides an agency theme based on Hinode. The theme supports automation provided by npm and GitHub actions. Visit the docs for an alternative installation that uses Hugo only.

Prerequisites

Hinode is a theme that uses Hugo modules to install and maintain various components. The Hinode agency theme requires the following software to be installed on your local machine. The Hugo binary itself is embedded as an npm binary.

Installation

  1. Create a new repository

    Click the button Use this template to initialize a new repository based on this template (log in to GitHub if needed).

  2. Clone a local copy

    Replace owner/my-hinode-site with your organization and repository name and run the following command:

    git clone https://github.com/owner/my-hinode-site && cd my-hinode-site
  3. Install the npm packages and hugo modules

    npm install && npm run mod:update

You can now run npm run start to start a local development server.

Using pnpm (optional)

This theme uses npm by default. If you prefer pnpm — faster installs, a shared package store, a 24-hour supply-chain quarantine, and stricter dependency isolation — switch with the following steps after cloning.

  1. Replace the lockfile:

    pnpm import          # seed pnpm-lock.yaml from package-lock.json
    rm package-lock.json
  2. Pin pnpm in package.json (use your installed pnpm version):

    "packageManager": "pnpm@10.0.0"
  3. Add a .npmrc for the supply-chain quarantine:

    # Reject any version published less than 24h ago.
    minimum-release-age=1440
  4. Add pnpm-workspace.yaml:

    allowBuilds:
      hugo-extended: true # downloads the platform-specific Hugo binary
    minimumReleaseAgeExclude:
      - "@gethinode/*"
  5. Restore PostCSS compatibility. Hugo needs an npm-format postcss bin shim, which pnpm does not create. Add cmd-shim and a postinstall step:

    pnpm add -D cmd-shim

    Create scripts/fix-postcss-bin.cjs:

    const fs = require('fs');
    const path = require('path');
    const cmdShim = require('cmd-shim');
    
    const entry = path.join('node_modules', 'postcss-cli', 'index.js');
    const target = path.join('node_modules', '.bin', 'postcss');
    if (fs.existsSync(entry)) {
      fs.mkdirSync(path.dirname(target), { recursive: true });
      cmdShim(entry, target).catch((e) => {
        console.error('fix-postcss-bin:', e.message);
        process.exit(1);
      });
    }

    Then add to your package.json scripts: "postinstall": "node scripts/fix-postcss-bin.cjs".

  6. Install and build:

    pnpm install
    pnpm run build

If you use the bundled GitHub Actions workflows, update them to use pnpm as well — replace the npm ci/npm i install steps with pnpm install (which runs the postinstall shim above).

About

A Hinode-powered agency theme for Hugo, an open-source static site generator

Resources

License

Stars

0 stars

Watchers

1 watching

Forks

Contributors

Generated from gethinode/template