Install From Scratch

Getting started from scratch with HB cards theme to build your fast, responsive and modular static websites.

We offers an example site for getting started with this theme.

Requirements

  • Go
  • Hugo extended version
  • Node.js 16 or later

Read more on prerequisites.

Clone the Repository

1git clone --depth 1 https://github.com/hbstack/theme-cards

Copy the Example Site

1cp -r theme-cards/exampleSite mysite

Change Working Directory

1cd mysite

Tweak go.mod

Replace Module Path

The module path is the identifier of your site, which typically is your repo URL, take github.com/user/repo as an example, you’ll need to replace the module github.com/hbstack/theme-cards/exampleSite with module github.com/user/repo.

1sed -i '1s/.*/module github.com\/user\/repo/' go.mod

Delete the replace Directive

To build the site successfully, you’ll need to delete the internal used replace directive: replace github.com/hbstack/theme-cards => ../.

1sed -i '/^replace/d' go.mod

Install Dependencies

1npm ci

Hugo Module Proxy (Optional)

A Hugo module proxy is required when the default proxy isn’t accessible from your location, i.e. China.

Preview Locally

1npm run dev

What’s Next?

  1. Tweak Configurations, such as baseURL, giscus.* and so on.
  2. Remove testing content.
  3. Read the documentation.
  4. Find more modules.