Merge pull request #2 from ghlecl/hugo0.18

Made the theme compatible with Hugo 0.18.
This commit is contained in:
Josh Johnson 2017-01-04 23:46:47 -05:00 committed by GitHub
commit 69c0730b99
5 changed files with 19 additions and 17 deletions

View file

@ -3,7 +3,7 @@
// @summary: jquery implementation // @summary: jquery implementation
$(function() { $(function() {
// @summary: Use the author's flickr ID to load images from the public flickr feed // @summary: Use the author's flickr ID to load images from the public flickr feed
$.getJSON("http://api.flickr.com/services/feeds/photos_public.gne?id={{ .Site.Author.FlickrID }}&format=json&jsoncallback=?", function(data) { $.getJSON("https://api.flickr.com/services/feeds/photos_public.gne?id={{ .Site.Author.flickrid }}&format=json&jsoncallback=?", function(data) {
iweblog.application.displayImages(data, 8); iweblog.application.displayImages(data, 8);
}); });
}); });

View file

@ -1,22 +1,24 @@
<footer> <footer>
<div class="footer_text"> <div class="footer_text">
<div> <div>
<h3>Hi, <a href="{{ .Site.Author.AboutPage }}">I'm {{ .Site.Author.FirstName }}</a></h3> <h3>Hi, <a href="{{ .Site.Author.aboutpage }}">I'm {{ .Site.Author.firstname }}</a></h3>
<p> <p>
{{ partial "bio.html" . }} {{ partial "bio.html" . }}
</p> </p>
</div> </div>
{{ if isset .Site.Author "flickrid" | and ( not ( eq .Site.Author.flickrid "" ) ) }}
<div> <div>
<h3><a href="https://www.flickr.com/photos/{{ .Site.Author.FlickrID }}/">Photo Stream</a></h3> <h3><a href="https://www.flickr.com/photos/{{ .Site.Author.flickrid }}/">Photo Stream</a></h3>
<div id="photos"></div> <div id="photos"></div>
</div> </div>
</div> </div>
{{ end }}
</div> </div>
{{ if .Site.Params.ShowCopyright }} {{ if .Site.Params.showcopyright }}
<div class="footer_copyright"> <div class="footer_copyright">
&copy; {{ .Now.Format "2006" }} <a href="{{ .Site.Author.AboutPage }}">{{ .Site.Author.FirstName }} {{ .Site.Author.LastName }}</a> &copy; {{ .Now.Format "2006" }} <a href="{{ .Site.Author.aboutpage }}">{{ .Site.Author.firstname }} {{ .Site.Author.lastname }}</a>
{{ with .Site.Author.Location }} - Made in {{ . }}{{ end }} {{ with .Site.Author.location }} - Made in {{ . }}{{ end }}
</div> </div>
{{ end }} {{ end }}
</footer> </footer>

View file

@ -1,8 +1,8 @@
<header> <header>
<nav> <nav>
<h1><a href="/">@{{ .Site.Author.Handle }}</a>s {{ .Site.Title }}.</h1> <h1><a href="/">@{{ .Site.Author.handle }}</a>s {{ .Site.Title }}.</h1>
<div class="menu"> <div class="menu">
{{ $.Scratch.Add "sections" .Site.Params.RSSSections }} {{ $.Scratch.Add "sections" .Site.Params.rsssections }}
<ul> <ul>
{{ range .Site.Menus.main }} {{ range .Site.Menus.main }}
<li> <li>
@ -12,7 +12,7 @@
{{ end }} {{ end }}
</li> </li>
{{ end }} {{ end }}
{{ with .Site.Author.AboutPage }}<li><a href="{{ . }}">About</a></li>{{ end }} {{ with .Site.Author.aboutpage }}<li><a href="{{ . }}">About</a></li>{{ end }}
</ul> </ul>
</div> </div>
</nav> </nav>

View file

