working site with external nginx

This commit is contained in:
2020-01-18 13:40:05 -06:00
parent 9449858d2f
commit 9f57bd71c6
62 changed files with 5267 additions and 0 deletions

View File

@@ -0,0 +1,10 @@
{{ if not .Site.IsServer }}
{{ with .Site.GoogleAnalytics }}
<script>
window.ga=window.ga||function(){(ga.q=ga.q||[]).push(arguments)};ga.l=+new Date;
ga('create', '{{ . }}', 'auto');
ga('send', 'pageview');
</script>
<script async src='https://www.google-analytics.com/analytics.js'></script>
{{ end }}
{{ end }}

View File

@@ -0,0 +1,34 @@
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
{{ hugo.Generator }}
<link rel="canonical" href="{{ .Permalink }}">
{{ if .IsHome }}
{{ with .Site.Params.homeMetaContent }}
<meta name="description" content="{{ . | plainify }}">
{{ end }}
{{ end }}
<link rel="apple-touch-icon" sizes="180x180" href="/apple-touch-icon.png">
<link rel="icon" type="image/png" sizes="32x32" href="/favicon-32x32.png">
<link rel="icon" type="image/png" sizes="16x16" href="/favicon-16x16.png">
<link rel="manifest" href="/site.webmanifest">
<link rel="mask-icon" href="/safari-pinned-tab.svg" color="#000000">
<meta name="msapplication-TileColor" content="#ffffff">
<meta name="theme-color" content="#ffffff">
<link rel="stylesheet" type="text/css" href="{{ "css/paper.css" | absURL }}">
{{ $customCssPath := "css/custom.css" }}
{{ $customCss:= resources.Get $customCssPath | resources.ExecuteAsTemplate $customCssPath . }}
<link rel="stylesheet" type="text/css" href="{{ $customCss.Permalink }}">
{{ $title := print .Title " | " .Site.Title }}
{{ if .IsHome }}
{{ $title = .Site.Title }}
{{ end }}
<title>{{ $title }}</title>
</head>

View File

@@ -0,0 +1,22 @@
<nav class="border split-nav">
<div class="nav-brand">
<h3><a href="/">{{ .Site.Title }}</a></h3>
</div>
<div class="collapsible">
<input id="collapsible1" type="checkbox" name="collapsible1">
<button>
<label for="collapsible1">
<div class="bar1"></div>
<div class="bar2"></div>
<div class="bar3"></div>
</label>
</button>
<div class="collapsible-body">
<ul class="inline">
{{ range .Site.Menus.nav }}
<li><a href="{{ .URL }}">{{ .Name }}</a></li>
{{ end }}
</ul>
</div>
</div>
</nav>

View File

@@ -0,0 +1,12 @@
<h1>{{ .Title }}</h1>
{{ $pages := where site.RegularPages "Type" "in" site.Params.mainSections }}
{{ range $pages.ByPublishDate.Reverse }}
<h2 class="post-list {{ if ne .Params.show_summary false }}summary{{ end }}">
<a href="{{ .Permalink }}">
{{ .Title }}
</a>
</h2>
{{ if ne .Params.show_summary false }}
{{ .Summary }}
{{ end }}
{{ end }}

View File

@@ -0,0 +1,21 @@
{{ $headings := findRE "<h2.*?>(.|\n])+?</h2>" .Content }}
{{ if ge (len $headings) 2 }}
<div class="child-borders">
<div class="toc border" aria-labelledby="toc-heading">
<h2 id="toc-heading">Table of contents</h2>
<ol>
{{ range $headings }}
<li>
{{ $id := findRE "id=\".*\"" . }}
{{ $id = index $id 0 }}
{{ $id = strings.TrimPrefix "id=\"" $id }}
{{ $id = strings.TrimSuffix "\"" $id }}
<a href="#{{ $id }}">
{{ . | htmlUnescape | plainify }}
</a>
</li>
{{ end }}
</ol>
</div>
</div>
{{ end }}