mirror of
https://github.com/jakejarvis/jarv.is.git
synced 2025-07-19 08:35:31 -04:00
minify HTML on build
This commit is contained in:
@@ -1,19 +1,19 @@
|
||||
{{ partial "header.html" . }}
|
||||
{{ partial "blog-header.html" . }}
|
||||
<main id="archive">
|
||||
{{- range (where .Site.RegularPages "Type" "notes").GroupByDate "2006" }}
|
||||
<section class="year">
|
||||
<h2>{{ .Key }}</h2>
|
||||
<ul>
|
||||
{{- range .Pages }}
|
||||
<li>
|
||||
<div class="date">{{ .Date.Format "Jan 2" }}</div>
|
||||
<div class="title"><a href="{{ .Permalink }}">{{ .Title }}</a></div>
|
||||
</li>
|
||||
{{- end }}
|
||||
</ul>
|
||||
</section>
|
||||
{{- end }}
|
||||
</main>
|
||||
<main id="archive">
|
||||
{{- range (where .Site.RegularPages "Type" "notes").GroupByDate "2006" }}
|
||||
<section class="year">
|
||||
<h2>{{ .Key }}</h2>
|
||||
<ul>
|
||||
{{- range .Pages }}
|
||||
<li>
|
||||
<div class="date">{{ .Date.Format "Jan 2" }}</div>
|
||||
<div class="title"><a href="{{ .Permalink }}">{{ .Title }}</a></div>
|
||||
</li>
|
||||
{{- end }}
|
||||
</ul>
|
||||
</section>
|
||||
{{- end }}
|
||||
</main>
|
||||
{{ partial "blog-footer.html" . }}
|
||||
{{ partial "footer.html" . }}
|
||||
{{ partial "footer.html" . }}
|
||||
|
@@ -2,6 +2,7 @@
|
||||
<html ⚡ lang="en">
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
{{ hugo.Generator }}
|
||||
<script async src="https://cdn.ampproject.org/v0.js"></script>
|
||||
<script async custom-element="amp-iframe" src="https://cdn.ampproject.org/v0/amp-iframe-0.1.js"></script>
|
||||
<script async custom-element="amp-video" src="https://cdn.ampproject.org/v0/amp-video-0.1.js"></script>
|
||||
@@ -10,7 +11,6 @@
|
||||
<title>{{ .Title }} – {{ .Site.Title }}</title>
|
||||
{{ with .OutputFormats.Get "html" }}<link rel="canonical" href="{{ .Permalink }}">{{ end }}
|
||||
<meta name="viewport" content="width=device-width,minimum-scale=1,initial-scale=1">
|
||||
{{ hugo.Generator }}
|
||||
<meta name="description" content="{{ if .Description }}{{ .Description }}{{ else }}{{ .Site.Params.description }}{{ end }}">
|
||||
<meta name="author" content="{{ .Site.Author.name }}">
|
||||
{{ partial "open-graph.html" . }}
|
||||
|
@@ -1,24 +1,24 @@
|
||||
{{ partial "header.html" . }}
|
||||
{{ partial "blog-header.html" . }}
|
||||
<main id="single">
|
||||
<article itemscope itemtype="http://schema.org/BlogPosting" class="h-entry">
|
||||
<div id="info">
|
||||
<h1 itemprop="name headline" class="p-name"><a href="{{ .Permalink }}" itemprop="url" class="u-url no-underline">{{ .Title }}</a></h1>
|
||||
<div id="meta">
|
||||
by <span itemprop="author" itemscope itemtype="http://schema.org/Person" class="p-author"><a itemprop="url" rel="me author" href="{{ .Site.BaseURL }}" title="{{ .Site.Author.name }}" class="h-card no-underline"><span itemprop="name" class="p-name">{{ .Site.Author.name }}</span></a></span>
|
||||
· <a class="no-underline" href="{{ .Permalink }}" title="{{ .Date.Format "Mon, Jan 2 2006 3:04:05 PM MST" }}"><time itemprop="datePublished" content="{{ .Date.Format "2006-01-02T15:04:05Z0700" }}" datetime="{{ .Date.Format "2006-01-02T15:04:05Z0700" }}" class="dt-published">{{ .Date.Format "January 2, 2006" }}</time></a>
|
||||
· <a class="no-underline" href="{{ .Site.Params.gitRepo }}/blob/master/content/{{ .File.Path }}" title="Edit this page on GitHub" target="_blank" rel="noopener nofollow noreferrer">Improve Post</a>
|
||||
<div id="tags">
|
||||
{{- range .Params.tags }}
|
||||
<span itemprop="keywords" class="tag p-category">{{ . }}</span>
|
||||
{{- end }}
|
||||
</div>
|
||||
</div>
|
||||
<main id="single">
|
||||
<article itemscope itemtype="http://schema.org/BlogPosting" class="h-entry">
|
||||
<div id="info">
|
||||
<h1 itemprop="name headline" class="p-name"><a href="{{ .Permalink }}" itemprop="url" class="u-url no-underline">{{ .Title }}</a></h1>
|
||||
<div id="meta">
|
||||
by <span itemprop="author" itemscope itemtype="http://schema.org/Person" class="p-author"><a itemprop="url" rel="me author" href="{{ .Site.BaseURL }}" title="{{ .Site.Author.name }}" class="h-card no-underline"><span itemprop="name" class="p-name">{{ .Site.Author.name }}</span></a></span>
|
||||
· <a class="no-underline" href="{{ .Permalink }}" title="{{ .Date.Format "Mon, Jan 2 2006 3:04:05 PM MST" }}"><time itemprop="datePublished" content="{{ .Date.Format "2006-01-02T15:04:05Z0700" }}" datetime="{{ .Date.Format "2006-01-02T15:04:05Z0700" }}" class="dt-published">{{ .Date.Format "January 2, 2006" }}</time></a>
|
||||
· <a class="no-underline" href="{{ .Site.Params.gitRepo }}/blob/master/content/{{ .File.Path }}" title="Edit this page on GitHub" target="_blank" rel="noopener nofollow noreferrer">Improve Post</a>
|
||||
<div id="tags">
|
||||
{{- range .Params.tags }}
|
||||
<span itemprop="keywords" class="tag p-category">{{ . }}</span>
|
||||
{{- end }}
|
||||
</div>
|
||||
<div id="content" itemprop="articleBody" class="e-content">
|
||||
</div>
|
||||
</div>
|
||||
<div id="content" itemprop="articleBody" class="e-content">
|
||||
{{ .Content }}
|
||||
</div>
|
||||
</article>
|
||||
</main>
|
||||
</div>
|
||||
</article>
|
||||
</main>
|
||||
{{ partial "blog-footer.html" . }}
|
||||
{{ partial "footer.html" . }}
|
||||
{{ partial "footer.html" . }}
|
||||
|
@@ -1,21 +1,21 @@
|
||||
{{ partial "header.html" . }}
|
||||
<h1>{{ .Title }}</h1>
|
||||
<h1>{{ .Title }}</h1>
|
||||
|
||||
<video poster="{{ with .Resources.GetMatch "images/*.png" }}{{ .Permalink }}{{ end }}" controls crossorigin playsinline preload="none">
|
||||
<!-- Video files -->
|
||||
{{ with .Resources.GetMatch "*.webm" }}<source src="{{ .Permalink }}" type="video/webm">{{ end }}
|
||||
{{ with .Resources.GetMatch "*.mp4" }}<source src="{{ .Permalink }}" type="video/mp4">{{ end }}
|
||||
<video poster="{{ with .Resources.GetMatch "images/*.png" }}{{ .Permalink }}{{ end }}" controls crossorigin playsinline preload="none">
|
||||
<!-- Video files -->
|
||||
{{ with .Resources.GetMatch "*.webm" }}<source src="{{ .Permalink }}" type="video/webm">{{ end }}
|
||||
{{ with .Resources.GetMatch "*.mp4" }}<source src="{{ .Permalink }}" type="video/mp4">{{ end }}
|
||||
|
||||
<!-- Caption files -->
|
||||
{{ with .Resources.GetMatch "*.en.vtt" }}<track src="{{ .Permalink }}" kind="captions" label="English" srclang="en" default>{{ end }}
|
||||
<!-- Caption files -->
|
||||
{{ with .Resources.GetMatch "*.en.vtt" }}<track src="{{ .Permalink }}" kind="captions" label="English" srclang="en" default>{{ end }}
|
||||
|
||||
<!-- Fallback for browsers that don't support the <video> element -->
|
||||
Your browser doesn't support HTML5 video. {{ with .Resources.GetMatch "*.mp4" }}<a href="{{ .Permalink }}">Click here to view the raw .mp4 video.</a>{{ end }}
|
||||
</video>
|
||||
<div>
|
||||
<a class="no-underline" id="logo" href="{{ .Site.BaseURL }}" title="{{ .Site.Title }}" aria-label="{{ .Site.Title }}">
|
||||
<!-- Fallback for browsers that don't support the <video> element -->
|
||||
Your browser doesn't support HTML5 video. {{ with .Resources.GetMatch "*.mp4" }}<a href="{{ .Permalink }}">Click here to view the raw .mp4 video.</a>{{ end }}
|
||||
</video>
|
||||
<div>
|
||||
<a class="no-underline" id="logo" href="{{ .Site.BaseURL }}" title="{{ .Site.Title }}" aria-label="{{ .Site.Title }}">
|
||||
{{ partial "logo.html" . }}
|
||||
</a>
|
||||
</div>
|
||||
{{ .Content }}
|
||||
{{ partial "footer.html" . }}
|
||||
</a>
|
||||
</div>
|
||||
{{ .Content }}
|
||||
{{ partial "footer.html" . }}
|
||||
|
Reference in New Issue
Block a user