@ -4,19 +4,19 @@
<meta charset="utf-8"> <meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1"> <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
<meta name="viewport" content="width=device-width, initial-scale=1.0"> <meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta name="author" content="{{ with .Site.Author.FirstName }}{{ . }}{{ end }}"> <meta name="author" content="{{ with .Site.Author.firstname }}{{ . }}{{ end }} {{ with .Site.Author.lastname }}{{ . }}{{ end }}">
<meta name="description" content="{{ with .Site.Params.Description }}{{ . }}{{ end }}"> <meta name="description" content="{{ with .Site.Params.description }}{{ . }}{{ end }}">
{{ .Hugo.Generator }} {{ .Hugo.Generator }}
{{ $.Scratch.Add "title" .Site.Title }} {{ $.Scratch.Add "title" .Site.Title }}
<title>{{ with .Title }}{{ if ne . ($.Scratch.Get "title") }}{{ . }} &middot; {{ end }}{{ end }}@{{ .Site.Author.Handle }}s {{ .Site.Title }}</title> <title>{{ with .Title }}{{ if ne . ($.Scratch.Get "title") }}{{ . }} &middot; {{ end }}{{ end }}@{{ .Site.Author.handle }}s {{ .Site.Title }}</title>
<link rel="stylesheet" href="{{ .Site.BaseURL }}css/weblog.css" media="screen" charset="utf-8" /> <link rel="stylesheet" href="{{ .Site.BaseURL }}css/weblog.css" media="screen" charset="utf-8" />
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/lightgallery/1.2.14/css/lightgallery.min.css" type="text/css" /> <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/lightgallery/1.2.14/css/lightgallery.min.css" type="text/css" />
{{ partial "custom_stylesheets.html" . }} {{ partial "custom_stylesheets.html" . }}
{{ if .Site.Params.RSSEnabled }} {{ if .Site.Params.rssenabled }}
<link href="{{ .Site.RSSLink }}" rel="alternate" type="application/rss+xml" title="{{ .Site.Title }}" /> <link href="{{ .Site.RSSLink }}" rel="alternate" type="application/rss+xml" title="{{ .Site.Title }}" />
{{ end }} {{ end }}
</head> </head>
<body class="site"> <body class="site">

View file

@ -1,7 +1,7 @@
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"> <rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
<channel> <channel>
<title>@{{ .Site.Author.Handle }}s {{ .Site.Title }}{{ with .Title }} - {{ . }}{{ end }}</title> <title>@{{ .Site.Author.handle }}s {{ .Site.Title }}{{ with .Title }} - {{ . }}{{ end }}</title>
<link>{{ .Permalink }}</link> <link>{{ .Permalink }}</link>
<description>All entries {{ with .Title }}in {{.}} {{ end }}on {{ .Site.Title }}</description> <description>All entries {{ with .Title }}in {{.}} {{ end }}on {{ .Site.Title }}</description>
<generator>Hugo -- gohugo.io</generator> <generator>Hugo -- gohugo.io</generator>
@ -15,7 +15,7 @@
<title>{{ .Title }}</title> <title>{{ .Title }}</title>
<link>{{ .Permalink }}</link> <link>{{ .Permalink }}</link>
<pubDate>{{ .Date.Format "Mon, 02 Jan 2006 15:04:05 -0700" | safeHTML }}</pubDate> <pubDate>{{ .Date.Format "Mon, 02 Jan 2006 15:04:05 -0700" | safeHTML }}</pubDate>
{{ with .Site.Author.email }}<author>{{.}}{{ with $.Site.Author.name }} ({{.}}){{end}}</author>{{end}} {{ with .Site.Author.email }}<author>{{.}}{{end}} ({{ with .Site.Author.firstname }}{{.}}{{ end }} {{ with .Site.Author.lastname }}{{.}}{{end}})</author>
<guid>{{ .Permalink }}</guid> <guid>{{ .Permalink }}</guid>
<description>{{ .Content | html }}</description> <description>{{ .Content | html }}</description>
</item> </item>