Skip to content

Commit 2932037

Browse files
committed
Update docs and config.toml
- Add instructions for Contact section clock and Plausible - Update README and Theme Features post Close #273
1 parent fe776a9 commit 2932037

File tree

8 files changed

+59
-18
lines changed

8 files changed

+59
-18
lines changed

README.md

+8
Original file line numberDiff line numberDiff line change
@@ -176,6 +176,14 @@ See the [hugo documentation](https://gohugo.io/content-management/multilingual/)
176176

177177
Introduction contains a default menu. If you want to override this, you can do so by defining a `menu.main` in `config.toml`.
178178

179+
## Contact section clock
180+
181+
Introduction can optionally show your current local time in your [contact section](https://hugo-introduction.netlify.app/#contact). This uses vanilla JS and variables you provide. You can set this up by copying the settings in the exampleSite `config.toml` for `localTime`, `timeZone`, and `timeFormat`.
182+
183+
## Plausible
184+
185+
You can easily use Plausible.io for analytics by setting `plausible = true` in your `config.toml`. Plausible offers a privacy-friendly alternative to Google Analytics. You'll need your own Plausible account - see [plausible.io](https://plausible.io/) for more.
186+
179187
## Google Analytics
180188

181189
Set `googleAnalytics` in `config.toml` to activate Hugo's [internal Google Analytics template](https://gohugo.io/templates/internal/#google-analytics).

assets/sass/_base.sass

+18-4
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ a
3434
color: $primary
3535

3636
h1, h2, .title, .subtitle
37-
color: $h-color
37+
color: $h-color
3838

3939
.title
4040
font-weight: $title-weight
@@ -51,6 +51,20 @@ hr
5151
background-color: $secondary
5252
height: 1px
5353

54+
details
55+
padding: .5em .5em 0
56+
57+
summary
58+
margin: -.5em -.5em 0
59+
padding: .5em
60+
cursor: pointer
61+
62+
details[open]
63+
padding: .5em
64+
65+
details[open] summary
66+
margin-bottom: .5em
67+
5468
.container
5569
max-width: 1000px
5670

@@ -78,9 +92,9 @@ pre
7892
border: none
7993

8094
.card-thumbnail
81-
width: 100%
82-
height: 100%
83-
object-fit: cover
95+
width: 100%
96+
height: 100%
97+
object-fit: cover
8498

8599
.bold-title
86100
font-size: 6rem

exampleSite/config.toml

+2-1
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ DefaultContentLanguage = "en" # Default language fo
55
# googleAnalytics = "" # https://gohugo.io/templates/internal/#google-analytics
66

77
[params]
8-
themeStyle = "light" # Choose "light" or "dark" or "auto"
8+
themeStyle = "auto" # Choose "light" or "dark" or "auto"
99
favicon = "/img/fav.ico" # Path to favicon file
1010
showRSSButton = false # Show rss button in navigation
1111
fadeIn = true # Turn on/off the fade-in effect
@@ -14,6 +14,7 @@ DefaultContentLanguage = "en" # Default language fo
1414
email = "[email protected]" # E-mail address for contact section
1515
# customCSS = ["foo.css"] # Include custom css files placed under assets/
1616
# customJS = ["foo.js"] # Include custom JavaScript files placed under assets/
17+
# plausible = true # Use Plausible analytics (requires an account at Plausible.io)
1718

1819
# Configure the home page
1920
[params.home]

exampleSite/content/en/blog/configuration.md

+14-12
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,20 @@ series: ["quickstart"]
77

88
Here are some helpful tips for setting up this theme.
99

10+
## Configuration
11+
12+
Most of what you'll want to configure is demonstrated in the exampleSite `config.toml`. This is [Hugo's configuration file](https://gohugo.io/getting-started/configuration/). You can copy the `config.toml` in the `exampleSite/` to your site root get started.
13+
14+
<details><summary>Here are all the options included in the configuration file for this example site!</summary>
15+
16+
```toml
17+
{{% md %}}
18+
{{< readfile file="config.toml" >}}
19+
{{% /md %}}
20+
```
21+
22+
</details>
23+
1024
## Syntax Highlighting
1125

1226
Introduction allows the use of Hugo's rich built-in syntax highlighting capabilities. See [Syntax Highlighting](https://gohugo.io/content-management/syntax-highlighting/) in the Hugo docs.
@@ -45,15 +59,3 @@ defaultMarkdownHandler = "goldmark"
4559
[markup.goldmark.renderer]
4660
unsafe = true
4761
```
48-
49-
## Configuration
50-
51-
Introduction can be easily configured using [Hugo's configuration file](https://gohugo.io/getting-started/configuration/). You can copy the `config.toml` in the `exampleSite/` to your site root get started.
52-
53-
Here are all the options included in the configuration file for this example site!
54-
55-
```toml
56-
{{% md %}}
57-
{{< readfile file="config.toml" >}}
58-
{{% /md %}}
59-
```

exampleSite/content/en/home/contact.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -4,4 +4,4 @@ title: "Contact"
44

55
In the Contact section of **Introduction**, you may optionally display the current time in your preferred timezone.
66

7-
This lets visitors know what sort of response time to expect when they contact you. The timezone is easily set in the `config.toml` file.
7+
This lets visitors know what sort of response time to expect when they contact you. The timezone is easily set in the `config.toml` file. See the exampleSite configuration for instructions.

exampleSite/resources/_gen/assets/sass/sass/style.sass_7642ba43b3212fd7d7ba324df3b88b0c.content

+14
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

layouts/_default/baseof.html

+1
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
<head>
44
{{ block "head" . }}
55
{{ partial "head/metadata.html" . }}
6+
{{ partial "head/plausible.html" . }}
67
{{ partial "head/openGraph.html" . }}
78
{{ partial "head/favicons.html" . }}
89
{{ partial "head/css.html" . }}

layouts/index.html

+1
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33

44
<head>
55
{{ partial "head/metadata.html" . }}
6+
{{ if .Site.Params.plausible }}{{ partial "head/plausible.html" . }}{{ end }}
67
{{ partial "head/openGraph.html" . }}
78
{{ partial "head/favicons.html" . }}
89
{{ partial "head/css.html" . }}

0 commit comments

Comments
 (0)