Hugo Framework

Website: https://gohugo.io

Installation

Quelle: https://gohugo.io/installation/macos/

  1. To install the extended edition of Hugo:
brew install hugo
  1. To build the extended or extended/deploy edition from source you must:

    1. Install Git
    2. Install Go version 1.23.0 or later
    3. Install a C compiler, either GCC or Clang
  2. To build the standard edition:

go install github.com/gohugoio/hugo@latest

Hugo starten

Hugo-Verzeichnis anlegen:

Create the directory structure for your project in the quickstart directory.

hugo new site quickstart

Change the current directory to the root of your project.

cd quickstart

Theme installieren (Option 1):

1 Change into the themes directory and download a theme by replacing URL_TO_THEME with the URL of the theme repository:

cd themes
git clone URL_TO_THEME

Theme installieren (Option 2):

Initialize an empty Git repository in the current directory.

git init

Clone the Ananke theme into the themes directory, adding it to your project as a Git submodule.

git submodule add https://github.com/theNewDynamic/gohugo-theme-ananke.git themes/ananke

Append a line to the site configuration file, indicating the current theme.

echo "theme = 'ananke'" >> hugo.toml

Server starten

Start Hugo’s development server to view the site.

hugo server

alternativ:

hugo server --minify --theme [themename]

Press Ctrl + C to stop Hugo’s development server.

Website aufrufen:

http://localhost:1313/

Befehle

Add a new page to your site.

hugo new content content/posts/my-first-post.md

Themes

Übersicht: https://themes.gohugo.io

Hugo Book Theme: https://themes.gohugo.io/themes/hugo-book/

LoveIt Theme: https://themes.gohugo.io/themes/loveit/

Doks: https://themes.gohugo.io/themes/doks/


  1. Quelle: https://gohugobrasil.netlify.app/themes/installing-and-using-themes/ ↩︎