32356e4e Fix typo in header of shortcode-templates.md c8f1a2d2 Correct code example for index template function bfa6a55d Escape code fencing ff8b2f99 Fix typos in deployment with wercker tutorial 557c36e8 theme: Merge commit '7fbb4bed25001182bfeb91f79db0f0c1936582ee' 7fbb4bed Squashed 'themes/gohugoioTheme/' changes from 7dd8a302..ca53082d ce31cee0 Add "See Also" config 158cee1b Make the tags into keywords 61600be6 Add a note to the related section 49edb5a2 Relase 0.27.1 c9bbc001 releaser: Add release notes to /docs for release of 0.27.1 213c6c3b Add bugs poster 8b4590cd Add KeyCDN integration tutorial 2b277859 Add tutorial videos to several docs pages 950fef1f Update roadmap to link to the correct milestones page 496f5bf6 Rename relnotes d6f9378d Bump Netlify versions to 0.27 087fde7f Update 0.27 release notes 603f94ae docs: Document Related Content 3790f6a3 releaser: Bump versions for release of 0.27 0948868c releaser: Add release notes to /docs for release of 0.27 git-subtree-dir: docs git-subtree-split: 32356e4eabe357ae914f4d1d59e8ae31ce936723
3.4 KiB
title | linktitle | description | date | publishdate | categories | keywords | authors | menu | weight | sections_weight | draft | aliases | toc | |||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Quick Start | Quick Start | Create a Hugo site using the beautiful Ananke theme. | 2013-07-01 | 2013-07-01 |
|
|
|
|
10 | 10 | false |
|
true |
{{% note %}}
This quick start uses macOS
in the examples. For instructions about how to install Hugo on other operating systems, see install.
You also need Git installed to run this tutorial. {{% /note %}}
Step 1: Install Hugo
{{% note %}}
Homebrew
, a package manager for macOS
, can be installed from brew.sh. See install if you are running Windows etc.
{{% /note %}}
brew install hugo
To verify your new install:
hugo version
{{< asciicast HDlKrUrbfT7yiWsbd6QoxzRTN >}}
Step 2: Create a New Site
hugo new site quickstart
The above will create a new Hugo site in a folder named quickstart
.
{{< asciicast 1PH9A2fs14Dnyarx5v8OMYQer >}}
Step 3: Add a Theme
See themes.gohugo.io for a list of themes to consider. This quickstart uses the beautiful Ananke theme.
cd quickstart;\
git init;\
git submodule add https://github.com/budparr/gohugo-theme-ananke.git themes/ananke;\
# Edit your config.toml configuration file
# and add the Ananke theme.
echo 'theme = "ananke"' >> config.toml
{{< asciicast WJM2LEZQs8VRhNeuZ5NiGPp9I >}}
Step 4: Add Some Content
hugo new posts/my-first-post.md
Edit the newly created content file if you want. Now, start the Hugo server with drafts enabled:
▶ hugo server -D
Started building sites ...
Built site for language en:
1 of 1 draft rendered
0 future content
0 expired content
1 regular pages created
8 other pages created
0 non-page files copied
1 paginator pages created
0 categories created
0 tags created
total in 18 ms
Watching for changes in /Users/bep/sites/quickstart/{data,content,layouts,static,themes}
Serving pages from memory
Web Server is available at http://localhost:1313/ (bind address 127.0.0.1)
Press Ctrl+C to stop
Navigate to your new site at http://localhost:1313/.
Step 5: 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:
baseURL = "https://example.org/"
languageCode = "en-us"
title = "My New Hugo Site"
theme = "ananke"
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.
{{% note %}} Tip: Make the changes to the site configuration or any other file in your site while the Hugo server is running, and you will see the changes in the browser right away. {{% /note %}}
For theme specific configuration options, see the theme site.
For further theme customization, see Customize a Theme.
Recapitulation
{{< asciicast pWp4uvyAkdWgQllD9RCfeBL5k >}}