Update to hugo v0.15
This commit is contained in:
@@ -1,12 +0,0 @@
|
||||
<!--
|
||||
This file is a template that is included various places to have a list of
|
||||
that particular posts categories generated.
|
||||
-->
|
||||
<div class="container">
|
||||
<ul class="catlist">
|
||||
<li><em>Categories: </em></li>
|
||||
{{ range .Params.categories }}
|
||||
<li><a href="/categories/{{ . | urlize }}">{{ . }}</a> </li>
|
||||
{{ end }}
|
||||
</ul>
|
||||
</div>
|
||||
@@ -1,25 +0,0 @@
|
||||
<!--
|
||||
This is the main footer for the website. It is included on every page.
|
||||
|
||||
It is very basic. It has some text and a link back to the home page of the
|
||||
site.
|
||||
|
||||
It includes the google analytics template from /layouts/chrome/ga.html
|
||||
|
||||
It also closes the <body> and <html> tags for each page.
|
||||
-->
|
||||
|
||||
<div class="container content">
|
||||
<footer>
|
||||
<div>
|
||||
<p class="right credit">
|
||||
Fancy footer here. Link to <a href="/">Home Page</a>
|
||||
</p>
|
||||
</div>
|
||||
</footer>
|
||||
</div>
|
||||
|
||||
{{ template "chrome/ga.html" . }}
|
||||
|
||||
</body>
|
||||
</html>
|
||||
@@ -1,17 +0,0 @@
|
||||
<!--
|
||||
This file contains the necessary information for google analytics to track
|
||||
visitors and their behavior on my website.
|
||||
|
||||
This is specific to this website and will need to be changed for any other
|
||||
site
|
||||
-->
|
||||
<script>
|
||||
(function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
|
||||
(i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
|
||||
m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
|
||||
})(window,document,'script','//www.google-analytics.com/analytics.js','ga');
|
||||
|
||||
ga('create', 'UA-36732392-2', 'sglyon.com');
|
||||
ga('send', 'pageview');
|
||||
|
||||
</script>
|
||||
@@ -1,13 +0,0 @@
|
||||
<!--
|
||||
This file simply includes all the css and fonts that should go into the
|
||||
header of each page.
|
||||
|
||||
It is separate from the rest of the header because the actual header for the
|
||||
homepage of the site is different, but we want every page of the site
|
||||
(including the homepage) to have the same assets.
|
||||
-->
|
||||
|
||||
<link rel="stylesheet" href="/css/poole.css">
|
||||
<link rel="stylesheet" href="/css/syntax.css">
|
||||
<link rel="stylesheet" href="/css/lanyon.css">
|
||||
<link rel="stylesheet" href="http://fonts.googleapis.com/css?family=PT+Serif:400,400italic,700|PT+Sans:400">
|
||||
@@ -1,16 +0,0 @@
|
||||
<!--
|
||||
This is the actual header for each page of the site except the homepage.
|
||||
|
||||
It simply shows the title of the page and includes the css/fonts found in
|
||||
/layouts/chrome/header.html
|
||||
-->
|
||||
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<base href="{{ .Site.BaseURL }}">
|
||||
<title> {{ .Title }} </title>
|
||||
<link rel="canonical" href="{{ .Permalink }}">
|
||||
{{ template "chrome/head_includes.html" . }}
|
||||
</head>
|
||||
@@ -1,29 +0,0 @@
|
||||
<!--
|
||||
This is a helper file that adds previous and next links to the bottom of each
|
||||
blog post. (below next and previous refer to chronological next and previous)
|
||||
|
||||
It will check to see if there is a previous blog post. If is, it will print
|
||||
an arrow as well as the title of the previous post as a link as
|
||||
left-justified text.
|
||||
|
||||
It will then check for a next blog post. If there is one it prints the title
|
||||
of the next post with a right arrow as right justified text on the same line.
|
||||
|
||||
If there is ever not a next or previous post, it does nothing.
|
||||
-->
|
||||
|
||||
<div class="container">
|
||||
<hr />
|
||||
<hr />
|
||||
{{if .Prev}}
|
||||
<span class="left">
|
||||
<em>« Previous:</em> <a class="next" href="{{.Prev.Permalink}}">{{.Prev.Title}}</a>
|
||||
</span>
|
||||
{{end}}
|
||||
|
||||
{{if .Next}}
|
||||
<span class="right">
|
||||
<em>Next: </em><a class="next" href="{{.Next.Permalink}}"> {{ .Next.Title }}</a> »
|
||||
</span>
|
||||
{{end}}
|
||||
</div>
|
||||
@@ -1,29 +0,0 @@
|
||||
<!--
|
||||
This file defines the main sidebar that the user can toggle in and out of
|
||||
view. This is included in every file.
|
||||
|
||||
Most of this was taken directly from the Lanyon example site.
|
||||
|
||||
Here we simply include a link to the homepage, a link to the blog posts,
|
||||
and some copyright information.
|
||||
-->
|
||||
|
||||
<!-- Target for toggling the sidebar `.sidebar-checkbox` is for regular
|
||||
styles, `#sidebar-checkbox` for behavior. -->
|
||||
<input type="checkbox" class="sidebar-checkbox" id="sidebar-checkbox">
|
||||
|
||||
<!-- Toggleable sidebar -->
|
||||
<div class="sidebar" id="sidebar">
|
||||
|
||||
<nav class="sidebar-nav">
|
||||
<a class="sidebar-nav-item" href="/">Home</a>
|
||||
|
||||
<a class="sidebar-nav-item" href="/posts">Blog</a>
|
||||
</nav>
|
||||
|
||||
<div class="sidebar-item">
|
||||
<p>
|
||||
© 2014 Spencer Lyon. Powered by <a href="http://hugo.spf13.com">Hugo</a>. Design adapted from <a href="http://lanyon.getpoole.com">Lanyon</a>.
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
@@ -1,77 +0,0 @@
|
||||
<!-- This file is the homepage of the website. -->
|
||||
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<!--
|
||||
This section just sets up some metadata for the website.
|
||||
|
||||
It probably does not need to be changed.
|
||||
-->
|
||||
<meta charset="utf-8">
|
||||
<base href="{{ .Site.BaseURL }}">
|
||||
<title>{{ .Site.Title }}</title>
|
||||
<link rel="canonical" href="{{ .Permalink }}">
|
||||
<link href="{{ .RSSlink }}" rel="alternate" type="application/rss+xml" title="{{ .Site.Title }}" />
|
||||
|
||||
{{ template "chrome/head_includes.html" . }}
|
||||
</head>
|
||||
<body class="theme-base-08" lang="en">
|
||||
|
||||
{{ template "chrome/sidebar.html" . }}
|
||||
|
||||
<!-- See /layouts/indexes/category.html for explanation of this section -->
|
||||
<div class="wrap">
|
||||
<div class="masthead">
|
||||
<div class="container">
|
||||
<h3 class="masthead-title">
|
||||
<a href="/" title="Home">Home</a>
|
||||
</h3>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!--
|
||||
This section contains the content of our home page.
|
||||
|
||||
I have broken it into three main sections:
|
||||
(1) about the blog
|
||||
(2) about me
|
||||
(3) Recent posts
|
||||
|
||||
The first two sections are pretty self explanatory.
|
||||
|
||||
In the recent posts section we ask Hugo to use the template found in
|
||||
/layouts/posts/summary.html to show a summary of the 10 most recent
|
||||
posts we have made.
|
||||
-->
|
||||
<div class="container content">
|
||||
<h1>This is a Blog</h1>
|
||||
|
||||
<p class="lead"> Welcome to my blog! </p>
|
||||
|
||||
<p>This is really just a barebones website to stand as a template for creating a blog that is statically generated by <a href="http://hugo.spf13.com">Hugo</a> and hosted at on GitHub via <a href="http://pages.github.com/">GitHub Pages</a>.</p>
|
||||
|
||||
<p>I am using a slightly modified version of the <a href="http://lanyon.getpoole.com">Lanyon</a> Jekyll theme. I think it is very simple, clean, and elegant.</p>
|
||||
|
||||
<!-- About me subsection -->
|
||||
<h2>About me</h2>
|
||||
|
||||
<p>Sometimes people have an "About me" section on the homepage of their website.</p>
|
||||
|
||||
<p>It might even include a picture: </p>
|
||||
|
||||
<!-- Recent Posts section -->
|
||||
<h1 class="post-title">Recent Posts</h1>
|
||||
<section id="main">
|
||||
<ul id="list">
|
||||
{{ range first 10 .Data.Pages }}
|
||||
{{ .Render "summary"}}
|
||||
{{ end }}
|
||||
</ul>
|
||||
</section>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<label for="sidebar-checkbox" class="sidebar-toggle"></label>
|
||||
|
||||
{{ template "chrome/footer.html" }}
|
||||
@@ -1,56 +0,0 @@
|
||||
<!--
|
||||
This file is used to render a list of all posts that belong to a specific
|
||||
category.
|
||||
-->
|
||||
|
||||
|
||||
{{ template "chrome/header.html" . }}
|
||||
|
||||
<body class="theme-base-08">
|
||||
{{ template "chrome/sidebar.html" . }}
|
||||
|
||||
<!--
|
||||
Taken from Lanyon example site.
|
||||
|
||||
Putting everything in the wrap div makes the whole page slide over when the
|
||||
navigation button is pressed.
|
||||
|
||||
The masthead is a special Lanyon class that is above the horizontal line at
|
||||
the top of each page. To me it seemed like a place to put the page title.
|
||||
|
||||
We want the title to be Blog Posts and we want it to be a link to the
|
||||
root of the /posts section of the site.
|
||||
|
||||
-->
|
||||
<div class="wrap">
|
||||
<div class="masthead">
|
||||
<div class="container">
|
||||
<h3 class="masthead-title">
|
||||
<a href="/posts" title="Blog">Blog Posts</a>
|
||||
</h3>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- Show summary of all posts in a category -->
|
||||
<div class="container content">
|
||||
<h1 class="post-title">Recent Posts</h1>
|
||||
<section id="main">
|
||||
<div>
|
||||
<h5><a href="/categories">Full Category Index</a></h5>
|
||||
<h2>Posts in “{{ .Title }}”</h2>
|
||||
{{ range .Data.Pages }}
|
||||
{{ .Render "summary"}}
|
||||
{{ end }}
|
||||
</div>
|
||||
</section>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<label for="sidebar-checkbox" class="sidebar-toggle"></label>
|
||||
|
||||
<!-- Include footer (ends <body> and <html>) -->
|
||||
{{ template "chrome/footer.html" }}
|
||||
|
||||
|
||||
|
||||
@@ -1,52 +0,0 @@
|
||||
<!--
|
||||
This file is used to generate the root file of a Hugo index.
|
||||
In our case this is only the index for categories, so it will render the
|
||||
page baseurl/categories
|
||||
-->
|
||||
|
||||
{{ template "chrome/header.html" . }}
|
||||
|
||||
<body class="theme-base-08">
|
||||
{{ template "chrome/sidebar.html" . }}
|
||||
|
||||
<!-- See /layouts/indexes/category.html for explanation of this section -->
|
||||
<div class="wrap">
|
||||
<div class="masthead">
|
||||
<div class="container">
|
||||
<h3 class="masthead-title">
|
||||
<a href="/posts" title="Blog">Blog Posts</a>
|
||||
</h3>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!--
|
||||
In this section we instruct Hugo to list all the different items in the
|
||||
index. Because we only have an index for categories, each item will be
|
||||
a category name. The name is a link to a page that displays all posts in
|
||||
that category.
|
||||
|
||||
We also list the number of entries in each category in parenthesis next
|
||||
to the category name.
|
||||
-->
|
||||
<div class="container content">
|
||||
<section id="main">
|
||||
<div>
|
||||
<h1>Archive of Posts, by {{ .Data.Singular }}</h1>
|
||||
<ul class="category">
|
||||
{{ $data := .Data }}
|
||||
{{ range $key,$value := .Data.Index.ByCount }}
|
||||
<li><a href="/{{ $data.Plural }}/{{ $value.Name | urlize }}"> {{ $value.Name }} </a> ({{ $value.Count }} entries) </li>
|
||||
{{ end }}
|
||||
</ul>
|
||||
</div>
|
||||
</section>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<label for="sidebar-checkbox" class="sidebar-toggle"></label>
|
||||
|
||||
<!-- Include footer (ends <body> and <html>) -->
|
||||
{{ template "chrome/footer.html" }}
|
||||
|
||||
|
||||
|
||||
@@ -1,46 +0,0 @@
|
||||
<!--
|
||||
This file is used to render a list of all posts on our blog.
|
||||
-->
|
||||
|
||||
{{ template "chrome/header.html" . }}
|
||||
|
||||
<body class="theme-base-08">
|
||||
{{ template "chrome/sidebar.html" . }}
|
||||
|
||||
<!-- See /layouts/indexes/category.html for explanation of this section -->
|
||||
<div class="wrap">
|
||||
<div class="masthead">
|
||||
<div class="container">
|
||||
<h3 class="masthead-title">
|
||||
<a href="/posts" title="Blog">Blog Posts</a>
|
||||
</h3>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!--
|
||||
In this section we have Hugo generate a list of all blog posts, ordered
|
||||
by date.
|
||||
|
||||
When showing each post we ask Hugo to use the template in
|
||||
/layouts/posts/li.html to provide a short description of each post.
|
||||
-->
|
||||
<div class="container content">
|
||||
<p>Here are all my blog posts, in descending order by creation date. If you would like to view them by topic, see the <a href="/categories">Categories</a> page.</p>
|
||||
<h1 class="post-title">All Blog Posts (By Date)</h1>
|
||||
<section id="main">
|
||||
<ul id="list">
|
||||
{{ range .Data.Pages }}
|
||||
{{ .Render "li"}}
|
||||
{{ end }}
|
||||
</ul>
|
||||
</section>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<label for="sidebar-checkbox" class="sidebar-toggle"></label>
|
||||
|
||||
<!-- Include footer (ends <body> and <html>) -->
|
||||
{{ template "chrome/footer.html" }}
|
||||
|
||||
|
||||
|
||||
@@ -1,26 +0,0 @@
|
||||
<!--
|
||||
This file defines how a summary of a specifc post should be presented in a
|
||||
list (hence the file name li.html for "list item"). This is used in the
|
||||
template /layouts/indexes/posts.html
|
||||
|
||||
The lines of the displayed list item are as follows:
|
||||
(1) The name of the post
|
||||
(2) The date the post was written as left-justified text and a
|
||||
right-justified horizontal list of categories for that post.
|
||||
(3) The contents of the description field in the metadata of the actual
|
||||
markdown source of the post.
|
||||
-->
|
||||
<li>
|
||||
<span><h2><a href='{{ .Permalink }}'> {{ .Title }}</a> </h2></span>
|
||||
<span class="left">{{ .Date.Format "Mon, Jan 2, 2006" }}</span>
|
||||
<span class="right">
|
||||
<ul class="catlist">
|
||||
{{ range .Params.categories }}
|
||||
<li><a href="/categories/{{ . | urlize }}">{{ . }}</a> </li>
|
||||
{{ end }}
|
||||
</ul>
|
||||
</span>
|
||||
|
||||
<br />
|
||||
{{ .Description }}
|
||||
</li>
|
||||
@@ -1,51 +0,0 @@
|
||||
<!--
|
||||
This file is responsible for rendering a single blog post.
|
||||
-->
|
||||
|
||||
{{ template "chrome/header.html" . }}
|
||||
|
||||
<body class="theme-base-08">
|
||||
{{ template "chrome/sidebar.html" . }}
|
||||
|
||||
<!-- See /layouts/indexes/category.html for explanation of this section -->
|
||||
<div class="wrap">
|
||||
<div class="masthead">
|
||||
<div class="container">
|
||||
<h3 class="masthead-title">
|
||||
<a href="/posts" title="Blog">Blog Posts</a>
|
||||
</h3>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!--
|
||||
This is where the actual post is displayed.
|
||||
|
||||
We first access the title metadata field from the markdown source and
|
||||
display it as a heading.
|
||||
|
||||
We then access the date the post was written (also in the markdown
|
||||
metadata) and display a formated version of it
|
||||
|
||||
Finally we include the actual content of the post.
|
||||
-->
|
||||
<div class="container content">
|
||||
<h1 class="post-title">{{ .Title }}</h1>
|
||||
<section id="main">
|
||||
<h5 id="date"> {{ .Date.Format "Mon Jan 2, 2006" }} </h5>
|
||||
{{ .Content }}
|
||||
</section>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<label for="sidebar-checkbox" class="sidebar-toggle"></label>
|
||||
|
||||
{{ template "chrome/prev_next.html" . }}
|
||||
<br />
|
||||
{{ template "chrome/categories.html" . }}
|
||||
|
||||
|
||||
<!-- Include footer (ends <body class="theme-base-08"> and <html>) -->
|
||||
{{ template "chrome/footer.html" }}
|
||||
|
||||
|
||||
|
||||
@@ -1,24 +0,0 @@
|
||||
<!--
|
||||
This file defines how a summary of a specifc post should be presented. This
|
||||
is similar to the file /layouts/posts/li.html, but is meant have a bit longer
|
||||
of a representation than the one in that file.
|
||||
|
||||
This template does the following:
|
||||
(1) Shows the name of the post
|
||||
(2) Shows the date the post was created (from metadata in post markdown
|
||||
source)
|
||||
(3) Displays a Hugo-generated summary of the post
|
||||
(4) Provides a link with text Read More that points to the post
|
||||
-->
|
||||
|
||||
<article class="post">
|
||||
<header>
|
||||
<h2><a href='{{ .Permalink }}'> {{ .Title }}</a> </h2>
|
||||
<div class="meta">{{ .Date.Format "Mon, Jan 2, 2006" }}</div>
|
||||
</header>
|
||||
|
||||
{{ .Summary }}
|
||||
<footer>
|
||||
<a href='{{ .Permalink }}'><nobr>Read more →</nobr></a>
|
||||
</footer>
|
||||
</article>
|
||||
Reference in New Issue
Block a user