mirror of
https://github.com/jakejarvis/jarv.is.git
synced 2025-04-27 05:18:28 -04:00
change a BUNCH of if's to with's to prepare for theme extraction
This commit is contained in:
parent
ac0bbc6343
commit
96ad258d36
11
config.toml
11
config.toml
@ -1,5 +1,5 @@
|
||||
baseURL = "https://jarv.is/"
|
||||
languageCode = "en-us"
|
||||
languageCode = "en-US"
|
||||
title = "Jake Jarvis"
|
||||
|
||||
# increase timeout for image processing
|
||||
@ -32,12 +32,13 @@ disableAliases = true
|
||||
mastodon = "mastodon.social/@jakejarvis"
|
||||
|
||||
[params]
|
||||
description = "Hello! I'm a frontend web developer based in Boston, Massachusetts specializing in modern JavaScript frameworks and progressive web apps."
|
||||
description = "Hi there! I'm a frontend web developer based in Boston, Massachusetts specializing in modern JavaScript frameworks and progressive web apps."
|
||||
domain = "jarv.is"
|
||||
facebook_app_id = "3357248167622283"
|
||||
gitRepo = "https://github.com/jakejarvis/jarv.is"
|
||||
wayback = "https://web.archive.org/web/20010501000000*/jakejarvis.com"
|
||||
copyrightFirstYear = "2001"
|
||||
defaultImage = "/me_large.jpg"
|
||||
|
||||
[outputs]
|
||||
home = ["HTML", "RSS", "MANIFEST", "REDIRECTS", "HEADERS"]
|
||||
@ -49,6 +50,9 @@ disableAliases = true
|
||||
delimiter = ""
|
||||
|
||||
[outputFormats]
|
||||
[outputFormats.RSS]
|
||||
mediatype = "application/rss"
|
||||
baseName = "feed"
|
||||
[outputFormats.AMP]
|
||||
mediaType = "text/html"
|
||||
basename = "amp"
|
||||
@ -92,7 +96,8 @@ disableAliases = true
|
||||
unsafe = true
|
||||
[markup.highlight]
|
||||
codeFences = true
|
||||
lineNos = false
|
||||
lineNos = true
|
||||
lineNumbersInTable = true
|
||||
noClasses = true
|
||||
tabWidth = 4
|
||||
|
||||
|
@ -1,12 +1,12 @@
|
||||
<!doctype html>
|
||||
{{"<!--\n ,,, ,,,\n ;\" ^; ;\" \",\n ; s$$$$$s ;\n , ss$$$$$$$ss ,\"\n ;$$$$$$$$$$$$$$$$\n $$$$$$$$$$$$$$$$$$ Hello, human. :)\n $$$$$\"\"\"$$$\"\"\"$$$$$$\n $$$$$ p\"$$$\"q $$$$$ https://jarv.is/humans.txt\n $$$$ .$$$$$. $$$$\n $$$$$$$$$$$$$$$$$\n \"$$$$\"*\"$$$$\"\n \"$$.$$\"\n-->" | safeHTML}}
|
||||
<html lang="en">
|
||||
<html lang="{{ with .Site.LanguageCode }}{{ . }}{{ else }}en-us{{ end }}">
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
{{ hugo.Generator }}
|
||||
<title>{{ .Title }}{{ if not .IsHome }} – {{ .Site.Title }}{{ else }} 👨‍💻{{ end }}</title>
|
||||
<meta name="description" content="{{ if .Description }}{{ .Description }}{{ else }}{{ .Site.Params.description }}{{ end }}">
|
||||
<meta name="author" content="{{ .Site.Author.name }}">
|
||||
<meta name="description" content="{{ with .Description }}{{ . }}{{ else }}{{ .Site.Params.description }}{{ end }}">
|
||||
{{ with .Site.Author.name }}<meta name="author" content="{{ . }}">{{ end }}
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1">
|
||||
{{ partial "open-graph" . }}
|
||||
<meta name="apple-mobile-web-app-capable" content="yes">
|
||||
@ -23,7 +23,7 @@
|
||||
<link rel="icon" href="{{ "favicon-16.png" | absURL }}" sizes="16x16">
|
||||
<link rel="shortcut icon" href="{{ "favicon.ico" | absURL }}" sizes="16x16 32x32 48x48">
|
||||
<link rel="canonical" href="{{ .Permalink }}">
|
||||
<link rel="alternate" type="application/rss+xml" href="{{ "index.xml" | absURL }}" title="{{ .Site.Title }} (RSS)">
|
||||
<link rel="alternate" type="application/rss+xml" href="{{ "feed.xml" | absURL }}" title="{{ .Site.Title }} (RSS)">
|
||||
<link rel="author" href="{{ "humans.txt" | absURL }}">
|
||||
{{ if and (eq .Type "notes") (eq .Kind "page") }}
|
||||
{{ with .OutputFormats.Get "amp" }}
|
||||
|
@ -1,17 +1,21 @@
|
||||
{{ define "main" }}
|
||||
<main id="list">
|
||||
{{- range (where .Site.RegularPages "Type" "notes").GroupByDate "2006" }}
|
||||
{{- with (where .Site.RegularPages "Type" "notes") }}
|
||||
{{- range .GroupByDate "2006" }}
|
||||
<section class="year">
|
||||
<h2>{{ .Key }}</h2>
|
||||
<ul>
|
||||
{{- range .Pages }}
|
||||
{{- with .Pages }}
|
||||
{{- range . }}
|
||||
<li>
|
||||
<div class="date">{{ .Date.Format "Jan 2" }}</div>
|
||||
<div class="title"><a href="{{ .Permalink }}">{{ .Title }}</a></div>
|
||||
</li>
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
</ul>
|
||||
</section>
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
</main>
|
||||
{{ end }}
|
||||
|
@ -13,7 +13,7 @@
|
||||
<meta name="viewport" content="width=device-width,minimum-scale=1,initial-scale=1">
|
||||
<meta name="description" content="{{ if .Description }}{{ .Description }}{{ else }}{{ .Site.Params.description }}{{ end }}">
|
||||
<meta name="author" content="{{ .Site.Author.name }}">
|
||||
{{ partial "open-graph.html" . }}
|
||||
{{ partial "open-graph" . }}
|
||||
|
||||
<style amp-boilerplate>body{-webkit-animation:-amp-start 8s steps(1,end) 0s 1 normal both;-moz-animation:-amp-start 8s steps(1,end) 0s 1 normal both;-ms-animation:-amp-start 8s steps(1,end) 0s 1 normal both;animation:-amp-start 8s steps(1,end) 0s 1 normal both}@-webkit-keyframes -amp-start{from{visibility:hidden}to{visibility:visible}}@-moz-keyframes -amp-start{from{visibility:hidden}to{visibility:visible}}@-ms-keyframes -amp-start{from{visibility:hidden}to{visibility:visible}}@-o-keyframes -amp-start{from{visibility:hidden}to{visibility:visible}}@keyframes -amp-start{from{visibility:hidden}to{visibility:visible}}</style><noscript><style amp-boilerplate>body{-webkit-animation:none;-moz-animation:none;-ms-animation:none;animation:none}</style></noscript>
|
||||
<style amp-custom>
|
||||
@ -154,15 +154,16 @@
|
||||
<link rel="icon" href="{{ "favicon-32.png" | absURL }}" sizes="32x32">
|
||||
<link rel="icon" href="{{ "favicon-16.png" | absURL }}" sizes="16x16">
|
||||
<link rel="shortcut icon" href="{{ "favicon.ico" | absURL }}">
|
||||
<link rel="alternate" type="application/rss+xml" href="{{ "index.xml" | absURL }}" title="{{ .Site.Title }} (RSS)">
|
||||
{{ partial "schema-person.html" . }}
|
||||
{{ partial "schema-article.html" . }}
|
||||
<link rel="alternate" type="application/rss+xml" href="{{ "feed.xml" | absURL }}" title="{{ .Site.Title }} (RSS)">
|
||||
|
||||
{{ partial "schema-person" . }}
|
||||
{{ partial "schema-article" . }}
|
||||
</head>
|
||||
<body>
|
||||
<header>
|
||||
<nav>
|
||||
<a id="logo" href="{{ .Site.BaseURL }}" title="{{ .Site.Title }}">
|
||||
{{ partial "logo.html" . }}
|
||||
{{ partial "logo" . }}
|
||||
<span id="name">{{ .Site.Title }}</span>
|
||||
</a>
|
||||
|
||||
|
@ -6,11 +6,13 @@
|
||||
<div id="byline">
|
||||
by <a class="no-underline" href="{{ .Site.BaseURL }}" rel="me author">{{ .Site.Author.name }}</a>
|
||||
· <a class="no-underline" href="{{ .Permalink }}" title="{{ .Date.Format "Mon, Jan 2 2006 3:04:05 PM MST" }}">{{ .Date.Format "January 2, 2006" }}</a>
|
||||
· <a class="no-underline" href="{{ .Site.Params.gitRepo }}/blob/master/content/{{ .File.Path }}" title="Edit this page on GitHub" target="_blank" rel="noopener">Improve Post</a>
|
||||
{{ with .Site.Params.gitRepo }}· <a class="no-underline" href="{{ . }}/blob/master/content/{{ $.File.Path }}" title="Edit this page on GitHub" target="_blank" rel="noopener">Improve Post</a>{{ end }}
|
||||
<ul id="tags">
|
||||
{{- range .Params.tags }}
|
||||
{{- with .Params.tags }}
|
||||
{{- range . }}
|
||||
<li>{{ . }}</li>
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
|
@ -2,7 +2,9 @@
|
||||
<main id="video">
|
||||
<h1>{{ .Title }}</h1>
|
||||
|
||||
<video poster="{{ with .Resources.GetMatch "images/*.png" }}{{ .Permalink }}{{ end }}" controls crossorigin playsinline preload="none">
|
||||
<video
|
||||
{{ with .Resources.GetMatch "images/*.png" }}poster="{{ .Permalink }}"{{ end }}
|
||||
controls crossorigin playsinline preload="none">
|
||||
{{ with .Resources.GetMatch "*.webm" }}<source src="{{ .Permalink }}" type="video/webm">{{ end }}
|
||||
{{ with .Resources.GetMatch "*.mp4" }}<source src="{{ .Permalink }}" type="video/mp4">{{ end }}
|
||||
{{ with .Resources.GetMatch "*.ogg" }}<source src="{{ .Permalink }}" type="video/ogg">{{ end }}
|
||||
|
@ -1,5 +1,8 @@
|
||||
<footer>
|
||||
<div id="copyright">Content licensed under <a class="no-underline" href="https://creativecommons.org/licenses/by/4.0/" title="Creative Commons Attribution 4.0 International" target="_blank" rel="noopener">CC-BY-4.0</a>, <a class="no-underline" href="{{ .Site.Params.wayback }}" title="View Old Versions on Wayback Machine" id="wayback" target="_blank" rel="noopener">{{ .Site.Params.copyrightFirstYear }} –</a> {{ now.Format "2006" }}.</div>
|
||||
<div id="copyright">Content licensed under <a class="no-underline" href="https://creativecommons.org/licenses/by/4.0/" title="Creative Commons Attribution 4.0 International" target="_blank" rel="noopener">CC-BY-4.0</a>, {{ with .Site.Params.wayback }}<a class="no-underline" href="{{ . }}" title="View Old Versions on Wayback Machine" id="wayback" target="_blank" rel="noopener">{{ end }}{{ with .Site.Params.copyrightFirstYear }}{{ . }} –{{ end }}{{ if .Site.Params.wayback }}</a>{{ end }} {{ now.Format "2006" }}.</div>
|
||||
<div id="panda"><a class="no-underline" href="https://nationalzoo.si.edu/webcams/panda-cam" title="Live Panda Party!!!11" target="_blank" rel="noopener"><span>🐼</span></a></div>
|
||||
<div id="poweredby"><a class="no-underline" href="https://gohugo.io/" title="Powered by Hugo" id="hugo" target="_blank" rel="noopener">Powered by Hugo.</a> <a class="no-underline" href="{{ .Site.Params.gitRepo }}" title="View Source on GitHub" id="source" target="_blank" rel="noopener">View source.</a></div>
|
||||
<div id="poweredby">
|
||||
<a class="no-underline" href="https://gohugo.io/" title="Powered by Hugo" id="hugo" target="_blank" rel="noopener">Powered by Hugo.</a>
|
||||
{{ with .Site.Params.gitRepo }}<a class="no-underline" href="{{ . }}" title="View Source on GitHub" id="source" target="_blank" rel="noopener">View source.</a>{{ end }}
|
||||
</div>
|
||||
</footer>
|
||||
|
@ -1,13 +1,13 @@
|
||||
<header>
|
||||
<nav>
|
||||
<a class="no-underline" href="{{ .Site.BaseURL }}" id="logo" rel="me author" title="{{ .Site.Title }}" aria-label="{{ .Site.Title }}">
|
||||
{{ partial "logo.html" . }}
|
||||
{{ partial "logo" . }}
|
||||
<h1 id="name">{{ .Site.Title }}</h1>
|
||||
</a>
|
||||
<ul>
|
||||
<li><a class="no-underline" href="{{ .Site.BaseURL }}" title="Home">🏠</a></li>
|
||||
<li><a class="no-underline" href="{{ "notes/" | absURL }}" title="Notes">📝</a></li>
|
||||
<li><a class="no-underline" href="https://github.com/{{ .Site.Author.github }}" title="GitHub" target="_blank" rel="me noopener">👨‍💻</a></li>
|
||||
{{ with .Site.Author.github }}<li><a class="no-underline" href="https://github.com/{{ . }}" title="GitHub" target="_blank" rel="me noopener">👨‍💻</a></li>{{ end }}
|
||||
<li><a class="no-underline" href="mailto:jake@jarv.is" title="Email Me">💌</a></li>
|
||||
</ul>
|
||||
</nav>
|
||||
|
@ -1,5 +1,9 @@
|
||||
{{- $imagePath := "content/me_large.jpg" -}}
|
||||
{{- if .Params.image }}{{ $imagePath = (printf "%s%s%s%s" "content" (.OutputFormats.Get "html").RelPermalink "images/" .Params.image ) }}{{ end -}}
|
||||
{{- $imagePath := "" }}
|
||||
{{- with .Params.image }}
|
||||
{{- $imagePath = (printf "%s%s%s%s" "content" ($.OutputFormats.Get "html").RelPermalink "images/" .) }}
|
||||
{{- else }}
|
||||
{{- $imagePath = (printf "%s%s" "content" $.Site.Params.defaultimage) }}
|
||||
{{- end }}
|
||||
{{- $image := resources.Get $imagePath -}}
|
||||
|
||||
<meta property="og:title" content="{{ .Title }}">
|
||||
@ -8,10 +12,14 @@
|
||||
<meta property="og:locale" content="en_US">
|
||||
<meta property="og:url" content="{{ .Permalink }}">
|
||||
<meta property="og:description" content="{{ if .Description }}{{ .Description }}{{ else }}{{ .Site.Params.description }}{{ end }}">
|
||||
<meta property="og:image" content="{{ if .Params.image }}{{ (printf "%s%s%s" (.OutputFormats.Get "html").Permalink "images/" .Params.image ) }}{{ else }}{{ "me_large.jpg" | absURL }}{{ end }}">
|
||||
<meta property="og:image:width" content="{{ $image.Width }}">
|
||||
<meta property="og:image:height" content="{{ $image.Height }}">
|
||||
<meta property="og:image:alt" content="{{ .Title }}">
|
||||
|
||||
{{- with $image }}
|
||||
<meta property="og:image" content="{{ replace .Permalink "/content/" "/" }}">
|
||||
<meta property="og:image:width" content="{{ .Width }}">
|
||||
<meta property="og:image:height" content="{{ .Height }}">
|
||||
<meta property="og:image:alt" content="{{ $.Title }}">
|
||||
{{- end }}
|
||||
|
||||
{{- if .IsPage }}
|
||||
{{- if not .PublishDate.IsZero }}
|
||||
<meta property="article:published_time" content="{{ .PublishDate.Format "2006-01-02T15:04:05-07:00" | safeHTMLAttr }}">
|
||||
@ -25,11 +33,13 @@
|
||||
{{- with .Params.tags }}{{ range . }}
|
||||
<meta property="article:tag" content="{{ . }}">{{ end }}{{ end }}
|
||||
{{- end }}
|
||||
<meta property="fb:admins" content="{{ .Site.Author.facebook_id }}">
|
||||
<meta property="fb:app_id" content="{{ .Site.Params.facebook_app_id }}">
|
||||
{{ with .Site.Author.facebook_id }}<meta property="fb:admins" content="{{ . }}">{{ end }}
|
||||
{{ with .Site.Params.facebook_app_id }}<meta property="fb:app_id" content="{{ . }}">{{ end }}
|
||||
<meta name="twitter:card" content="summary">
|
||||
<meta name="twitter:domain" content="{{ .Site.Params.domain }}">
|
||||
<meta name="twitter:site" content="{{ printf "%s%s" "@" .Site.Author.twitter }}">
|
||||
<meta name="twitter:creator" content="{{ printf "%s%s" "@" .Site.Author.twitter }}">
|
||||
{{- with .Site.Author.twitter }}
|
||||
<meta name="twitter:site" content="{{ printf "%s%s" "@" . }}">
|
||||
<meta name="twitter:creator" content="{{ printf "%s%s" "@" . }}">
|
||||
{{- end }}
|
||||
<meta name="twitter:dnt" content="on">
|
||||
<meta name="twitter:widgets:csp" content="on">
|
||||
|
@ -1,5 +1,7 @@
|
||||
{{- $imagePath := "content/me_large.jpg" -}}
|
||||
{{- if .Params.image }}{{ $imagePath = (printf "%s%s%s%s" "content" (.OutputFormats.Get "html").RelPermalink "images/" .Params.image ) }}{{ end -}}
|
||||
{{- $imagePath := "" }}
|
||||
{{- with .Params.image }}
|
||||
{{- $imagePath = (printf "%s%s%s%s" "content" ($.OutputFormats.Get "html").RelPermalink "images/" .) }}
|
||||
{{- end }}
|
||||
{{- $image := resources.Get $imagePath -}}
|
||||
|
||||
<script type="application/ld+json">
|
||||
@ -13,14 +15,14 @@
|
||||
"datePublished": {{ .PublishDate.Format "2006-01-02T15:04:05-07:00" }},
|
||||
"dateModified": {{ .PublishDate.Format "2006-01-02T15:04:05-07:00" }},
|
||||
"keywords": {{ with .Params.tags }}{{ delimit . ", " }}{{ end }},
|
||||
"description": {{ if .Description }}{{ .Description }}{{ else }}{{ .Site.Params.description }}{{ end }},
|
||||
"description": {{ with .Description }}{{ . }}{{ else }}{{ .Site.Params.description }}{{ end }},
|
||||
"wordCount": "{{ .WordCount }}",
|
||||
"author": {
|
||||
"@id": "https://jarv.is/#author"
|
||||
"@id": {{ printf "%s%s" .Site.BaseURL "#author" }}
|
||||
},
|
||||
"publisher": {
|
||||
"@type": "Organization",
|
||||
"name": {{ .Site.Author.name }},
|
||||
"name": {{ .Site.Title }},
|
||||
"url": {{ .Site.BaseURL }},
|
||||
"logo": {
|
||||
"@type": "ImageObject",
|
||||
@ -28,12 +30,13 @@
|
||||
"width": "2048",
|
||||
"height": "2048"
|
||||
}
|
||||
},
|
||||
}{{ with $image }},
|
||||
"image": {
|
||||
"@type": "ImageObject",
|
||||
"url": {{ if .Params.image }}{{ (printf "%s%s%s" (.OutputFormats.Get "html").Permalink "images/" .Params.image ) }}{{ else }}{{ "me_large.jpg" | absURL }}{{ end }},
|
||||
"width": "{{ $image.Width }}",
|
||||
"height": "{{ $image.Height }}"
|
||||
"url": {{ replace .Permalink "/content/" "/" }},
|
||||
"width": "{{ .Width }}",
|
||||
"height": "{{ .Height }}"
|
||||
}
|
||||
{{- end }}
|
||||
}
|
||||
</script>
|
||||
|
@ -1,26 +1,36 @@
|
||||
{{- with .Site.Author -}}
|
||||
|
||||
{{- $image := "" }}
|
||||
{{- with $.Site.Params.defaultimage }}
|
||||
{{- $image = resources.Get (printf "%s%s" "content" .) }}
|
||||
{{- end -}}
|
||||
|
||||
<script type="application/ld+json">
|
||||
{
|
||||
"@context": "http://schema.org",
|
||||
"@type": "Person",
|
||||
"@id": {{ printf "%s%s" .Site.BaseURL "#author" }},
|
||||
"name": {{ .Site.Author.name }},
|
||||
"url": {{ .Site.BaseURL }},
|
||||
"description": {{ .Site.Params.description }},
|
||||
"jobTitle": {{ .Site.Author.jobtitle }},
|
||||
"@id": {{ printf "%s%s" $.Site.BaseURL "#author" }},
|
||||
"name": {{ $.Site.Author.name }},
|
||||
"url": {{ $.Site.BaseURL }},
|
||||
"description": {{ $.Site.Params.description }},
|
||||
{{ with .jobtitle }}"jobTitle": {{ . }},{{ end }}
|
||||
{{- with $image }}
|
||||
"image": {
|
||||
"@type": "ImageObject",
|
||||
"url": {{ "me_large.jpg" | absURL }},
|
||||
"width": "1200",
|
||||
"height": "1200"
|
||||
"url": {{ replace .Permalink "/content/" "/" }},
|
||||
"width": "{{ .Width }}",
|
||||
"height": "{{ .Height }}"
|
||||
},
|
||||
{{- end }}
|
||||
"sameAs": [
|
||||
{{ .Site.BaseURL }},
|
||||
{{ printf "%s%s" "https://github.com/" .Site.Author.github }},
|
||||
{{ printf "%s%s" "https://twitter.com/" .Site.Author.twitter }},
|
||||
{{ printf "%s%s%s" "https://www.linkedin.com/in/" .Site.Author.linkedin "/" }},
|
||||
{{ printf "%s%s" "https://www.facebook.com/" .Site.Author.facebook }},
|
||||
{{ printf "%s%s%s" "https://www.instagram.com/" .Site.Author.instagram "/" }},
|
||||
{{ printf "%s%s" "https://" .Site.Author.mastodon }}
|
||||
{{ $.Site.BaseURL }},
|
||||
{{ with .github }}{{ printf "%s%s" "https://github.com/" . }},{{ end }}
|
||||
{{ with .twitter }}{{ printf "%s%s" "https://twitter.com/" . }},{{ end }}
|
||||
{{ with .linkedin }}{{ printf "%s%s%s" "https://www.linkedin.com/in/" . "/" }},{{ end }}
|
||||
{{ with .facebook }}{{ printf "%s%s" "https://www.facebook.com/" . }},{{ end }}
|
||||
{{ with .instagram }}{{ printf "%s%s%s" "https://www.instagram.com/" . "/" }},{{ end }}
|
||||
{{ with .mastodon }}{{ printf "%s%s" "https://" . }}{{ end }}
|
||||
]
|
||||
}
|
||||
</script>
|
||||
{{- end -}}
|
||||
|
@ -4,10 +4,10 @@
|
||||
<link>{{ .Permalink }}</link>
|
||||
<description>{{ .Title }}</description>
|
||||
<generator>Hugo -- gohugo.io</generator>{{ with .Site.LanguageCode }}
|
||||
<language>{{.}}</language>{{end}}{{ with .Site.Author.email }}
|
||||
<managingEditor>{{.}}{{ with $.Site.Author.name }} ({{.}}){{end}}</managingEditor>{{end}}{{ with .Site.Author.email }}
|
||||
<webMaster>{{.}}{{ with $.Site.Author.name }} ({{.}}){{end}}</webMaster>{{end}}{{ with .Site.Copyright }}
|
||||
<copyright>{{.}}</copyright>{{end}}{{ if not .Date.IsZero }}
|
||||
<language>{{ . }}</language>{{ end }}{{ with .Site.Author.email }}
|
||||
<managingEditor>{{ . }}{{ with $.Site.Author.name }} ({{ . }}){{ end }}</managingEditor>{{ end }}{{ with .Site.Author.email }}
|
||||
<webMaster>{{ . }}{{ with $.Site.Author.name }} ({{ . }}){{ end }}</webMaster>{{ end }}{{ with .Site.Copyright }}
|
||||
<copyright>{{ . }}</copyright>{{ end }}{{ if not .Date.IsZero }}
|
||||
<lastBuildDate>{{ .Date.Format "Mon, 02 Jan 2006 15:04:05 -0700" | safeHTML }}</lastBuildDate>{{ end }}
|
||||
{{ with .OutputFormats.Get "RSS" }}
|
||||
{{- printf "<atom:link href=%q rel=\"self\" type=%q />" .Permalink .MediaType | safeHTML -}}
|
||||
@ -17,10 +17,12 @@
|
||||
<title>{{ .Title }}</title>
|
||||
<link>{{ .Permalink }}</link>
|
||||
<pubDate>{{ .Date.Format "Mon, 02 Jan 2006 15:04:05 -0700" | safeHTML }}</pubDate>
|
||||
{{ with .Site.Author.email }}<author>{{.}}{{ with $.Site.Author.name }} ({{.}}){{end}}</author>{{end}}
|
||||
{{ with .Site.Author.email }}<author>{{ . }}{{ with $.Site.Author.name }} ({{ . }}){{ end }}</author>{{ end }}
|
||||
<guid>{{ .Permalink }}</guid>
|
||||
<description>
|
||||
{{ .Summary | html }}
|
||||
{{ .Summary | html }}
|
||||
|
||||
{{ printf "<![CDATA[ <a href=%q>Read more...</a> ]]>" .Permalink | safeHTML }}
|
||||
</description>
|
||||
</item>
|
||||
{{ end }}
|
||||
|
@ -1,7 +1,7 @@
|
||||
<amp-iframe
|
||||
layout="responsive"
|
||||
width="1200"
|
||||
height="{{ if .Get "height" }}{{ .Get "height" }}{{ else }}500{{ end }}"
|
||||
height="{{ with .Get "height" }}{{ . }}{{ else }}500{{ end }}"
|
||||
scrolling="no"
|
||||
src="https://codepen.io/{{ .Get "username" }}/embed/{{ .Get "id" }}/?height={{ if .Get "height" }}{{ .Get "height" }}{{ else }}500{{ end }}&theme-id=light&default-tab={{ .Get "left-tab" }}{{ if .Get "right-tab" }},{{ .Get "right-tab" }}{{ end }}">
|
||||
src="https://codepen.io/{{ .Get "username" }}/embed/{{ .Get "id" }}/?height={{ if .Get "height" }}{{ .Get "height" }}{{ else }}500{{ end }}&theme-id=light&default-tab={{ .Get "left-tab" }}{{ with .Get "right-tab" }},{{ . }}{{ end }}">
|
||||
</amp-iframe>
|
||||
|
@ -1 +1,6 @@
|
||||
<iframe height="{{ if .Get "height" }}{{ .Get "height" }}{{ else }}500{{ end }}" style="width: 100%;" scrolling="no" src="https://codepen.io/{{ .Get "username" }}/embed/{{ .Get "id" }}/?height={{ if .Get "height" }}{{ .Get "height" }}{{ else }}500{{ end }}&theme-id=light&default-tab={{ .Get "left-tab" }}{{ if .Get "right-tab" }},{{ .Get "right-tab" }}{{ end }}"></iframe>
|
||||
<iframe
|
||||
height="{{ with .Get "height" }}{{ . }}{{ else }}500{{ end }}"
|
||||
style="width: 100%;"
|
||||
scrolling="no"
|
||||
src="https://codepen.io/{{ .Get "username" }}/embed/{{ .Get "id" }}/?height={{ with .Get "height" }}{{ . }}{{ else }}500{{ end }}&theme-id=light&default-tab={{ .Get "left-tab" }}{{ with .Get "right-tab" }},{{ . }}{{ end }}">
|
||||
</iframe>
|
||||
|
@ -1 +1,3 @@
|
||||
<p class="center"><a href="https://github.com/{{ .Get "username" }}/{{ .Get "repo" }}" target="_blank" rel="noopener">View on GitHub</a></p>
|
||||
<p class="center">
|
||||
<a href="https://github.com/{{ .Get "username" }}/{{ with .Get "repo" }}{{ . }}{{ end }}" target="_blank" rel="noopener">View on GitHub.</a>
|
||||
</p>
|
||||
|
@ -1,2 +1,5 @@
|
||||
<p style="text-align: center;"><a class="github-button" href="https://github.com/{{ .Get "username" }}/{{ .Get "repo" }}" data-icon="octicon-star" data-size="large" data-show-count="true" aria-label="Star {{ .Get "username" }}/{{ .Get "repo" }} on GitHub">Star</a> <a class="github-button" href="https://github.com/{{ .Get "username" }}/{{ .Get "repo" }}/issues" data-icon="octicon-issue-opened" data-size="large" data-show-count="true" aria-label="Issue {{ .Get "username" }}/{{ .Get "repo" }} on GitHub">Issue</a></p>
|
||||
<p style="text-align: center;">
|
||||
<a class="github-button" href="https://github.com/{{ .Get "username" }}/{{ .Get "repo" }}" data-icon="octicon-star" data-size="large" data-show-count="true" aria-label="Star {{ .Get "username" }}/{{ .Get "repo" }} on GitHub">Star</a>
|
||||
<a class="github-button" href="https://github.com/{{ .Get "username" }}/{{ .Get "repo" }}/issues" data-icon="octicon-issue-opened" data-size="large" data-show-count="true" aria-label="Issue {{ .Get "username" }}/{{ .Get "repo" }} on GitHub">Issue</a>
|
||||
</p>
|
||||
<script async defer src="https://buttons.github.io/buttons.js"></script>
|
||||
|
@ -10,7 +10,7 @@
|
||||
{{- $retinaWidth := (mul $setWidth 2) -}}
|
||||
|
||||
{{- if gt $original.Width $retinaWidth -}}
|
||||
{{- $finalWidth := (printf "%dx" $retinaWidth ) -}}
|
||||
{{- $finalWidth := (printf "%dx" $retinaWidth) -}}
|
||||
{{- .Scratch.Set "image" ($original.Resize $finalWidth) -}}
|
||||
{{- end -}}
|
||||
{{- else -}}
|
||||
@ -28,13 +28,12 @@
|
||||
|
||||
<p class="image">
|
||||
<amp-img
|
||||
alt="{{ .Get "alt" }}"
|
||||
{{ with .Get "alt" }}alt="{{ . }}"{{ end }}
|
||||
src="{{ $image.Permalink }}"
|
||||
width="{{ $displayWidth }}"
|
||||
height="{{ $displayHeight }}"
|
||||
layout="intrinsic"
|
||||
>
|
||||
layout="intrinsic">
|
||||
</amp-img>
|
||||
</p>
|
||||
|
||||
{{- with (.Get "caption") }}<p class="caption"><em>{{ . }}</em></p>{{ end -}}
|
||||
{{- with .Get "caption" }}<p class="caption"><em>{{ . }}</em></p>{{ end -}}
|
||||
|
@ -12,7 +12,7 @@
|
||||
{{- $retinaWidth := (mul $setWidth 2) -}}
|
||||
|
||||
{{- if gt $original.Width $retinaWidth -}}
|
||||
{{- $finalWidth := (printf "%dx" $retinaWidth ) -}}
|
||||
{{- $finalWidth := (printf "%dx" $retinaWidth) -}}
|
||||
{{- .Scratch.Set "image" ($original.Resize $finalWidth) -}}
|
||||
{{- end -}}
|
||||
{{- else -}}
|
||||
@ -35,11 +35,11 @@
|
||||
<p>
|
||||
{{- end -}}
|
||||
<img src="{{ $image.Permalink }}" width="{{ $displayWidth }}" height="{{ $displayHeight }}"
|
||||
{{- if .Get "alt" }} alt="{{ .Get "alt" }}"{{ end }}
|
||||
{{- if .Get "caption" }} title="{{ .Get "caption"}}"{{ end }}>
|
||||
{{- if .Get "caption" -}}
|
||||
{{- with .Get "alt" }} alt="{{ . }}"{{ end }}
|
||||
{{- with .Get "caption" }} title="{{ . }}"{{ end }}>
|
||||
{{- with .Get "caption" -}}
|
||||
</picture>
|
||||
<figcaption>{{ .Get "caption" }}</figcaption>
|
||||
<figcaption>{{ . }}</figcaption>
|
||||
</figure>
|
||||
{{- else -}}
|
||||
</p>
|
||||
|
@ -1,21 +1,16 @@
|
||||
{{- $video_webm := .Page.Resources.GetMatch (.Get "webm") -}}
|
||||
{{- $video_mp4 := .Page.Resources.GetMatch (.Get "mp4") -}}
|
||||
{{- $video_ogg := .Page.Resources.GetMatch (.Get "ogg") -}}
|
||||
{{- $img_poster := .Page.Resources.GetMatch (.Get "poster") -}}
|
||||
|
||||
<amp-video
|
||||
layout="responsive"
|
||||
width="{{ if .Get "width" }}{{ .Get "width" }}{{ else }}910{{ end }}"
|
||||
height="{{ if .Get "height" }}{{ .Get "height" }}{{ else }}600{{ end }}"
|
||||
{{- if .Get "poster" }} poster="{{ $img_poster.Permalink }}"{{ end }}
|
||||
width="{{ with .Get "width" }}{{ . }}{{ else }}910{{ end }}"
|
||||
height="{{ with .Get "height" }}{{ . }}{{ else }}600{{ end }}"
|
||||
{{- with .Page.Resources.GetMatch (.Get "poster") }} poster="{{ .Permalink }}"{{ end }}
|
||||
{{- if .Get "autoplay" }} autoplay{{ end }}
|
||||
{{- if .Get "loop" }} loop{{ end }}
|
||||
{{- if ne (.Get "nocontrols") "1" }} controls{{ end }}>
|
||||
{{ if .Get "webm" }}<source src="{{ $video_webm.Permalink }}" type="video/webm">{{ end }}
|
||||
{{ if .Get "mp4" }}<source src="{{ $video_mp4.Permalink }}" type="video/mp4">{{ end }}
|
||||
{{ if .Get "ogg" }}<source src="{{ $video_ogg.Permalink }}" type="video/ogg">{{ end }}
|
||||
{{ with .Page.Resources.GetMatch (.Get "webm") }}<source src="{{ .Permalink }}" type="video/webm">{{ end }}
|
||||
{{ with .Page.Resources.GetMatch (.Get "mp4") }}<source src="{{ .Permalink }}" type="video/mp4">{{ end }}
|
||||
{{ with .Page.Resources.GetMatch (.Get "ogg") }}<source src="{{ .Permalink }}" type="video/ogg">{{ end }}
|
||||
|
||||
<div fallback>
|
||||
<p>Your browser does not support HTML5 video. <a href="{{ $video_mp4.Permalink }}">Load the .mp4 video directly.</a></p>
|
||||
<p>Your browser does not support HTML5 video. {{ with .Page.Resources.GetMatch (.Get "mp4") }}<a href="{{ .Permalink }}">Load the .mp4 video directly.</a>{{ end }}</p>
|
||||
</div>
|
||||
</amp-video>
|
||||
|
@ -1,18 +1,13 @@
|
||||
{{- $video_webm := .Page.Resources.GetMatch (.Get "webm") -}}
|
||||
{{- $video_mp4 := .Page.Resources.GetMatch (.Get "mp4") -}}
|
||||
{{- $video_ogg := .Page.Resources.GetMatch (.Get "ogg") -}}
|
||||
{{- $img_poster := .Page.Resources.GetMatch (.Get "poster") -}}
|
||||
|
||||
<video class="embed"
|
||||
{{- if .Get "width" }} width="{{ .Get "width" }}"{{ end }}
|
||||
{{- if .Get "height" }} height="{{ .Get "height" }}"{{ end }}
|
||||
{{- if .Get "poster" }} poster="{{ $img_poster.Permalink }}"{{ end }}
|
||||
{{- with .Get "width" }} width="{{ . }}"{{ end }}
|
||||
{{- with .Get "height" }} height="{{ . }}"{{ end }}
|
||||
{{- with .Page.Resources.GetMatch (.Get "poster") }} poster="{{ .Permalink }}"{{ end }}
|
||||
{{- if .Get "autoplay" }} autoplay{{ end }}
|
||||
{{- if .Get "loop" }} loop{{ end }}
|
||||
{{- if ne (.Get "nocontrols") "1" }} controls{{ end }}>
|
||||
{{ if .Get "webm" }}<source src="{{ $video_webm.Permalink }}" type="video/webm">{{ end }}
|
||||
{{ if .Get "mp4" }}<source src="{{ $video_mp4.Permalink }}" type="video/mp4">{{ end }}
|
||||
{{ if .Get "ogg" }}<source src="{{ $video_ogg.Permalink }}" type="video/ogg">{{ end }}
|
||||
{{ with .Page.Resources.GetMatch (.Get "webm") }}<source src="{{ .Permalink }}" type="video/webm">{{ end }}
|
||||
{{ with .Page.Resources.GetMatch (.Get "mp4") }}<source src="{{ .Permalink }}" type="video/mp4">{{ end }}
|
||||
{{ with .Page.Resources.GetMatch (.Get "ogg") }}<source src="{{ .Permalink }}" type="video/ogg">{{ end }}
|
||||
|
||||
<p>Your browser does not support HTML5 video. <a href="{{ $video_mp4.Permalink }}">Load the .mp4 video directly.</a></p>
|
||||
<p>Your browser does not support HTML5 video. {{ with .Page.Resources.GetMatch (.Get "mp4") }}<a href="{{ .Permalink }}">Load the .mp4 video directly.</a>{{ end }}</p>
|
||||
</video>
|
||||
|
@ -1,3 +1,7 @@
|
||||
<div class="embed video-player">
|
||||
<iframe class="youtube-player" src="https://www.youtube-nocookie.com/embed/{{ index .Params 0 }}?autoplay=0&hl=en&fs=1&showinfo=1&rel=0&iv_load_policy=3" allowfullscreen></iframe>
|
||||
<iframe
|
||||
class="youtube-player"
|
||||
src="https://www.youtube-nocookie.com/embed/{{ index .Params 0 }}?autoplay=0&hl=en&fs=1&showinfo=1&rel=0&iv_load_policy=3"
|
||||
allowfullscreen>
|
||||
</iframe>
|
||||
</div>
|
||||
|
@ -25,11 +25,15 @@
|
||||
# Support ancient RSS subscriptions from WordPress era:
|
||||
[[redirects]]
|
||||
from = "/feed"
|
||||
to = "/index.xml"
|
||||
to = "/feed.xml"
|
||||
status = 301
|
||||
[[redirects]]
|
||||
from = "/rss"
|
||||
to = "/index.xml"
|
||||
to = "/feed.xml"
|
||||
status = 301
|
||||
[[redirects]]
|
||||
from = "/index.xml"
|
||||
to = "/feed.xml"
|
||||
status = 301
|
||||
|
||||
# Mirror Y2K site from GitHub Pages:
|
||||
|
@ -18,7 +18,7 @@
|
||||
"build:preview": "yarn clean && yarn hugo:build-dev",
|
||||
"hugo:build": "hugo --gc --cleanDestinationDir --verbose",
|
||||
"hugo:build-dev": "cross-env HUGO_ENV=development hugo -e development -b $DEPLOY_PRIME_URL --gc --cleanDestinationDir --buildDrafts --buildFuture --verbose",
|
||||
"hugo:serve": "hugo server --buildDrafts --buildFuture --port 1313 --bind 0.0.0.0 --verbose",
|
||||
"hugo:serve": "hugo server --buildDrafts --buildFuture --renderToDisk --port 1313 --bind 0.0.0.0 --verbose",
|
||||
"docker:serve": "docker build -t jarv.is:develop -f Dockerfile . && docker run -v $(pwd):/src -p 1313:1313 jarv.is:develop",
|
||||
"netlify:serve": "netlify dev --command 'yarn hugo:serve'",
|
||||
"optimize": "yarn optimize:html && yarn optimize:css && yarn optimize:img",
|
||||
|
Loading…
x
Reference in New Issue
Block a user