🇬🇧 Quick Start

Step 1: Install Hugo

brew install hugo
# or
port install hugo

To verify your new install:

Step 2: Create a New Site

The above will create a new Hugo site in a folder named quickstart.

Step 3: Add a Theme

See themes.gohugo.ioarrow-up-right for a list of themes to consider. This quickstart uses the beautiful Ananke themearrow-up-right.

First, download the theme from GitHub and add it to your site’s themes directory:

cd quickstart
git init
git submodule add https://github.com/budparr/gohugo-theme-ananke.git themes/ananke

Note for non-git users:

Then, add the theme to the site configuration:

Step 4: Add Some Content

You can manually create content files (for example as content//.) and provide metadata in them, however you can use the new command to do a few things for you (like add title and date):

Edit the newly created content file if you want, it will start with something like this:

Step 5: Start the Hugo server

Now, start the Hugo server with draftsarrow-up-right enabled:

Navigate to your new site at http://localhost:1313/arrow-up-right.

Feel free to edit or add new content and simply refresh in browser to see changes quickly (You might need to force refresh in webbrowser, something like Ctrl-R usually works).

Step 6: Customize the Theme

Your new site already looks great, but you will want to tweak it a little before you release it to the public.

Site Configuration

Open up config.toml in a text editor:

Replace the title above with something more personal. Also, if you already have a domain ready, set the baseURL. Note that this value is not needed when running the local development server.

For theme specific configuration options, see the theme sitearrow-up-right.

For further theme customization, see Customize a Themearrow-up-right.

Step 7: Build static pages

It is simple. Just call:

Output will be in ./public/ directory by default (-d/--destination flag to change it, or set publishdir in the config file).

Résumé des commandes sous linux

(commandes et test par @Léolios)

Thème dispo : https://themes.gohugo.io/themearrow-up-right

See Also

Mis à jour

Ce contenu vous a-t-il été utile ?