Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Don't display dates when it's not present in frontmatter #63

Open
wants to merge 4 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions layouts/_default/list.html
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,12 @@
<div class="content container">
<ul class="posts">
{{ range .Data.Pages }}
<li><a href="{{ .Permalink }}">{{ .Title }}</a>
<li><a href="{{ .Permalink }}">Numeric Grades</a>
{{ if isset .Params "categories" }}
&middot;
{{ range .Params.categories }}<a class="label" href="{{ "/categories/" | absURL }}{{ . | urlize }}">{{ . }}</a>{{ end }}
{{ end }}</span>
&middot; <time>{{ .Date.Format "Jan 2, 2006" }}</time></li>
{{ if not .Date.IsZero }}&middot; <time>{{ .Date.Format "Jan 2, 2006" }}</time>{{ end }}</li>
{{ end }}
</ul>
</div>
Expand Down
2 changes: 1 addition & 1 deletion layouts/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
<h1 class="post-title">
<a href="{{ .Permalink }}">{{ .Title }}</a>
</h1>
<span class="post-date">{{ .Date.Format "Jan 2, 2006" }}{{ if not .Site.Params.hideReadingTime }} &middot; {{ .ReadingTime }} minute read{{ end }}{{ if .Site.DisqusShortname }} &middot; <a href="{{ .Permalink }}#disqus_thread">Comments</a>{{ end }}
<span class="post-date">{{ if not .Date.IsZero }}{{ .Date.Format "Jan 2, 2006" }}{{ end }}{{ if not .Site.Params.hideReadingTime }} &middot; {{ .ReadingTime }} minute read{{ end }}{{ if .Site.DisqusShortname }} &middot; <a href="{{ .Permalink }}#disqus_thread">Comments</a>{{ end }}
{{ if isset .Params "categories" }}
<br/>
{{ range .Params.categories }}<a class="label" href="{{ "/categories/" | absURL }}{{ . | urlize }}">{{ . }}</a>{{ end }}
Expand Down
6 changes: 6 additions & 0 deletions layouts/partials/foot.html
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
<div class="content container">
<p>
Copyright &copy; {{ .Now.Format "2006" }} <a href="{{ "/license/" | absURL }}">License</a><br/>
Wesbite powered by <a href="http://gohugo.io">Hugo</a>
</p>
</div>
{{ if isset .Site.Params "highlight" }}<script src="{{ "/js/highlight.pack.js" | absURL }}"></script>
<script>hljs.initHighlightingOnLoad();</script>{{ end }}
</body>
Expand Down
3 changes: 0 additions & 3 deletions layouts/partials/sidebar.html
Original file line number Diff line number Diff line change
Expand Up @@ -44,8 +44,5 @@ <h1>{{ .Site.Author.name }}</h1>
})('flattr');
</script></p>
{{ end }}

<p>Copyright &copy; {{ .Now.Format "2006" }} <a href="{{ "/license/" | absURL }}">License</a><br/>
Powered by <a href="http://gohugo.io">Hugo</a> and <a href="https://github.com/zyro/hyde-x">Hyde-X</a></p>
</div>
</div>
2 changes: 1 addition & 1 deletion layouts/post/single.html
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<div class="content container">
<div class="post">
<h1 class="post-title">{{ .Title }}</h1>
<span class="post-date">{{ .Date.Format "Jan 2, 2006" }}{{ if not .Site.Params.hideReadingTime }} &middot; {{ .ReadingTime }} minute read{{ end }}{{ if .Site.DisqusShortname }} &middot; <a href="{{ .Permalink }}#disqus_thread">Comments</a>{{ end }}
<span class="post-date">{{ if not .Date.IsZero }}{{ .Date.Format "Jan 2, 2006" }}{{ end }}{{ if not .Site.Params.hideReadingTime }} &middot; {{ .ReadingTime }} minute read{{ end }}{{ if .Site.DisqusShortname }} &middot; <a href="{{ .Permalink }}#disqus_thread">Comments</a>{{ end }}
{{ if isset .Params "categories" }}
<br/>
{{ range .Params.categories }}<a class="label" href="{{ "/categories/" | absURL }}{{ . | urlize }}">{{ . }}</a>{{ end }}
Expand Down