mirror of
https://github.com/jakejarvis/jarv.is.git
synced 2025-07-19 04:35:31 -04:00
make the main content/blog section configurable instead of hardcoded to notes
This commit is contained in:
@@ -2,7 +2,7 @@
|
||||
<main id="single">
|
||||
<article>
|
||||
<div id="meta">
|
||||
<a class="no-underline" href="{{ .Permalink }}" title="{{ .Date.Format "Mon, Jan 2 2006 3:04:05 PM MST" }}">{{ .Date.Format "January 2, 2006" }}</a>{{ with .Site.Params.gitRepo }}<span class="dash">—</span><a class="no-underline" href="{{ . }}/blob/master/content/{{ $.File.Path }}" title="Edit this post on GitHub" target="_blank" rel="noopener">Improve This Post</a>{{ end }}
|
||||
<a class="no-underline" href="{{ .Permalink }}" title="{{ .Date.Format "Mon, Jan 2 2006 3:04:05 PM MST" }}">{{ .Date.Format "January 2, 2006" }}</a>{{ with .Site.Params.github }}<span class="dash">—</span><a class="no-underline" href="https://github.com/{{ . }}/blob/master/content/{{ $.File.Path }}" title="Edit this post on GitHub" target="_blank" rel="noopener">Improve This Post</a>{{ end }}
|
||||
</div>
|
||||
|
||||
<h1 id="title"><a class="no-underline" href="{{ .Permalink }}">{{ .Title | markdownify }}</a></h1>
|
||||
|
@@ -20,7 +20,7 @@
|
||||
{{- range .AlternativeOutputFormats }}
|
||||
{{ printf `<link rel="alternate" type="%s" href="%s" />` .MediaType.Type .Permalink | safeHTML }}
|
||||
{{- end }}
|
||||
{{- range (where .Site.RegularPages "Section" "notes") }}
|
||||
{{- range (where .Site.RegularPages "Section" .Site.Params.mainSection) }}
|
||||
<entry>
|
||||
<title>{{ .Title }}</title>
|
||||
{{- with .Site.Author.name }}
|
||||
|
@@ -10,7 +10,7 @@
|
||||
{{ partialCached "head/feeds" . -}}
|
||||
{{ partialCached "head/webmention" . -}}
|
||||
<link rel="author" href="{{ "humans.txt" | absURL }}">
|
||||
{{ if and .IsPage (eq .Type "notes") }}
|
||||
{{ if and .IsPage (eq .Type .Site.Params.mainSection) }}
|
||||
{{- with .OutputFormats.Get "amp" -}}
|
||||
<link rel="amphtml" href="{{ .Permalink }}">
|
||||
{{- end }}
|
||||
|
@@ -1,6 +1,6 @@
|
||||
<meta property="og:title" content="{{ .Title }}">
|
||||
<meta property="og:site_name" content="{{ .Site.Title }}">
|
||||
<meta property="og:type" content="{{ if and .IsPage (eq .Type "notes") }}article{{ else }}website{{ end }}">
|
||||
<meta property="og:type" content="{{ if and .IsPage (eq .Type .Site.Params.mainSection) }}article{{ else }}website{{ end }}">
|
||||
<meta property="og:locale" content="en_US">
|
||||
<meta property="og:url" content="{{ .Permalink }}">
|
||||
<meta property="og:description" content="{{ with .Description }}{{ . }}{{ else }}{{ .Site.Params.description }}{{ end }}">
|
||||
@@ -10,7 +10,7 @@
|
||||
<meta property="og:image:height" content="{{ .Scratch.Get "socialImage_height" }}">
|
||||
<meta property="og:image:alt" content="{{ .Title }}">
|
||||
|
||||
{{- if and .IsPage (eq .Type "notes") }}
|
||||
{{- if and .IsPage (eq .Type .Site.Params.mainSection) }}
|
||||
{{- if not .PublishDate.IsZero }}
|
||||
<meta property="article:published_time" content="{{ .PublishDate.Format "2006-01-02T15:04:05-07:00" | safeHTMLAttr }}">
|
||||
<meta property="article:modified_time" content="{{ .PublishDate.Format "2006-01-02T15:04:05-07:00" | safeHTMLAttr }}">
|
||||
|
@@ -1,6 +1,6 @@
|
||||
{{ if eq hugo.Environment "production" }}
|
||||
<link rel="preconnect" href="https://s.jarv.is" crossorigin>
|
||||
{{ if and .IsPage (and (eq .Type "notes") (ne .Params.comments false)) }}
|
||||
{{ if and .IsPage (and (eq .Type .Site.Params.mainSection) (ne .Params.comments false)) }}
|
||||
<link rel="preconnect" href="https://utteranc.es" crossorigin>
|
||||
<link rel="preconnect" href="https://api.utteranc.es" crossorigin>
|
||||
<link rel="preconnect" href="https://api.github.com" crossorigin>
|
||||
|
@@ -6,7 +6,7 @@
|
||||
|
||||
<div id="poweredby">
|
||||
<a class="no-underline" href="https://gohugo.io/" title="Powered by Hugo" id="hugo" target="_blank" rel="noopener">Made with <span class="beat">❤</span> and 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 }}
|
||||
{{ with .Site.Params.github }}<a class="no-underline" href="https://github.com/{{ . }}" title="View Source on GitHub" id="source" target="_blank" rel="noopener">View source.</a>{{ end }}
|
||||
</div>
|
||||
</div>
|
||||
</footer>
|
||||
|
@@ -1,6 +1,6 @@
|
||||
<script async defer
|
||||
src="https://utteranc.es/client.js"
|
||||
data-repo="{{ .Site.Params.utterancesRepo }}"
|
||||
data-repo="{{ .Site.Params.github }}"
|
||||
data-issue-term="og:title"
|
||||
data-label="comments"
|
||||
data-theme="github-light"
|
||||
|
@@ -16,7 +16,7 @@
|
||||
</image>{{ end }}{{ with .OutputFormats.Get "RSS" }}
|
||||
{{ printf "<atom:link href=%q rel=\"self\" type=%q />" .Permalink .MediaType | safeHTML -}}
|
||||
{{ end }}
|
||||
{{- range (where .Site.RegularPages "Section" "notes") }}
|
||||
{{- range (where .Site.RegularPages "Section" .Site.Params.mainSection) }}
|
||||
<item>
|
||||
<title>{{ .Title }}</title>
|
||||
<link>{{ .Permalink }}</link>
|
||||
|
Reference in New Issue
Block a user