hugo/content/en/getting-started/quick-start.md
Bjørn Erik Pedersen 807c551922 Squashed 'docs/' changes from 6b00298bb..e5e98b950
e5e98b950 Update code-toggle.md
340c9c623 Update 'Fetch from Github' installation instructions in line with Github README
d9f06c23c Add tip about clearing browser cache (#608)
7c9df4731 Adding Remark as additional Comments Alternatives for hugo (#607)
b1ce8bf02 Revert "Temp change of baseURL"
fdbc582ff Temp change of baseURL
5ec663bd6 Fix wrong date in frontmatter config example (#602)
0b3022eb1 Fix broken link to https://www.wercker.com (#603)
b4a7e31a6 Turn off minification
bfcc1ac21 Add a Tweet
8be09c0b4 Remove unused data file

git-subtree-dir: docs
git-subtree-split: e5e98b950ca631c3135ac2f4446c79d71d2196be
2018-09-23 23:48:53 +02:00

140 lines
3.5 KiB
Markdown

---
title: Quick Start
linktitle: Quick Start
description: Create a Hugo site using the beautiful Ananke theme.
date: 2013-07-01
publishdate: 2013-07-01
categories: [getting started]
keywords: [quick start,usage]
authors: [Shekhar Gulati, Ryan Watters]
menu:
docs:
parent: "getting-started"
weight: 10
weight: 10
sections_weight: 10
draft: false
aliases: [/quickstart/,/overview/quickstart/]
toc: true
---
{{% note %}}
This quick start uses `macOS` in the examples. For instructions about how to install Hugo on other operating systems, see [install](/getting-started/installing).
You also need [Git installed](https://git-scm.com/downloads) to run this tutorial.
{{% /note %}}
## Step 1: Install Hugo
{{% note %}}
`Homebrew`, a package manager for `macOS`, can be installed from [brew.sh](https://brew.sh/). See [install](/getting-started/installing) if you are running Windows etc.
{{% /note %}}
```bash
brew install hugo
```
To verify your new install:
```bash
hugo version
```
{{< asciicast HDlKrUrbfT7yiWsbd6QoxzRTN >}}
## Step 2: Create a New Site
```bash
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](https://themes.gohugo.io/) for a list of themes to consider. This quickstart uses the beautiful [Ananke theme](https://themes.gohugo.io/gohugo-theme-ananke/).
```bash
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](/getting-started/usage/#draft-future-and-expired-content) 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/](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, though you may need to [clear your cache](https://kb.iu.edu/d/ahic).
{{% /note %}}
For theme specific configuration options, see the [theme site](https://github.com/budparr/gohugo-theme-ananke).
**For further theme customization, see [Customize a Theme](/themes/customizing/).**
## Recapitulation
{{< asciicast pWp4uvyAkdWgQllD9RCfeBL5k >}}