Skip to content

Commit 3ea1d7d

Browse files
authored
Merge pull request #14 from jkaye2012/master
Fix deprecation warnings and correct README
2 parents 26404ab + aa133bc commit 3ea1d7d

File tree

6 files changed

+39
-27
lines changed

6 files changed

+39
-27
lines changed

README.md

+11-9
Original file line numberDiff line numberDiff line change
@@ -38,29 +38,33 @@ Next, open the `config.toml` file in the base of the Hugo folder and ensure the
3838

3939
There are various options you can easily set from your `config.toml` file.
4040

41-
This text will appear after the Title of your site in your `<title>` meta tag:
41+
This text will appear after the Title of your site in your `<title>` meta tag, and after the Title in the sidebar:
4242

4343
description = "A Hugo Theme built with Bootstrap"
4444

4545

4646
### Sidebar
4747

48-
This text will appear in the sidebar immediately under your site's Title:
48+
This text will appear in a free paragraph below the Title & Description and above the menu links. Set it to "" if you don't want it.
4949

50-
sidebarDescription = "A Hugo Theme built with Bootstrap"
50+
sidebarFreeText = "A optional paragraph of free text. Set to blank in config.toml to clear..."
5151

52-
This text will appear in a free paragraph below the Title & sidebarDescription and above the menu links. Set it to "" if you don't want it.
52+
You can include clickable icons (e.g. for social networks )by including `"menu=icons"` items in your `config.toml`. Example:
5353

54-
sidebarFreeText = "A optional paragraph of free text. Set to blank in config.toml to clear..."
54+
[[menu.icons]]
55+
name = "GitHub"
56+
post = "<img src=\"/images/github.png\""
57+
url = "https://github.com"
5558

56-
You can also include useful menu links by including `"menu=main"` items in your `config.toml`. Example:
59+
You can optionally use the `post` var to include HTML after the `name` in the resulting links.
60+
You can include useful menu links by including `"menu=main"` items in your `config.toml`. Example:
5761

5862
[[menu.main]]
5963
name = "Hugo"
6064
post = "<span class='glyphicon glyphicon-fire'></span>"
6165
url = "http://gohugo.io"
6266

63-
You can optionally use the `pre` and `post` vars to include HTML before or after the `name` in the resulting links.
67+
You can optionally use the `post` var to include HTML after the `name` in the resulting links.
6468

6569
You can use the `"contact_email"` field in `[params]` to set a mailto: link the in the sidebar. Leave blank if you don't want it.
6670

