hextra/exampleSite/content/docs/getting-started.md
Xin 1c7962494d feat: add more content and fix issues
fix: hide lang switch if site is not multilingual

docs: update getting started page

fix: ordered list style

chore: update hugo icon

feat: add icon shortcode page

docs: add markdown and configuration pages

docs: add diagrams page

docs: add more content

fix: mermaid background and add image styling

chore: update templates

chore: update hugo stats
2023-08-20 00:41:26 +01:00

1.5 KiB

title weight
Getting Started 1

Start as New Project

Prerequisites

Before we start, make sure we have Hugo installed. Please refer to Hugo's official installation guide for more details.

Hugo modules are the recommended way to manage Hugo themes. To use Hugo modules, we need to install Git and Go.

{{% steps %}}

Initialize a new Hugo site

$ hugo new site my-site --format=yaml

Configure Hextra theme via module

# initialize hugo module
$ cd my-site
$ hugo mod init github.com/username/my-site

# add Hextra theme
$ hugo mod get github.com/imfing/hextra

Edit hugo.yaml to enable Hextra theme:

module:
  imports:
    - path: github.com/imfing/hextra

Create your first content pages

Let's create a new content page for the home page and the documentation page:

$ hugo new content/_index.md
$ hugo new content/docs/_index.md

Preview the site locally

$ hugo server

Voila! You can see your new site at http://localhost:1313/.

{{% /steps %}}

Next

Explore the following sections to start adding more contents:

{{< cards >}} {{< card link="organize-files" title="Organize Files" icon="document-duplicate" >}} {{< card link="configuration" title="Configuration" icon="adjustments" >}} {{< card link="markdown" title="Markdown" icon="markdown" >}} {{< /cards >}}