1
mirror of https://github.com/jakejarvis/jarv.is.git synced 2025-07-19 08:35:31 -04:00

make the main content/blog section configurable instead of hardcoded to notes

This commit is contained in:
2020-04-13 17:25:29 -04:00
parent c1700cdda0
commit abbc3f9678
12 changed files with 25 additions and 21 deletions

View File

@@ -24,16 +24,16 @@ disableAliases = true
[params]
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"
mainSection = "notes"
pageMaxWidth = 910
facebookAppID = "3357248167622283"
gitRepo = "https://github.com/jakejarvis/jarv.is"
defaultImage = "/me_large.jpg"
github = "jakejarvis/jarv.is"
facebookAppID = "3357248167622283"
copyrightFirstYear = "2001"
wayback = "https://web.archive.org/web/20010501000000*/jakejarvis.com"
license = "CC-BY-4.0"
licenseFull = "Creative Commons Attribution 4.0 International"
licenseURL = "https://creativecommons.org/licenses/by/4.0/"
utterancesRepo = "jakejarvis/jarv.is"
[module]
[[module.imports]]

View File

@@ -1,6 +1,6 @@
---
title: "Jake Jarvis Front-End Web Developer in Boston, MA"
date: 2020-04-05 15:46:35-0400
date: 2020-04-13 16:07:02-0400
type: home
---

View File

@@ -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>

View File

@@ -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 }}

View File

@@ -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 }}

View File

@@ -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 }}">

View File

@@ -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>

View File

@@ -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">&#x2764;</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>

View File

@@ -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"

View File

@@ -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>

View File

@@ -172,6 +172,11 @@
to = "/403.html"
status = 403
force = true
[[redirects]]
from = "*/wp-includes/*"
to = "/403.html"
status = 403
force = true
[[redirects]]
from = "/login"
to = "/403.html"

View File

@@ -838,9 +838,9 @@ camelcase@^5.0.0, camelcase@^5.3.1:
integrity sha512-L28STB170nwWS63UjtlEOE3dldQApaJXZkOI1uMFfzf3rRuPegHaHesyee+YxQ+W6SvRDQV6UrdOdRiR153wJg==
caniuse-lite@^1.0.30001038, caniuse-lite@^1.0.30001039:
version "1.0.30001040"
resolved "https://registry.yarnpkg.com/caniuse-lite/-/caniuse-lite-1.0.30001040.tgz#103fc8e6eb1d7397e95134cd0e996743353d58ea"
integrity sha512-Ep0tEPeI5wCvmJNrXjE3etgfI+lkl1fTDU6Y3ZH1mhrjkPlVI9W4pcKbMo+BQLpEWKVYYp2EmYaRsqpPC3k7lQ==
version "1.0.30001041"
resolved "https://registry.yarnpkg.com/caniuse-lite/-/caniuse-lite-1.0.30001041.tgz#c2ea138dafc6fe03877921ddcddd4a02a14daf76"
integrity sha512-fqDtRCApddNrQuBxBS7kEiSGdBsgO4wiVw4G/IClfqzfhW45MbTumfN4cuUJGTM0YGFNn97DCXPJ683PS6zwvA==
cardinal@^2.1.1:
version "2.1.1"
@@ -5203,7 +5203,7 @@ source-map@^0.5.0:
resolved "https://registry.yarnpkg.com/source-map/-/source-map-0.5.7.tgz#8a039d2d1021d22d1ea14c80d8ea468ba2ef3fcc"
integrity sha1-igOdLRAh0i0eoUyA2OpGi6LvP8w=
source-map@^0.6.1, source-map@~0.6.0, source-map@~0.6.1:
source-map@^0.6.1, source-map@~0.6.0:
version "0.6.1"
resolved "https://registry.yarnpkg.com/source-map/-/source-map-0.6.1.tgz#74722af32e9614e9c287a8d0bbde48b5e2f1a263"
integrity sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==
@@ -5845,12 +5845,11 @@ uc.micro@^1.0.1, uc.micro@^1.0.5:
integrity sha512-8Y75pvTYkLJW2hWQHXxoqRgV7qb9B+9vFEtidML+7koHUFapnVJAZ6cKs+Qjz5Aw3aZWHMC6u0wJE3At+nSGwA==
uglify-js@^3.5.1:
version "3.8.1"
resolved "https://registry.yarnpkg.com/uglify-js/-/uglify-js-3.8.1.tgz#43bb15ce6f545eaa0a64c49fd29375ea09fa0f93"
integrity sha512-W7KxyzeaQmZvUFbGj4+YFshhVrMBGSg2IbcYAjGWGvx8DHvJMclbTDMpffdxFUGPBHjIytk7KJUR/KUXstUGDw==
version "3.9.0"
resolved "https://registry.yarnpkg.com/uglify-js/-/uglify-js-3.9.0.tgz#037163a936992050ed5d14f5d5c4014126019661"
integrity sha512-j5wNQBWaql8gr06dOUrfaohHlscboQZ9B8sNsoK5o4sBjm7Ht9dxSbrMXyktQpA16Acaij8AcoozteaPYZON0g==
dependencies:
commander "~2.20.3"
source-map "~0.6.1"
unbzip2-stream@^1.0.9:
version "1.4.1"