This commit is contained in:
Robert Austin 2019-02-17 18:43:41 +10:00
parent dcdde20b7c
commit ae72d8b0f5
15 changed files with 118 additions and 75 deletions

View file

@ -4,18 +4,6 @@ date: 2018-11-28T15:14:39+10:00
weight: 1
---
## Make Beautiful Docs
## Whisper Theme
Whisper is a minimal documentation theme for Hugo. The design and functionality is intentionally minimal. Were aiming for a similar feel to a Github readme.
```javascript
var body = document.querySelector('body');
var menuTrigger = document.querySelector('#toggle-main-menu-mobile');
var menuContainer = document.querySelector('#main-menu-mobile');
menuTrigger.onclick = function() {
menuContainer.classList.toggle('open');
menuTrigger.classList.toggle('is-active');
body.classList.toggle('lock-scroll');
};
```

View file

@ -5,35 +5,48 @@ draft: false
weight: 4
---
### Homepage meta tags
## Syntax Highlighting
Often a homepage requires special meta tags such as a meta description or og meta data for twitter, facebook etc. You can configure these values in the `config.toml`
Whisper uses the in-built code highlighting that ships with hugo. https://gohugo.io/content-management/syntax-highlighting/
You can insert code snippets in any markdown file by using standard code fences syntax ie:
````
```
// config.toml
[params]
google_analytics_id=""
insert code here
```
````
[params.homepage_meta_tags]
meta_description = "a description of your website."
meta_og_title = "My Theme"
meta_og_type = "website"
meta_og_url = "https://www.mywebsite.com"
meta_og_image = "https://www.mywebsite.com/images/tn.png"
meta_og_description = "a description of your website."
meta_twitter_card = "summary"
meta_twitter_site = "@mytwitterhandle"
meta_twitter_creator = "@mytwitterhandle"
You can specify the langauge by adding a declaration after the backticks
````
```javascript
insert code here
```
````
### Pygments Options
The following code highlighting options are configured in the `config.toml`
```toml
pygmentsCodeFences = true
pygmentsCodefencesGuessSyntax = true
pygmentsUseClasses = true
```
### Set meta tags on a per template/page basis
## Main menu
You can set meta tags on a per template basis using a block. For example, you might want to write a custom meta description for the `/services` page. You can insert any valid HTML meta data inside the `{{ define "meta_tags }}` block at the top of a template.
Configure the main menu by editing the `config.toml`
```
// layouts/services/list.html
...
{{ define "meta_tags" }}
<meta name="description" content="We offer a variety of services in the finance industry" />
```toml
[[menu.main]]
name = "Home"
url = "/"
weight = 1
[[menu.main]]
name = "Docs"
url = "/docs/"
weight = 2
```

View file

@ -1,5 +1,5 @@
---
title: 'Installation'
title: 'Install Theme'
date: 2019-02-11T19:27:37+10:00
draft: false
weight: 3
@ -22,18 +22,22 @@ Copy or git clone this theme into the sites themes folder `mynewsite/themes`
```
cd mynewsite
cd themes
git clone https://github.com/jugglerx/hugo-hero-theme.git
git clone https://github.com/jugglerx/hugo-whisper-theme.git
```
#### Install from .zip file
You can download the .zip file located here https://github.com/JugglerX/hugo-hero-theme/archive/master.zip.
You can download the .zip file located here https://github.com/JugglerX/hugo-whisper-theme/archive/master.zip.
Extract the downloaded .zip inside the `themes` folder. Rename the extracted folder from `hugo-hero-theme-master` -> `hugo-hero-theme`. You should end up with the following folder structure `mynewsite/themes/hugo-hero-theme`
Extract the downloaded .zip inside the `themes` folder. Rename the extracted folder from `hugo-whisper-theme-master` -> `hugo-whisper-theme`. You should end up with the following folder structure `mynewsite/themes/hugo-whisper-theme`
### Add example content
## Add example content
The fastest way to get started is to copy the example content. Copy the entire contents of the `exampleSite` folder to the root folder of your Hugo site (the folder with the README.md).
The fastest way to get started is to copy the example content and modify the included `config.toml`
### Copy exampleSite contents
Copy the entire contents of the `exampleSite` folder to the root folder of your Hugo site _(the folder with the README.md)_.
### Update config.toml
@ -42,10 +46,10 @@ After you copy the `config.toml` into the root folder of your Hugo site you will
```
baseURL = "/"
themesDir = "themes"
theme = "hugo-hero-theme"
theme = "hugo-whisper-theme"
```
### Run Hugo
## Run Hugo
After installing the theme for the first time, generate the Hugo site.

Binary file not shown.

Before

Width:  |  Height:  |  Size: 52 KiB

View file

@ -1,19 +0,0 @@
---
title: 'Netlify'
date: 2018-11-28T15:14:39+10:00
draft: false
weight: 5
---
# Netlify Index
# Using exampleSite With Netlify
Lorem markdownum, dictis umbrosum dextrum, Lelegeia quamquam distantes pares
ignisque quaerit dederat gemino Aethiopesque [caelo](#inque-ne-collocat)
ulciscitur est. Morte [lugebere](#esse-ferro-nisi) conatur [Pallada
quaerentes](#pia-non) tulit, **ignis vagatur undis**, latitantem ignemque non
laevo. Terras seu favoni tectas movit hunc motuque damno tutoque quattuor. Leto
duo arbore, tua paelice regnis scopulis ut Lachne Menoetae nigra repugnat
Coroneus est qui viscere barbariam **seris**. Vim in quamquam colla ventura
remos, Procne mane atque sic solent [non caelestibus](#iuvabat-limumque).

View file

@ -5639,7 +5639,6 @@ ol {
border: 2px solid #fff; }
.title {
color: #222222;
font-size: 2.4rem;
line-height: 1.2;
font-family: "Roboto", Arial, sans-serif, -apple-system;
@ -5650,6 +5649,17 @@ ol {
.title {
font-size: 3rem; } }
.title-summary {
font-size: 1.6rem;
line-height: 1.4;
font-family: "Roboto", Arial, sans-serif, -apple-system;
letter-spacing: -0.2px;
font-weight: 200;
margin-bottom: 10px; }
@media (min-width: 768px) {
.title-summary {
font-size: 1.6rem; } }
.content {
-webkit-font-smoothing: antialiased; }
.content pre {
@ -5676,8 +5686,11 @@ ol {
font-family: "Roboto Mono", monospace;
font-size: 0.9rem;
line-height: 1.4; }
.content .highlight {
margin-bottom: 20px; }
.content strong {
font-weight: bold; }
.content em {
font-style: italic;
font-weight: normal; }
.content ul,
.content ol {
margin-top: 10px;
@ -5778,6 +5791,9 @@ ol {
background: #ffffff;
padding: 10px; }
.highlight {
margin-bottom: 20px; }
.highlight .hll {
background-color: #ffffcc; }

View file

@ -1 +1 @@
{"Target":"css/style.min.1a876c28459b75260863a973813f86e2f3223c539d31beb6aeeb9dbc0e880fc2.css","MediaType":"text/css","Data":{"Integrity":"sha256-GodsKEWbdSYIY6lzgT+G4vMiPFOdMb62ruudvA6ID8I="}}
{"Target":"css/style.min.25a985a9387ec5365c5ec13e861f9e531ea81b643268a6b576436a353e25bbd6.css","MediaType":"text/css","Data":{"Integrity":"sha256-JamFqTh+xTZcXsE+hh+eUx6oG2QyaKa1dkNqNT4lu9Y="}}