Fieldnotesv1.1.2

Create your site

A new Hugo project, Fieldnotes added to it, and the settings to make it run.

A new project

In a terminal, go to the folder where your site should live, then:

sh
hugo new project my-site
cd my-site
git init

my-site is now a folder with content/, assets/, layouts/, static/ and a settings file, hugo.toml. Open the folder in your editor.

Add the theme

Make your site a module (the name is any address-like name for your site; it doesn’t have to exist):

sh
hugo mod init github.com/you/my-site

Name Fieldnotes in hugo.toml, in the settings below, under [module], then download it:

sh
hugo mod get github.com/maxfettinger/fieldnotes@latest

Later, hugo mod get -u updates the theme to its newest version.

The settings

Replace everything in hugo.toml with this, then put in your name and description:

hugo.toml
baseURL = "https://example.org/"
locale = "en-US"
title = "Jane Doe"
disableKinds = ["taxonomy", "term"]   # no tag pages: Fieldnotes doesn't show tags yet

[module]
  [[module.imports]]
    path = "github.com/maxfettinger/fieldnotes"

# Four Markdown settings Fieldnotes needs but can't set itself
[markup.highlight]
  noClasses = false                          # code in the colour scheme's colours
[markup.goldmark.parser]
  wrapStandAloneImageWithinParagraph = false # a photo with a title gets a caption
[markup.goldmark.extensions.passthrough]
  enable = true                              # maths reaches MathJax untouched
  [markup.goldmark.extensions.passthrough.delimiters]
    block = [['\[', '\]'], ['$$', '$$']]
    inline = [['\(', '\)']]

[[menus.main]]
  name = "Posts"
  pageRef = "/posts"
  weight = 10
[[menus.main]]
  name = "About"
  pageRef = "/about"
  weight = 20

[params]
  description = "Jane Doe writes about long bike trips and numerical analysis."
  mainSections = ["posts"]
  socialIcons = [
    { name = "github", url = "https://github.com/jane" },
    { name = "email", url = "mailto:jane@example.org" },
  ]

  [params.author]
    name = "Jane Doe"

baseURL is your site’s address once it’s online; for now any address works. mainSections names the sections whose posts the home page lists. The configuration reference lists every setting.

In TOML, a line after a [table] header belongs to that table. Keep plain [params] lines like socialIcons above [params.author] and any other [params.something], or they end up inside it.

The home page and an About page

Create content/_index.md, your home page:

content/_index.md
---
title: "Jane Doe"
greeting: "Hi, I'm Jane,"
---

a PhD student in numerical analysis, and a cyclist in the summer.

and content/about.md:

content/about.md
---
title: "About"
---

A few sentences about you.

Run it

sh
hugo server

Hugo builds the site and keeps it up to date while you edit. Open the address it prints, usually http://localhost:1313/ (opens in a new tab). Stop it with Ctrl+C.

The home page shows your greeting and the icons, the header the menu. Next: your first post.