Skip to content
This repository was archived by the owner on Jul 26, 2026. It is now read-only.
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions exampleSite/config.toml
Original file line number Diff line number Diff line change
@@ -1,9 +1,13 @@
baseURL = "http://localhost:1313/subdir"
title = "Puppet"

# using theme as git clone or submodule (traditional)
theme = "puppet"
themesDir = "../.."

# using theme as hugo module (modern)
# theme = "github.com/roninro/hugo-theme-puppet"

copyright = ""
paginate = 3
languageCode = "en"
Expand Down
103 changes: 103 additions & 0 deletions exampleSite/content/posts/getting-started-2.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,103 @@
+++
title = "Puppet - Getting Started (hugo module)"
date = 2022-12-05T21:24:01+01:00
description = "Set up your new hugo site with theme puppet theme as hugo module"
header_img = ""
toc = true
tags = ["documentation", "guide"]
categories = []
series = []
+++

Puppet is a responsive, simple and clean [Hugo](https://gohugo.io/) theme based on the [Huxblog Jekyll theme](https://github.com/Huxpro/huxpro.github.io).

<!--more-->

## Install Hugo

Make sure you have installed the latest version of [Hugo-extented](https://gohugo.io/getting-started/installing/).

## Create a New Site

```
hugo new site mysite
```

## Import the Puppet theme module as a dependency of your site

To turn your site into a Hugo Module and declare the puppet theme module as a dependency for your site.

```bash
cd mysite
hugo github.com/me/mysite
hugo mod get github.com/roninro/hugo-theme-puppet
```

Puppet is now declared and ready to be used.

### Add Config File

For getting started, you can copy the `config.toml` file from the theme's exampleSite directory to the root directory of your site.

```bash
cp themes/puppet/exampleSite/config.toml .
```

### Declare theme

Identify these two lines inside the file `config.toml` you just copied.

```toml
# using theme as hugo module (modern)
# theme = "github.com/roninro/hugo-theme-puppet"
```

Uncomment the trailing hash sign from the second line of the snippet so that theme declaration takes effect.

Comment out or remove these lines inside the config file:

```toml
# using theme as git clone or submodule (traditional)
theme = "puppet"
themesDir = "../.."
```

## Add Some Content

Create a new post with the following command.

```bash
hugo new posts/my-first-post.md
```

Edit the content of the post.

```markdown
+++
title = "{{ replace .Name "-" " " | title }}"
date = {{ .Date }}
description = ""
draft = true
subtitle = ""
header_img = ""
toc = true
tags = []
categories = []
series = []
comment = true
+++

Your content here...
```

Some front-matter used for SEO, others used for displaying contents, configuration, etc.

## Serve your new site

From the root of your newly created site:

```bash
hugo server
```

Hugo now downloads the theme directly from GitHub and serves the contents of your new site.
5 changes: 3 additions & 2 deletions exampleSite/content/posts/getting-started.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
+++
title = "Puppet - Getting Started"
title = "Puppet - Getting Started (git clone or submodule)"
date = 2022-08-09T15:38:30+08:00
description = "Set up your new hugo site with a git clone of puppet theme"
header_img = ""
toc = true
tags = ["documentation", "guide"]
Expand Down Expand Up @@ -44,7 +45,7 @@ git submodule update --init --recursive
That’s all, Puppet is ready to be used.


## Add Config Files
## Add Config File

For getting started, you can copy the `config.toml` file from the theme's exampleSite directory to the root directory of your site.

Expand Down
5 changes: 5 additions & 0 deletions exampleSite/go.mod
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
module github.com/roninro/hugo-theme-puppet/exampleSite

go 1.19

require github.com/roninro/hugo-theme-puppet v0.0.0-20221128071334-71e55a893702 // indirect
2 changes: 2 additions & 0 deletions exampleSite/go.sum
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
github.com/roninro/hugo-theme-puppet v0.0.0-20221128071334-71e55a893702 h1:iCm03hvbQHdJdm/uR8tZ8JYP5DKW5neDnRtRbMFXBhI=
github.com/roninro/hugo-theme-puppet v0.0.0-20221128071334-71e55a893702/go.mod h1:UfLjcFK9KAg496oUSQIE2DGpx7pFeo7LF8VcaOYkX0Y=
3 changes: 3 additions & 0 deletions go.mod
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
module github.com/roninro/hugo-theme-puppet

go 1.19
3 changes: 2 additions & 1 deletion netlify.toml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,8 @@
[build.environment]
HUGO_THEME = "repo"
HUGO_THEMESDIR = "/opt/build"
HUGO_VERSION = "0.106.0"
HUGO_VERSION = "0.107.0"
GO_VERSION = "1.19.3"

[context.production.environment]
HUGO_BASEURL = "https://hugo-theme-puppet.netlify.app/"
Expand Down