mirror of
https://github.com/jakejarvis/jarv.is.git
synced 2025-07-19 12:35:31 -04:00
organize config.toml params, and stop treating frontmattered CSS as SCSS unnecessarily -- it appears to cause some weird race condition with temporary files every once in a while...? not the intended use anyways though.
This commit is contained in:
@@ -3,7 +3,7 @@
|
||||
{{ $original := .Page.Resources.GetMatch (.Get "src") }}
|
||||
{{ .Scratch.Set "image" $original }}
|
||||
|
||||
{{ $setWidth := .Site.Params.maxWidth }}
|
||||
{{ $setWidth := .Site.Params.Theme.maxWidth }}
|
||||
|
||||
{{ if .Get "width" }}
|
||||
{{ $setWidth = (int (.Get "width")) }}
|
||||
|
@@ -9,7 +9,7 @@
|
||||
<link rel="author" href="{{ "humans.txt" | absURL }}">
|
||||
|
||||
{{/* if this is a page/post, link View Source to specific file on GitHub. otherwise, just link to repo homepage. */}}
|
||||
{{- with .Site.Params.githubRepo }}
|
||||
{{- with .Site.Params.social.githubRepo }}
|
||||
{{- $githubURL := printf "https://github.com/%s" . }}
|
||||
{{- if not $.IsPage }}
|
||||
{{- $.Scratch.Set "sourceURL" $githubURL }}
|
||||
|
@@ -21,20 +21,20 @@
|
||||
<meta property="article:published_time" content="{{ .Date.Format "2006-01-02T15:04:05-07:00" | safeHTMLAttr }}">
|
||||
<meta property="article:modified_time" content="{{ .Date.Format "2006-01-02T15:04:05-07:00" | safeHTMLAttr }}">
|
||||
{{- end }}
|
||||
{{- with .Site.Author.facebook }}
|
||||
{{- with .Site.Author.social.facebook }}
|
||||
<meta property="article:author" content="https://www.facebook.com/{{ . }}">{{ end }}
|
||||
{{- with .Params.tags }}{{ range . }}
|
||||
<meta property="article:tag" content="{{ . }}">{{ end }}{{ end }}
|
||||
{{ end -}}
|
||||
|
||||
{{ with .Site.Author.facebookid }}<meta property="fb:admins" content="{{ . }}">{{ end }}
|
||||
{{ with .Site.Params.facebookAppID }}<meta property="fb:app_id" content="{{ . }}">{{ end }}
|
||||
{{ with .Site.Author.social.facebookid }}<meta property="fb:admins" content="{{ . }}">{{ end }}
|
||||
{{ with .Site.Params.social.facebookAppID }}<meta property="fb:app_id" content="{{ . }}">{{ end }}
|
||||
|
||||
<meta name="twitter:card" content="{{ if .IsPage }}summary_large_image{{ else }}summary{{ end }}">
|
||||
<meta name="twitter:domain" content="{{ (urls.Parse .Site.BaseURL).Host }}">
|
||||
{{- with .Site.Author.twitter }}
|
||||
{{- with .Site.Author.social.twitter }}
|
||||
<meta name="twitter:site" content="{{ printf "%s%s" "@" . }}">
|
||||
<meta name="twitter:creator" content="{{ printf "%s%s" "@" . }}">
|
||||
{{ end -}}
|
||||
{{ with .Site.Author.twitterid }}<meta name="twitter:creator_id" content="{{ . }}">{{ end }}
|
||||
{{ with .Site.Author.social.twitterid }}<meta name="twitter:creator_id" content="{{ . }}">{{ end }}
|
||||
<meta name="twitter:dnt" content="on">
|
||||
|
@@ -6,8 +6,7 @@
|
||||
"@id": {{ path.Join $.Site.BaseURL "#author" }},
|
||||
"name": {{ .name }},
|
||||
"url": {{ $.Site.BaseURL }},
|
||||
"description": {{ $.Site.Params.description }},
|
||||
{{ with .jobtitle }}"jobTitle": {{ . }},{{ end }}{{ with $.Scratch.Get "authorImage" }}
|
||||
"description": {{ $.Site.Params.description }},{{ with $.Scratch.Get "authorImage" }}
|
||||
"image": {
|
||||
"@type": "ImageObject",
|
||||
"url": {{ .Permalink }},
|
||||
@@ -15,7 +14,7 @@
|
||||
"height": "{{ .Height }}"
|
||||
},{{ end }}
|
||||
"sameAs": [
|
||||
{{ $.Site.BaseURL }},
|
||||
{{ $.Site.BaseURL }},{{ with .social }}
|
||||
{{ with .github }}{{ printf "%s%s" "https://github.com/" . }},{{ end }}
|
||||
{{ with .keybase }}{{ printf "%s%s" "https://keybase.io/" . }},{{ end }}
|
||||
{{ with .twitter }}{{ printf "%s%s" "https://twitter.com/" . }},{{ end }}
|
||||
@@ -23,7 +22,7 @@
|
||||
{{ 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 }}
|
||||
{{ with .mastodon }}{{ printf "%s%s" "https://" . }}{{ end }}{{ end }}
|
||||
]
|
||||
}
|
||||
</script>
|
||||
|
@@ -1,11 +1,11 @@
|
||||
{{ $style := resources.Get "sass/main.scss" | resources.ExecuteAsTemplate "sass/main.scss" . | resources.ToCSS (dict "targetPath" "css/main.css" "includePaths" (slice "node_modules/")) | resources.PostCSS (dict "config" "postcss.config.js") }}
|
||||
<link rel="stylesheet" href="{{ $style.Permalink }}">
|
||||
|
||||
{{/* Page-specific styles set via front matter, scoped via SCSS and inlined */}}
|
||||
{{/* Page-specific styles set via front matter, piped through PostCSS and inlined */}}
|
||||
{{- with .Params.css -}}
|
||||
{{/* NOTE: This file doesn't end up getting published (which is good) */}}
|
||||
{{- $target := path.Join $.File.Dir "css/inline.scss" -}}
|
||||
{{- $css := . | resources.FromString $target | resources.ToCSS | resources.PostCSS (dict "config" "postcss.config.js") -}}
|
||||
{{- $target := path.Join $.File.Dir "css/inline.css" -}}
|
||||
{{- $css := . | resources.FromString $target | resources.PostCSS (dict "config" "postcss.config.js") -}}
|
||||
|
||||
{{/* Already being minified to my taste by PostCSS above */}}
|
||||
{{ printf "<!-- htmlmin:ignore -->" | safeHTML -}}
|
||||
|
@@ -1,4 +1,4 @@
|
||||
{{ with .Site.Params.webmentionIO }}
|
||||
{{ with .Site.Params.social.webmentionIO }}
|
||||
<link rel="pingback" href="https://webmention.io/{{ . }}/xmlrpc">
|
||||
<link rel="webmention" href="https://webmention.io/{{ . }}/webmention">
|
||||
{{ end }}
|
||||
|
@@ -1,10 +1,10 @@
|
||||
<footer>
|
||||
<div class="row">
|
||||
<div id="copyright">Content <a class="no-underline" href="{{ "license/" | absURL }}"{{ with .Site.Params.licenseFull }} title="{{ . }}"{{ end }}>licensed under {{ .Site.Params.license }}</a>, {{ with .Site.Params.copyrightFirstYear }}<a class="no-underline" href="{{ "previously/" | absURL }}" title="Previously on...">{{ . }} –</a>{{ end }} {{ now.Format "2006" }}.</div>
|
||||
<div id="y2k"><a class="no-underline" href="https://y2k.land/" title="Made for Internet Explorer®" target="_blank" rel="noopener"><img src="{{ "img/ie.gif" | absURL }}" style="width: 88px; height: 31px;" alt="Made for Internet Explorer®"></a></div>
|
||||
<div id="poweredby">
|
||||
Made with <span class="beat">❤️</span> and <a class="no-underline" href="https://gohugo.io/" title="Powered by Hugo" id="hugo" target="_blank" rel="noopener">Hugo</a>.
|
||||
{{ with .Scratch.Get "sourceURL" }}<a class="no-underline" href="{{ . | safeURL }}" title="View Source on GitHub" id="source" target="_blank" rel="noopener">View source.</a>{{ end }}
|
||||
</div>
|
||||
<div id="copyright">Content <a class="no-underline" href="{{ "license/" | absURL }}"{{ with .Site.Params.license.nameLong }} title="{{ . }}"{{ end }}>licensed under {{ .Site.Params.license.name }}</a>, {{ with .Site.Params.license.copyrightFirstYear }}<a class="no-underline" href="{{ "previously/" | absURL }}" title="Previously on...">{{ . }} –</a>{{ end }} {{ now.Format "2006" }}.</div>
|
||||
|
||||
{{ $ieGif := resources.Get "img/ie.gif" -}}
|
||||
<div id="y2k"><a class="no-underline" href="https://y2k.land/" title="This site works best with Internet Explorer®" target="_blank" rel="noopener"><img src="{{ $ieGif.Permalink }}" style="width: {{ $ieGif.Width }}px; height: {{ $ieGif.Height }}px;" alt="This site works best with Internet Explorer®"></a></div>
|
||||
|
||||
<div id="poweredby">Made with <span class="beat">❤️</span> and <a class="no-underline" href="https://gohugo.io/" title="Powered by Hugo" id="hugo" target="_blank" rel="noopener">Hugo</a>. {{ with .Scratch.Get "sourceURL" }}<a class="no-underline" href="{{ . | safeURL }}" title="View Source on GitHub" id="source" target="_blank" rel="noopener">View source.</a>{{ end }}</div>
|
||||
</div>
|
||||
</footer>
|
||||
|
Reference in New Issue
Block a user