From 2932037152a30e5542e947122ece0a26f148091b Mon Sep 17 00:00:00 2001 From: Victoria Drake Date: Thu, 31 Dec 2020 07:56:23 -0500 Subject: Update docs and config.toml - Add instructions for Contact section clock and Plausible - Update README and Theme Features post Close #273 --- README.md | 8 +++++++ assets/sass/_base.sass | 22 ++++++++++++++---- exampleSite/config.toml | 3 ++- exampleSite/content/en/blog/configuration.md | 26 ++++++++++++---------- exampleSite/content/en/home/contact.md | 2 +- ...e.sass_7642ba43b3212fd7d7ba324df3b88b0c.content | 14 ++++++++++++ layouts/_default/baseof.html | 1 + layouts/index.html | 1 + 8 files changed, 59 insertions(+), 18 deletions(-) diff --git a/README.md b/README.md index 2b0a8e8..b0288ea 100644 --- a/README.md +++ b/README.md @@ -176,6 +176,14 @@ See the [hugo documentation](https://gohugo.io/content-management/multilingual/) Introduction contains a default menu. If you want to override this, you can do so by defining a `menu.main` in `config.toml`. +## Contact section clock + +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`. + +## Plausible + +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. + ## Google Analytics Set `googleAnalytics` in `config.toml` to activate Hugo's [internal Google Analytics template](https://gohugo.io/templates/internal/#google-analytics). diff --git a/assets/sass/_base.sass b/assets/sass/_base.sass index 7be280a..1ee2bff 100644 --- a/assets/sass/_base.sass +++ b/assets/sass/_base.sass @@ -34,7 +34,7 @@ a color: $primary h1, h2, .title, .subtitle - color: $h-color + color: $h-color .title font-weight: $title-weight @@ -51,6 +51,20 @@ hr background-color: $secondary height: 1px +details + padding: .5em .5em 0 + +summary + margin: -.5em -.5em 0 + padding: .5em + cursor: pointer + +details[open] + padding: .5em + +details[open] summary + margin-bottom: .5em + .container max-width: 1000px @@ -78,9 +92,9 @@ pre border: none .card-thumbnail - width: 100% - height: 100% - object-fit: cover + width: 100% + height: 100% + object-fit: cover .bold-title font-size: 6rem diff --git a/exampleSite/config.toml b/exampleSite/config.toml index 8dba7d0..76aed02 100644 --- a/exampleSite/config.toml +++ b/exampleSite/config.toml @@ -5,7 +5,7 @@ DefaultContentLanguage = "en" # Default language fo # googleAnalytics = "" # https://gohugo.io/templates/internal/#google-analytics [params] - themeStyle = "light" # Choose "light" or "dark" or "auto" + themeStyle = "auto" # Choose "light" or "dark" or "auto" favicon = "/img/fav.ico" # Path to favicon file showRSSButton = false # Show rss button in navigation fadeIn = true # Turn on/off the fade-in effect @@ -14,6 +14,7 @@ DefaultContentLanguage = "en" # Default language fo email = "youremail@email.com" # E-mail address for contact section # customCSS = ["foo.css"] # Include custom css files placed under assets/ # customJS = ["foo.js"] # Include custom JavaScript files placed under assets/ + # plausible = true # Use Plausible analytics (requires an account at Plausible.io) # Configure the home page [params.home] diff --git a/exampleSite/content/en/blog/configuration.md b/exampleSite/content/en/blog/configuration.md index 148823e..3a20faa 100644 --- a/exampleSite/content/en/blog/configuration.md +++ b/exampleSite/content/en/blog/configuration.md @@ -7,6 +7,20 @@ series: ["quickstart"] Here are some helpful tips for setting up this theme. +## Configuration + +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. + +
Here are all the options included in the configuration file for this example site! + +```toml +{{% md %}} +{{< readfile file="config.toml" >}} +{{% /md %}} +``` + +
+ ## Syntax Highlighting 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" [markup.goldmark.renderer] unsafe = true ``` - -## Configuration - -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. - -Here are all the options included in the configuration file for this example site! - -```toml -{{% md %}} -{{< readfile file="config.toml" >}} -{{% /md %}} -``` diff --git a/exampleSite/content/en/home/contact.md b/exampleSite/content/en/home/contact.md index 7b5d8c0..b940155 100644 --- a/exampleSite/content/en/home/contact.md +++ b/exampleSite/content/en/home/contact.md @@ -4,4 +4,4 @@ title: "Contact" In the Contact section of **Introduction**, you may optionally display the current time in your preferred timezone. -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. +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. diff --git a/exampleSite/resources/_gen/assets/sass/sass/style.sass_7642ba43b3212fd7d7ba324df3b88b0c.content b/exampleSite/resources/_gen/assets/sass/sass/style.sass_7642ba43b3212fd7d7ba324df3b88b0c.content index ac39347..4418c9a 100644 --- a/exampleSite/resources/_gen/assets/sass/sass/style.sass_7642ba43b3212fd7d7ba324df3b88b0c.content +++ b/exampleSite/resources/_gen/assets/sass/sass/style.sass_7642ba43b3212fd7d7ba324df3b88b0c.content @@ -7929,6 +7929,20 @@ hr { background-color: #dbdbdb; height: 1px; } +details { + padding: .5em .5em 0; } + +summary { + margin: -.5em -.5em 0; + padding: .5em; + cursor: pointer; } + +details[open] { + padding: .5em; } + +details[open] summary { + margin-bottom: .5em; } + .container { max-width: 1000px; } diff --git a/layouts/_default/baseof.html b/layouts/_default/baseof.html index e08ad7d..425707b 100644 --- a/layouts/_default/baseof.html +++ b/layouts/_default/baseof.html @@ -3,6 +3,7 @@ {{ block "head" . }} {{ partial "head/metadata.html" . }} + {{ partial "head/plausible.html" . }} {{ partial "head/openGraph.html" . }} {{ partial "head/favicons.html" . }} {{ partial "head/css.html" . }} diff --git a/layouts/index.html b/layouts/index.html index d9243c3..c3ae575 100644 --- a/layouts/index.html +++ b/layouts/index.html @@ -3,6 +3,7 @@ {{ partial "head/metadata.html" . }} + {{ if .Site.Params.plausible }}{{ partial "head/plausible.html" . }}{{ end }} {{ partial "head/openGraph.html" . }} {{ partial "head/favicons.html" . }} {{ partial "head/css.html" . }} -- cgit v1.2.3