@@ -94,7 +98,6 @@ Using a theme is as simple as changing the `colorScheme` param in your `config.t
9498
colorScheme = "scheme-darkbrown"
9599
DateFormat = "2 Jan 2006"
96100
description = "A Hugo Theme built with Bootstrap"
97-
sidebarDescription = "A Hugo Theme built with Bootstrap"
98101
sidebarFreeText = "A optional paragraph of free text. Set to blank in config.toml to clear..."
99102

100103

@@ -150,7 +153,6 @@ Here is a full example `config.toml`:
150153
colorScheme = "scheme-darkbrown"
151154
DateFormat = "2 Jan 2006"
152155
description = "A blog about content"
153-
sidebarDescription = "This is my blog about content"
154156
sidebarFreeText = "A optional paragraph of free text. Set to blank in config.toml to clear..."
155157
piwikSiteID = ""
156158
piwikURL = ""

exampleSite/config.toml

+1-2
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,6 @@ theme = "strange-case"
1313
colorScheme = "scheme-darkbrown"
1414
dateformat = "Jan 2, 2006"
1515
description = "A Hugo Theme built with Bootstrap"
16-
sidebarDescription = "A Hugo Theme built with Bootstrap"
1716
sidebarFreeText = "A optional paragraph of free text. Set to blank in config.toml to clear..."
1817
piwikSiteID = ""
1918
piwikURL = ""
@@ -26,4 +25,4 @@ theme = "strange-case"
2625
[[menu.main]]
2726
name = "Bootstrap"
2827
post = "<span class='glyphicon glyphicon-ok'></span>"
29-
url = "http://getbootstrap.com"
28+
url = "http://getbootstrap.com"

layouts/_default/single.html

+1-1
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313

1414
<div class="post-heading">
1515
<h1>{{ .Title }}</h1>
16-
<span class="post-date"><a href="{{ .Permalink }}"># {{ .Date.Format "Jan 2, 2006" }}{{ if .Params.author }} by {{ .Params.author }}{{ end }}</a></span>
16+
<span class="post-date"># {{ .Date.Format "Jan 2, 2006" }}{{ if .Params.author }} by {{ .Params.author }}{{ end }}</span>
1717
</div>
1818

1919
{{ .Content }}

layouts/partials/header.html

+3-3
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
<meta charset="utf-8">
55
<meta http-equiv="X-UA-Compatible" content="IE=edge">
66
<meta name="viewport" content="width=device-width, initial-scale=1">
7-
{{ .Hugo.Generator }}
7+
{{ hugo.Generator }}
88
<!-- The above 3 meta tags *must* come first in the head; any other head content must come *after* these tags -->
99
<title>{{ .Title }} - {{ .Site.Params.description }}</title>
1010

@@ -24,6 +24,6 @@
2424
{{ "<![endif]-->" | safeHTML }}
2525

2626
<!-- RSS -->
27-
<link href="{{ .RSSLink }}" rel="alternate" type="application/rss+xml" title="{{ .Site.Title }}" />
27+
<link href="{{ with .OutputFormats.Get "RSS" }}{{ .RelPermalink }}{{ end }}" rel="alternate" type="application/rss+xml" title="{{ .Site.Title }}" />
2828
</head>
29-
<body class="{{ .Site.Params.colorScheme }}">
29+
<body class="{{ .Site.Params.colorScheme }}">

layouts/partials/sidebar-content.html

+17-11
Original file line numberDiff line numberDiff line change
@@ -10,20 +10,26 @@
1010
</div>
1111
{{ end }}
1212

13+
<ul class="sidebar-menus sidebar-icons">
14+
{{ range .Site.Menus.icons }}
15+
<li><a href="{{.URL}}">{{ .Post }}</a></li>
16+
{{end}}
17+
</ul>
18+
1319
<ul class="sidebar-menus">
14-
{{ range .Site.Menus.main }}
15-
<li>&#187; <a href="{{.URL}}">{{ .Name }}</a> {{ .Post }}</li>
16-
{{end}}
17-
</ul>
20+
{{ range .Site.Menus.main }}
21+
<li>&#187; <a href="{{.URL}}">{{ .Name }}</a>{{ .Post }}</li>
22+
{{end}}
23+
</ul>
1824

1925
<div class="sidebar-recent hidden-xs">
20-
<p>Recent Posts:</p>
21-
<ul>
22-
{{ range first 5 .Site.Pages }}
23-
<li><a href="{{.Permalink}}">{{ .Title }}</a></li>
24-
{{ end }}
25-
</ul>
26-
</div>
26+
<p>Recent Posts:</p>
27+
<ul>
28+
{{ range first 5 (where .Site.RegularPages "Section" "posts") }}
29+
<li><a href="{{.Permalink}}">{{ .Title }}</a></li>
30+
{{ end }}
31+
</ul>
32+
</div>
2733

2834
{{ if .Site.Params.contact_email }}
2935
<div class="sidebar-contact">

static/css/strange-case.css

+6-1
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,9 @@ img {
5151
.post {
5252
margin-bottom: 3em;
5353
}
54+
.post a {
55+
text-decoration: underline;
56+
}
5457
.post .post-heading {
5558
margin-bottom: 1em;
5659
}
@@ -76,7 +79,6 @@ img {
7679

7780
/* SIDEBAR */
7881

79-
8082
.sidebar {
8183
padding: 2em;
8284
font-size: 1.3em;
@@ -98,6 +100,9 @@ img {
98100
list-style: none;
99101
font-size:1em;
100102
}
103+
.sidebar .sidebar-icons li {
104+
display: inline-block;
105+
}
101106
.sidebar .sidebar-recent {
102107
margin-top: 1.5em;
103108
}

0 commit comments

Comments
 (0)