diff --git a/static/img/ie.gif b/assets/img/ie.gif
similarity index 100%
rename from static/img/ie.gif
rename to assets/img/ie.gif
diff --git a/assets/js/dark-mode.js b/assets/js/dark-mode.js
index 4a2bfa80..a9dfd0b9 100644
--- a/assets/js/dark-mode.js
+++ b/assets/js/dark-mode.js
@@ -18,7 +18,7 @@
// which class is
set to initially?
// eslint-disable-next-line
- var default_theme = "{{ .Site.Params.defaultTheme }}";
+ var default_theme = "{{ .Site.Params.Theme.defaultTheme }}";
// use an element with class `dark-mode-toggle` to trigger swap when clicked
var toggle = doc.querySelector(".dark-mode-toggle");
diff --git a/assets/sass/main.scss b/assets/sass/main.scss
index 12e28da4..601fd61d 100644
--- a/assets/sass/main.scss
+++ b/assets/sass/main.scss
@@ -2,7 +2,7 @@
// NOTE: all variables set by Hugo's config.toml MUST go here:
// prettier-ignore
-$max-width: "{{ printf "%d%s" .Site.Params.maxWidth "px" }}";
+$max-width: "{{ printf "%d%s" .Site.Params.Theme.maxWidth "px" }}";
$base-url: "{{ strings.TrimRight "/" .Site.BaseURL }}" + "/";
// those values need quotes because, even though prettier & stylelint are correct
diff --git a/config.toml b/config.toml
index c320ecf6..9520c047 100644
--- a/config.toml
+++ b/config.toml
@@ -24,32 +24,35 @@ disableAliases = true
[params]
description = "Hi there! I'm a frontend web developer based in Boston, Massachusetts specializing in the JAMstack, modern JavaScript frameworks, and progressive web apps."
- image = "img/logo.png" # must be in assetDir
- mainSection = "notes" # reflected in RSS, Atom, AMP
- defaultTheme = "light" # "light" or "dark" theme
- maxWidth = 940 # px
- githubRepo = "jakejarvis/jarv.is"
- facebookAppID = 3357248167622283
- webmentionIO = "jarv.is" # webmention.io username
- copyrightFirstYear = 2001
- license = "CC-BY-4.0"
- licenseFull = "Creative Commons Attribution 4.0 International"
+ image = "img/logo.png" # relative to assetDir root
+ mainSection = "notes" # content that appears in feeds
+ [params.social]
+ githubRepo = "jakejarvis/jarv.is" # user/repo
+ webmentionIO = "jarv.is" # webmention.io username
+ facebookAppID = 3357248167622283
+ [params.license]
+ name = "CC-BY-4.0"
+ nameLong = "Creative Commons Attribution 4.0 International"
+ copyrightFirstYear = 2001
+ [params.theme]
+ maxWidth = 940 # px
+ defaultTheme = "light" # light or dark?
[author]
name = "Jake Jarvis"
- image = "img/me_large.jpg" # must be in assetDir
- jobTitle = "Front-End Web Developer"
+ image = "img/me_large.jpg" # relative to assetDir root
email = "jake@jarv.is"
- github = "jakejarvis"
- keybase = "jakejarvis"
- twitter = "jakejarvis"
- twitterID = 229769022
- medium = "jakejarvis"
- linkedin = "jakejarvis"
- facebook = "jakejarvis"
- facebookID = 1329090853
- instagram = "jakejarvis"
- mastodon = "mastodon.social/@jakejarvis"
+ [author.social]
+ github = "jakejarvis"
+ keybase = "jakejarvis"
+ twitter = "jakejarvis"
+ twitterID = 229769022
+ medium = "jakejarvis"
+ linkedin = "jakejarvis"
+ facebook = "jakejarvis"
+ facebookID = 1329090853
+ instagram = "jakejarvis"
+ mastodon = "mastodon.social/@jakejarvis"
[module]
[[module.imports]]
diff --git a/content/previously/index.md b/content/previously/index.md
index a28ce952..c198ab80 100644
--- a/content/previously/index.md
+++ b/content/previously/index.md
@@ -42,15 +42,13 @@ css: |
div#content span.limegreen {
color: #32cd32;
}
- header nav {
- a#logo h1#name {
- font-size: 1.5em;
- line-height: 1.15;
- }
- ul li a span.text {
- font-size: 0.9em;
- line-height: 1.15;
- }
+ header nav a#logo h1#name {
+ font-size: 1.5em;
+ line-height: 1.15;
+ }
+ header nav ul li a span.text {
+ font-size: 0.9em;
+ line-height: 1.15;
}
footer div#copyright, footer div#poweredby {
font-size: 1.1em;
diff --git a/layouts/_default/baseof.html b/layouts/_default/baseof.html
index fa18c83f..55c4dfdb 100644
--- a/layouts/_default/baseof.html
+++ b/layouts/_default/baseof.html
@@ -6,7 +6,7 @@
{{ partial "head/_head" . }}
-
+
{{ partialCached "page/header" . }}
{{ block "main" . }}{{ end }}
diff --git a/layouts/_default/single.amp.html b/layouts/_default/single.amp.html
index 071be4f3..8ddb006e 100644
--- a/layouts/_default/single.amp.html
+++ b/layouts/_default/single.amp.html
@@ -90,7 +90,7 @@
padding-left: 1em;
}
article {
- max-width: {{ printf "%d%s" .Site.Params.maxWidth "px" }};
+ max-width: {{ printf "%d%s" .Site.Params.Theme.maxWidth "px" }};
margin: 0 auto;
padding: 0 15px;
line-height: 1.75;
@@ -147,7 +147,7 @@
text-decoration: none;
}
nav {
- max-width: {{ printf "%d%s" .Site.Params.maxWidth "px" }};
+ max-width: {{ printf "%d%s" .Site.Params.Theme.maxWidth "px" }};
margin: 0 auto;
padding: 0 15px;
display: flex;
@@ -198,7 +198,7 @@
}
footer div.row {
width: 100%;
- max-width: {{ printf "%d%s" .Site.Params.maxWidth "px" }};
+ max-width: {{ printf "%d%s" .Site.Params.Theme.maxWidth "px" }};
margin: 0 auto;
display: flex;
justify-content: space-between;
@@ -290,7 +290,7 @@
diff --git a/layouts/partials/functions/optimize-image.html b/layouts/partials/functions/optimize-image.html
index 90bb22e6..0238f172 100644
--- a/layouts/partials/functions/optimize-image.html
+++ b/layouts/partials/functions/optimize-image.html
@@ -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")) }}
diff --git a/layouts/partials/head/canonical.html b/layouts/partials/head/canonical.html
index 0b32d6d3..7f98a8aa 100644
--- a/layouts/partials/head/canonical.html
+++ b/layouts/partials/head/canonical.html
@@ -9,7 +9,7 @@
{{/* 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 }}
diff --git a/layouts/partials/head/open-graph.html b/layouts/partials/head/open-graph.html
index 2bab485a..bb9dc4d6 100644
--- a/layouts/partials/head/open-graph.html
+++ b/layouts/partials/head/open-graph.html
@@ -21,20 +21,20 @@
{{- end }}
-{{- with .Site.Author.facebook }}
+{{- with .Site.Author.social.facebook }}
{{ end }}
{{- with .Params.tags }}{{ range . }}
{{ end }}{{ end }}
{{ end -}}
-{{ with .Site.Author.facebookid }}{{ end }}
-{{ with .Site.Params.facebookAppID }}{{ end }}
+{{ with .Site.Author.social.facebookid }}{{ end }}
+{{ with .Site.Params.social.facebookAppID }}{{ end }}
-{{- with .Site.Author.twitter }}
+{{- with .Site.Author.social.twitter }}
{{ end -}}
-{{ with .Site.Author.twitterid }}{{ end }}
+{{ with .Site.Author.social.twitterid }}{{ end }}
diff --git a/layouts/partials/head/schema/person.html b/layouts/partials/head/schema/person.html
index 43adfcdd..fee38a90 100644
--- a/layouts/partials/head/schema/person.html
+++ b/layouts/partials/head/schema/person.html
@@ -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 }}
]
}
diff --git a/layouts/partials/head/styles.html b/layouts/partials/head/styles.html
index c5253895..c0799895 100644
--- a/layouts/partials/head/styles.html
+++ b/layouts/partials/head/styles.html
@@ -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") }}
-{{/* 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 "" | safeHTML -}}
diff --git a/layouts/partials/head/webmention.html b/layouts/partials/head/webmention.html
index 4e71a10c..13e80908 100644
--- a/layouts/partials/head/webmention.html
+++ b/layouts/partials/head/webmention.html
@@ -1,4 +1,4 @@
-{{ with .Site.Params.webmentionIO }}
+{{ with .Site.Params.social.webmentionIO }}
{{ end }}
diff --git a/layouts/partials/page/footer.html b/layouts/partials/page/footer.html
index 2b6de282..a070e865 100644
--- a/layouts/partials/page/footer.html
+++ b/layouts/partials/page/footer.html
@@ -1,10 +1,10 @@
diff --git a/layouts/shortcodes/video.amp.html b/layouts/shortcodes/video.amp.html
index 87b539b0..bb6d4177 100644
--- a/layouts/shortcodes/video.amp.html
+++ b/layouts/shortcodes/video.amp.html
@@ -1,6 +1,6 @@