Merge branch 'master' into master

This commit is contained in:
newhinton
2019-02-28 14:57:20 +01:00
committed by GitHub
14 changed files with 62 additions and 10534 deletions

View File

@ -17,13 +17,13 @@
{{ if .Params.tags }}
<span class="post-tags">
{{ range .Params.tags }}
#<a href="{{ (urlize (printf "tags/%s" . )) | absURL }}">{{ . }}</a>&nbsp;
#<a href="{{ (urlize (printf "tags/%s/" . )) | absURL }}">{{ . }}</a>&nbsp;
{{ end }}
</span>
{{ end }}
{{ with .Params.Cover }}
<img src="{{ printf "img/%s" . | absURL }}" class="post-cover" />
<img src="{{ . | absURL }}" class="post-cover" />
{{ end }}
<div class="post-content">

View File

@ -1,6 +1,6 @@
{{ define "main" }}
<div class="post">
<h1 class="post-title"><a href="{{ .Permalink }}">{{ .Title | markdownify }}</a></h2>
<h1 class="post-title"><a href="{{ .Permalink }}">{{ .Title | markdownify }}</a></h1>
<div class="post-meta">
<span class="post-date">
{{ .Date.Format "2006-01-02" }}
@ -11,13 +11,13 @@
{{ if .Params.tags }}
<span class="post-tags">
{{ range .Params.tags }}
#<a href="{{ (urlize (printf "tags/%s" .)) | absURL }}">{{ . }}</a>&nbsp;
#<a href="{{ (urlize (printf "tags/%s/" .)) | absURL }}">{{ . }}</a>&nbsp;
{{ end }}
</span>
{{ end }}
{{ with .Params.Cover }}
<img src="{{ printf "img/%s" . | absURL }}" class="post-cover" />
<img src="{{ . | absURL }}" class="post-cover" />
{{ end }}
<div class="post-content">
@ -49,5 +49,7 @@
</div>
</div>
{{ end }}
{{ partial "comments.html" . }}
</div>
{{ end }}

View File

@ -0,0 +1,8 @@
<!--
To add comments section, please create `layouts/partials/comments.html` in your
Hugo directory and insert:
{{ template "_internal/disqus.html" . }}
or whatever comment engine you want -> https://gohugo.io/content-management/comments/#readout
-->

View File

@ -26,7 +26,7 @@
<meta name="twitter:description" content="{{ if .IsHome }}{{ $.Site.Params.tagline }}{{ else }}{{ .Summary | plainify }}{{ end }}" />
<meta name="twitter:site" content="{{ $.Site.BaseURL }}" />
<meta name="twitter:creator" content="{{ .Params.Author }}" />
<meta name="twitter:image" content="{{ with .Params.Cover }}{{ printf "img/%s" . | absURL }}{{ end }}">
<meta name="twitter:image" content="{{ with .Params.Cover }}{{ . | absURL }}{{ end }}">
<!-- OG data -->
<meta property="og:locale" content="{{ $.Site.Language.Lang }}" />
@ -35,7 +35,7 @@
<meta property="og:description" content="{{ if .IsHome }}{{ $.Site.Params.tagline }}{{ else }}{{ .Summary | plainify }}{{ end }}" />
<meta property="og:url" content="{{ .Permalink }}" />
<meta property="og:site_name" content="{{ .Title }}" />
<meta property="og:image" content="{{ with .Params.Cover }}{{ printf "img/%s" . | absURL }}{{ end }}">
<meta property="og:image" content="{{ with .Params.Cover }}{{ . | absURL }}{{ end }}">
<meta property="og:image:width" content="2048">
<meta property="og:image:height" content="1024">
{{ range .Params.categories }}<meta property="article:section" content="{{ . }}" />{{ end }}

View File

@ -1,4 +1,4 @@
<a href="{{ if $.Site.Params.Logo.LogoHomeLink }}{{ $.Site.Params.Logo.LogoHomeLink }}{{else}}{{ $.Site.BaseURL }}{{ end }}" style="text-decoration: none;">
<a href="{{ if $.Site.Params.Logo.LogoHomeLink }}{{ $.Site.Params.Logo.LogoHomeLink }}{{else}}{{ $.Site.BaseURL }}{{ end }}">
<div class="logo">
{{ with $.Site.Params.Logo.logoText }}{{ . }}{{ else }}Terminal{{ end }}
</div>