github.com/rabbouni145/gg@v0.47.1/docs/content/en/getting-started/quick-start.md (about)

     1  ---
     2  title: Quick Start
     3  linktitle: Quick Start
     4  description: Create a Hugo site using the beautiful Ananke theme.
     5  date: 2013-07-01
     6  publishdate: 2013-07-01
     7  categories: [getting started]
     8  keywords: [quick start,usage]
     9  authors: [Shekhar Gulati, Ryan Watters]
    10  menu:
    11    docs:
    12      parent: "getting-started"
    13      weight: 10
    14  weight: 10
    15  sections_weight: 10
    16  draft: false
    17  aliases: [/quickstart/,/overview/quickstart/]
    18  toc: true
    19  ---
    20  
    21  {{% note %}}
    22  This quick start uses `macOS` in the examples. For instructions about how to install Hugo on other operating systems, see [install](/getting-started/installing).
    23  
    24  You also need [Git installed](https://git-scm.com/downloads) to run this tutorial.
    25  {{% /note %}}
    26  
    27  
    28  
    29  ## Step 1: Install Hugo
    30  
    31  {{% note %}}
    32  `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.
    33  {{% /note %}}
    34  
    35  ```bash
    36  brew install hugo
    37  ```
    38  
    39  To verify your new install:
    40  
    41  ```bash
    42  hugo version
    43  ```
    44  
    45  
    46  {{< asciicast HDlKrUrbfT7yiWsbd6QoxzRTN >}}
    47  
    48  
    49  ## Step 2: Create a New Site
    50  
    51  ```bash
    52  hugo new site quickstart
    53  ```
    54  
    55  The above will create a new Hugo site in a folder named `quickstart`.
    56  
    57  {{< asciicast 1PH9A2fs14Dnyarx5v8OMYQer >}}
    58  
    59  
    60  ## Step 3: Add a Theme
    61  
    62  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/).
    63  
    64  ```bash
    65  cd quickstart;\
    66  git init;\
    67  git submodule add https://github.com/budparr/gohugo-theme-ananke.git themes/ananke;\
    68  
    69  # Edit your config.toml configuration file
    70  # and add the Ananke theme.
    71  echo 'theme = "ananke"' >> config.toml
    72  ```
    73  
    74  
    75  {{< asciicast WJM2LEZQs8VRhNeuZ5NiGPp9I >}}
    76  
    77  ## Step 4: Add Some Content
    78  
    79  ```
    80  hugo new posts/my-first-post.md
    81  ```
    82  
    83  
    84  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:
    85  
    86  ```
    87  ▶ hugo server -D
    88  
    89  Started building sites ...
    90  Built site for language en:
    91  1 of 1 draft rendered
    92  0 future content
    93  0 expired content
    94  1 regular pages created
    95  8 other pages created
    96  0 non-page files copied
    97  1 paginator pages created
    98  0 categories created
    99  0 tags created
   100  total in 18 ms
   101  Watching for changes in /Users/bep/sites/quickstart/{data,content,layouts,static,themes}
   102  Serving pages from memory
   103  Web Server is available at http://localhost:1313/ (bind address 127.0.0.1)
   104  Press Ctrl+C to stop
   105  ```
   106  
   107  
   108  **Navigate to your new site at [http://localhost:1313/](http://localhost:1313/).**
   109  
   110  
   111  
   112  ## Step 5: Customize the Theme
   113  
   114  Your new site already looks great, but you will want to tweak it a little before you release it to the public.
   115  
   116  ### Site Configuration
   117  
   118  Open up `config.toml` in a text editor:
   119  
   120  ```
   121  baseURL = "https://example.org/"
   122  languageCode = "en-us"
   123  title = "My New Hugo Site"
   124  theme = "ananke"
   125  ```
   126  
   127  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. 
   128  
   129  {{% note %}}
   130  **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.
   131  {{% /note %}}
   132  
   133  
   134  For theme specific configuration options, see the [theme site](https://github.com/budparr/gohugo-theme-ananke).
   135  
   136  **For further theme customization, see [Customize a Theme](/themes/customizing/).**
   137  
   138  ## Recapitulation
   139  
   140  {{< asciicast pWp4uvyAkdWgQllD9RCfeBL5k >}}