Merge pull request #1 from iamthomastaylor/add-changes
Update `bearcub` to incorporate my preferences
This commit is contained in:
commit
7d0fd1a5a2
8 changed files with 51 additions and 16 deletions
|
@ -6,10 +6,18 @@
|
||||||
<meta charset="utf-8">
|
<meta charset="utf-8">
|
||||||
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
||||||
{{- partial "favicon.html" . -}}
|
{{- partial "favicon.html" . -}}
|
||||||
|
{{ if .IsHome }}
|
||||||
|
<title>{{ .Site.Title }}</title>
|
||||||
|
{{ else }}
|
||||||
<title>{{- block "title" . }}{{ with .Title }}{{ . }} | {{ end }}{{ .Site.Title }}{{- end }}</title>
|
<title>{{- block "title" . }}{{ with .Title }}{{ . }} | {{ end }}{{ .Site.Title }}{{- end }}</title>
|
||||||
|
{{ end }}
|
||||||
|
|
||||||
{{- partial "seo_tags.html" . -}}
|
{{- partial "seo_tags.html" . -}}
|
||||||
<meta name="referrer" content="no-referrer-when-downgrade" />
|
<meta name="referrer" content="no-referrer-when-downgrade" />
|
||||||
|
<script
|
||||||
|
data-goatcounter="{{ .Site.Params.goatcounter }}"
|
||||||
|
async src="https://gc.zgo.at/count.js">
|
||||||
|
</script>
|
||||||
|
|
||||||
{{ $style := resources.Get "style.css" | minify }}
|
{{ $style := resources.Get "style.css" | minify }}
|
||||||
<link href="{{ $style.RelPermalink }}" rel="stylesheet">
|
<link href="{{ $style.RelPermalink }}" rel="stylesheet">
|
||||||
|
@ -40,6 +48,7 @@
|
||||||
</header>
|
</header>
|
||||||
<main id="main-content">
|
<main id="main-content">
|
||||||
{{- block "main" . }}{{- end }}
|
{{- block "main" . }}{{- end }}
|
||||||
|
{{- partial "custom_main.html" . -}}
|
||||||
</main>
|
</main>
|
||||||
<footer>
|
<footer>
|
||||||
{{- partial "footer.html" . -}}
|
{{- partial "footer.html" . -}}
|
||||||
|
|
|
@ -1,7 +1,12 @@
|
||||||
{{ define "main" }}
|
{{ define "main" }}
|
||||||
<content>
|
<content>
|
||||||
{{ if .Data.Singular }}
|
{{ if .Data.Singular }}
|
||||||
<h3 class="blog-filter">{{ i18n "filtering-for" }} "{{ .Title }}"</h3>
|
<h1 class="blog-filter">{{ i18n "filtering-for" }} "{{ .Title }}"</h1>
|
||||||
|
{{ else }}
|
||||||
|
<h1 class="blog-filter">{{ .Title }}</h1>
|
||||||
|
{{ $t := .Site.GetPage "tags"}}
|
||||||
|
{{ $c := .Site.GetPage "categories"}}
|
||||||
|
<p>{{ .Pages.Len }} posts sortable by <a href="{{ $c.Permalink }}">categories</a> or <a href="{{ $t.Permalink }}">tags</a>.</p>
|
||||||
{{ end }}
|
{{ end }}
|
||||||
<ul class="blog-posts">
|
<ul class="blog-posts">
|
||||||
{{ range .Pages }}
|
{{ range .Pages }}
|
||||||
|
@ -25,12 +30,5 @@
|
||||||
</li>
|
</li>
|
||||||
{{ end }}
|
{{ end }}
|
||||||
</ul>
|
</ul>
|
||||||
{{ if not .Data.Singular }}
|
|
||||||
<div>
|
|
||||||
{{ range .Site.Taxonomies.tags }}
|
|
||||||
<a class="blog-tags" href="{{ .Page.Permalink }}">#{{ .Page.Title }}</a>
|
|
||||||
{{ end }}
|
|
||||||
</div>
|
|
||||||
{{ end }}
|
|
||||||
</content>
|
</content>
|
||||||
{{ end }}
|
{{ end }}
|
||||||
|
|
|
@ -18,7 +18,6 @@
|
||||||
<title>{{ if .IsHome }}{{ .Site.Title }}{{ else }}{{ with .Title }}{{.}} on {{ end }}{{ .Site.Title }}{{ end }}</title>
|
<title>{{ if .IsHome }}{{ .Site.Title }}{{ else }}{{ with .Title }}{{.}} on {{ end }}{{ .Site.Title }}{{ end }}</title>
|
||||||
<link>{{ .Permalink }}</link>
|
<link>{{ .Permalink }}</link>
|
||||||
<description>Recent content {{ if not .IsHome }}{{ with .Title }}in {{.}} {{ end }}{{ end }}on {{ .Site.Title }}</description>
|
<description>Recent content {{ if not .IsHome }}{{ with .Title }}in {{.}} {{ end }}{{ end }}on {{ .Site.Title }}</description>
|
||||||
<generator>Hugo -- gohugo.io</generator>
|
|
||||||
<language>{{ site.Language.LanguageCode }}</language>{{ with .Site.Author.email }}
|
<language>{{ site.Language.LanguageCode }}</language>{{ with .Site.Author.email }}
|
||||||
<managingEditor>{{.}}{{ with $.Site.Author.name }} ({{.}}){{end}}</managingEditor>{{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 }}
|
<webMaster>{{.}}{{ with $.Site.Author.name }} ({{.}}){{end}}</webMaster>{{end}}{{ with .Site.Copyright }}
|
||||||
|
|
|
@ -16,11 +16,16 @@
|
||||||
<a class="blog-tags" href="{{ .Permalink }}">#{{ .LinkTitle }}</a>
|
<a class="blog-tags" href="{{ .Permalink }}">#{{ .LinkTitle }}</a>
|
||||||
{{ end }}
|
{{ end }}
|
||||||
</p>
|
</p>
|
||||||
{{ with .Site.Social.email }}
|
{{ with .Site.Params.social.email }}
|
||||||
<p>
|
<p>
|
||||||
<a href='mailto:{{ . }}?subject={{ i18n "email-subject" }}"{{ default $.Site.Title $.Page.Title }}"'>
|
<a href='mailto:{{ . }}?subject={{ i18n "email-subject" }}"{{ default $.Site.Title $.Page.Title }}"'>
|
||||||
{{ i18n "email-reply" }} ↪
|
{{ i18n "email-reply" }} ↪
|
||||||
</a>
|
</a>
|
||||||
</p>
|
</p>
|
||||||
{{ end }}
|
{{ end }}
|
||||||
|
<p>
|
||||||
|
<a href="https://weeklywtf.beehiiv.com/subscribe">
|
||||||
|
Subscribe to weekly tech news →
|
||||||
|
</a>
|
||||||
|
</p>
|
||||||
{{ end }}
|
{{ end }}
|
||||||
|
|
25
layouts/partials/custom_main.html
Normal file
25
layouts/partials/custom_main.html
Normal file
|
@ -0,0 +1,25 @@
|
||||||
|
{{ if .IsHome }}
|
||||||
|
{{ $pages := first .Site.Params.latestPostsCount (where .Site.RegularPages "Section" "blog") }}
|
||||||
|
<ul class="blog-posts">
|
||||||
|
{{ range $pages }}
|
||||||
|
<li>
|
||||||
|
<span>
|
||||||
|
<i>
|
||||||
|
<time datetime='{{ .Date.Format "2006-01-02" }}' pubdate>
|
||||||
|
{{ .Date.Format (default "2006-01-02" .Site.Params.dateFormat) }}
|
||||||
|
</time>
|
||||||
|
</i>
|
||||||
|
</span>
|
||||||
|
{{ if .Params.link }}
|
||||||
|
<a href="{{ .Params.link }}" target="_blank">{{ .Title }} ↪</a>
|
||||||
|
{{ else }}
|
||||||
|
<a href="{{ .Permalink }}">{{ .Title }}</a>
|
||||||
|
{{ end }}
|
||||||
|
</li>
|
||||||
|
{{ else }}
|
||||||
|
<li>
|
||||||
|
{{ i18n "no-posts" }}
|
||||||
|
</li>
|
||||||
|
{{ end }}
|
||||||
|
</ul>
|
||||||
|
{{ end }}
|
|
@ -1,3 +1,3 @@
|
||||||
<small>
|
<small>
|
||||||
{{ .Site.Copyright }} | {{ markdownify .Site.Params.madeWith }}
|
{{ .Site.Copyright }}
|
||||||
</small>
|
</small>
|
|
@ -1,7 +1,6 @@
|
||||||
{{ range .Site.Menus.main.ByWeight }}
|
{{ range .Site.Menus.main.ByWeight }}
|
||||||
<a href="{{ .URL }}">{{ .Name }}</a>
|
<a href="{{ .URL }}">{{ lower .Name }}</a>
|
||||||
{{ end }}
|
{{ end }}
|
||||||
<a href='{{ absURL "index.xml" }}'>RSS</a>
|
|
||||||
|
|
||||||
<!-- Convert this page's translations into a dict -->
|
<!-- Convert this page's translations into a dict -->
|
||||||
{{ $translations := dict }}
|
{{ $translations := dict }}
|
||||||
|
|
|
@ -73,7 +73,7 @@
|
||||||
|
|
||||||
<meta name="twitter:title" content="{{ .Title }}"/>
|
<meta name="twitter:title" content="{{ .Title }}"/>
|
||||||
<meta name="twitter:description" content="{{ with .Description }}{{ . }}{{ else }}{{if .IsPage}}{{ .Summary }}{{ else }}{{ with .Site.Params.description }}{{ . }}{{ end }}{{ end }}{{ end -}}"/>
|
<meta name="twitter:description" content="{{ with .Description }}{{ . }}{{ else }}{{if .IsPage}}{{ .Summary }}{{ else }}{{ with .Site.Params.description }}{{ . }}{{ end }}{{ end }}{{ end -}}"/>
|
||||||
{{ with .Site.Social.twitter -}}
|
{{ with .Site.Params.social.twitter -}}
|
||||||
<meta name="twitter:site" content="@{{ . }}"/>
|
<meta name="twitter:site" content="@{{ . }}"/>
|
||||||
{{ end -}}
|
{{ end -}}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue