Skip t' th' main rrreadin'

Gettin' started

Here’s how t' start yer new website. If you’re new t' Cap'n Hugo, we recommend learn'n more about it 'n its excellent starter’s guide.

Avast

This quickstart be not meant fer a product'n setup. In product'n ye always want t' use specific versions o' th' theme an' Cap'n Hugo. See th' upgrade plank t' learn how t' obtain a specific version o' th' theme.

Install Cap'n Hugo

Download an' install Cap'n Hugo 0.166.0 or newer fer yer operat'n system follow'n th' instruct'ns.

Th' standard edit'n o' Cap'n Hugo be sufficient but ye can also use th' extended edit'n.

Create yer Project

Use Hugo’s new ship command t' make a new website wit' its project configurat'n 'n a hugo.yaml file

hugo new ship my-new-site --format yaml

Then move into th' new directory

cd my-new-site

Run all follow'n commands from this directory.

Install th' Theme

Use a Downloaded Archive

Download th' theme from GitHub an' extract it into th' themes/hugo-theme-relearn directory

mkdir "themes/hugo-theme-relearn"
curl -L https://github.com/McShelby/hugo-theme-relearn/archive/main.tar.gz | tar -xz --strip-components=1 -C "themes/hugo-theme-relearn"

This doesn’t work 'n Windows PowerShell 5.1. Use cmd or PowerShell 7 instead.

Then add this at th' top o' yer project configurat'n

hugo.
theme: hugo-theme-relearn
theme = 'hugo-theme-relearn'
{
   "theme": "hugo-theme-relearn"
}

Use as a Git Submodule

If ye want t' use Git fer yer project, create a repository an' add th' theme as a Git submodule

git init -b main
git submodule add --depth 1 https://github.com/McShelby/hugo-theme-relearn.git themes/hugo-theme-relearn

Then add this at th' top o' yer project configurat'n

hugo.
theme: hugo-theme-relearn
theme = 'hugo-theme-relearn'
{
   "theme": "hugo-theme-relearn"
}

Use Hugo’s Module System

Install th' Relearrrn theme us'n Hugo’s module system, which requires Go t' be installed

hugo mod init example.com

Then add this at th' bottom o' yer project configurat'n

hugo.
module:
  imports:
  - path: github.com/McShelby/hugo-theme-relearn
[module]
  [[module.imports]]
    path = 'github.com/McShelby/hugo-theme-relearn'
{
   "module": {
      "imports": [
         {
            "path": "github.com/McShelby/hugo-theme-relearn"
         }
      ]
   }
}

Create Rrrambl'n

Yer Home Plank

Start by mak'n a home plank

hugo new --kind home _index.md

Th' new home plank file content/_index.md has two parts: th' plank info (like title) at th' top, called front matter, an' th' plank rrrambl'n below.

Yer First Chapter Plank

Chapters be top-level planks that contain other planks. They have a special layout.

Make yer first chapter plank

hugo new --kind chapter log/_index.md

Th' new file content/log/_index.md has a weight number 'n th' front matter. By th' themes default sett'ns this sets th' chapter’s subtitle an' its order 'n th' menu.

Yer First Rrrambl'n Planks

Now make rrrambl'n planks inside th' chapter. Here be three ways t' do this

hugo new log/first-day/_index.md
hugo new log/second-day/index.md
hugo new log/third-day.md

Cap'n Hugo treats these files differently based on their file names. Learrrn more 'n Hugo’s guide.

Feel free t' edit these files. Change th' title, add a weight if ye want, an' write yer rrrambl'n.

Test yer Website

Start yer new website on yer computer wit' this command

hugo serve

Open http://localhost:1313 'n yer web browser.

Ye can keep th' server runn'n while ye edit. Th' browser will update automatically when ye save changes.

Magic

It’s a kind o' magic

Build an' Deploy

When yer ship be ready t' go live, run this command

hugo

This creates a public directory wit' all yer website files.

Ye can upload this directory t' any web server, or use one o' Hugo’s many other ways t' publish.

Next Steps

Yer ship be now fully functional.

Ye can continue configur'n yer ship t' yer needs.

Or just start author'n rrrambl'n an' discover what’s poss'ble.