summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--README.md45
-rw-r--r--go.mod3
-rw-r--r--layouts/_default/baseof.html4
-rw-r--r--layouts/index.html2
-rw-r--r--layouts/partials/head.html9
-rw-r--r--static/css/poole.css8
-rw-r--r--theme.toml2
7 files changed, 62 insertions, 11 deletions
diff --git a/README.md b/README.md
index 04d9654..5fa97e6 100644
--- a/README.md
+++ b/README.md
@@ -11,6 +11,7 @@ It pairs a prominent sidebar with uncomplicated content.
- [Installation](#installation)
- [Options](#options)
- [Sidebar menu](#sidebar-menu)
+ - [Sidebar description](#sidebar-description)
- [Sticky sidebar content](#sticky-sidebar-content)
- [Themes](#themes)
- [Reverse layout](#reverse-layout)
@@ -52,7 +53,49 @@ Hyde includes some customizable options, typically applied via classes on the `<
### Sidebar menu
-Create a list of nav links in the sidebar by assigning "menu=main" in the front matter.
+Create a list of nav links in the sidebar by assigning "menu=main" in the front matter, like so:
+
+**TOML**
+```toml
+theme = "hyde"
+
+[Menus]
+ main = [
+ {Name = "Github", URL = "https://github.com/username/"},
+ {Name = "LinkedIn", URL = "https://www.linkedin.com/in/username/"}
+ ]
+```
+
+**YAML**
+```yaml
+theme: "hyde"
+
+Menus:
+ main:
+ - Name: "Github"
+ URL: "https://github.com/username/"
+ - Name: "LinkedIn"
+ URL: "https://www.linkedin.com/in/username/"
+```
+
+### Sidebar description
+Customise the describe of your page using `description`, like so:
+
+**TOML**
+```toml
+theme = "hyde"
+
+[params]
+ description = "Your custom description"
+```
+
+**YAML**
+```yaml
+theme: "hyde"
+
+params:
+ description = "Your custom description"
+```
### Sticky sidebar content
diff --git a/go.mod b/go.mod
new file mode 100644
index 0000000..3ee4de3
--- /dev/null
+++ b/go.mod
@@ -0,0 +1,3 @@
+module github.com/spf13/hyde
+
+go 1.12
diff --git a/layouts/_default/baseof.html b/layouts/_default/baseof.html
index 4fada03..af088c4 100644
--- a/layouts/_default/baseof.html
+++ b/layouts/_default/baseof.html
@@ -5,6 +5,8 @@
{{ block "main" . -}}{{- end }}
</main>
- {{ template "_internal/google_analytics_async.html" . }}
+ {{ if not .Site.IsServer }}
+ {{ template "_internal/google_analytics_async.html" . }}
+ {{ end }}
</body>
</html>
diff --git a/layouts/index.html b/layouts/index.html
index 6b273ff..ec6d2eb 100644
--- a/layouts/index.html
+++ b/layouts/index.html
@@ -1,6 +1,6 @@
{{ define "main" -}}
<div class="posts">
-{{ range .Data.Pages -}}
+{{ range .Site.RegularPages -}}
<article class="post">
<h1 class="post-title">
<a href="{{ .Permalink }}">{{ .Title }}</a>
diff --git a/layouts/partials/head.html b/layouts/partials/head.html
index 749cce6..56a3157 100644
--- a/layouts/partials/head.html
+++ b/layouts/partials/head.html
@@ -3,7 +3,7 @@
<head>
<link href="https://gmpg.org/xfn/11" rel="profile">
<meta http-equiv="content-type" content="text/html; charset=utf-8">
- {{ .Hugo.Generator }}
+ {{ hugo.Generator }}
<!-- Enable responsiveness on mobile devices-->
<meta name="viewport" content="width=device-width, initial-scale=1.0">
@@ -13,6 +13,7 @@
{{- else -}}
<title>{{ .Title }} &middot; {{ .Site.Title }}</title>
{{- end }}
+ <meta name="description" content="{{if .IsHome}}{{ $.Site.Params.description }}{{else}}{{.Description}}{{end}}" />
<!-- CSS -->
<link type="text/css" rel="stylesheet" href="{{ .Site.BaseURL }}css/print.css" media="print">
@@ -25,8 +26,10 @@
<link rel="apple-touch-icon-precomposed" sizes="144x144" href="/apple-touch-icon-144-precomposed.png">
<link rel="shortcut icon" href="/favicon.png">
- <!-- RSS -->
- <link href="{{ .RSSLink }}" rel="alternate" type="application/rss+xml" title="{{ .Site.Title }}" />
+ <!-- RSS etc -->
+ {{ range .AlternativeOutputFormats -}}
+ {{ printf `<link href="%s" rel="%s" type="%s" title="%s" />` .Permalink .Rel .MediaType.Type $.Site.Title | safeHTML }}
+ {{ end -}}
{{ partial "hook_head_end.html" . }}
</head>
diff --git a/static/css/poole.css b/static/css/poole.css
index 54516b8..ec6a32f 100644
--- a/static/css/poole.css
+++ b/static/css/poole.css
@@ -68,7 +68,7 @@ body {
/* No `:visited` state is required by default (browsers will use `a`) */
a {
- color: #268bd2;
+ color: #227bb9;
text-decoration: none;
}
/* `:focus` is linked to `:hover` for basic accessibility */
@@ -153,7 +153,7 @@ pre {
code {
padding: .25em .5em;
font-size: 85%;
- color: #bf616a;
+ color: #b3555e;
background-color: #f9f9f9;
border-radius: 3px;
}
@@ -323,7 +323,7 @@ tbody tr:nth-child(odd) th {
display: block;
margin-top: -.5rem;
margin-bottom: 1rem;
- color: #9a9a9a;
+ color: #757575;
}
/* Related posts */
@@ -344,7 +344,7 @@ tbody tr:nth-child(odd) th {
color: #999;
}
.related-posts li a:hover {
- color: #268bd2;
+ color: #227bb9;
text-decoration: none;
}
.related-posts li a:hover small {
diff --git a/theme.toml b/theme.toml
index 4703ca5..a6cdeae 100644
--- a/theme.toml
+++ b/theme.toml
@@ -4,7 +4,7 @@ licenselink = "https://github.com/spf13/hyde/blob/master/LICENSE.md"
description = "An elegant open source and mobile first theme"
tags = ["blog", "company"]
features = ["blog", "themes", "disqus"]
-min_version = 0.21
+min_version = 0.53
[author]
name = "spf13"