mirror of
https://github.com/jbowdre/runtimeterror.git
synced 2024-11-21 14:32:19 +00:00
simplify logic for displaying kudos and post reply buttons
This commit is contained in:
parent
317a025213
commit
d8cdbce3c8
27 changed files with 16 additions and 50 deletions
|
@ -6,7 +6,7 @@ draft: true
|
||||||
description: "This is a new post about..."
|
description: "This is a new post about..."
|
||||||
featured: false
|
featured: false
|
||||||
toc: true
|
toc: true
|
||||||
comments: true
|
reply: true
|
||||||
categories: Tips # Backstage, ChromeOS, Code, Self-Hosting, VMware
|
categories: Tips # Backstage, ChromeOS, Code, Self-Hosting, VMware
|
||||||
tags:
|
tags:
|
||||||
- android
|
- android
|
||||||
|
|
|
@ -37,10 +37,8 @@ robots = [
|
||||||
]
|
]
|
||||||
|
|
||||||
# Comments
|
# Comments
|
||||||
comments = true
|
|
||||||
analytics = true
|
analytics = true
|
||||||
kudos = true
|
reply = true
|
||||||
emailReplies = true
|
|
||||||
|
|
||||||
[author]
|
[author]
|
||||||
name = "John Bowdre"
|
name = "John Bowdre"
|
||||||
|
|
|
@ -1,2 +1 @@
|
||||||
comments = true
|
|
||||||
analytics = false
|
analytics = false
|
|
@ -1,2 +1,2 @@
|
||||||
comments = false
|
reply = false
|
||||||
analytics = false
|
analytics = false
|
|
@ -3,7 +3,6 @@ title = "404'd!"
|
||||||
noindex = true
|
noindex = true
|
||||||
timeless = true
|
timeless = true
|
||||||
comments = true
|
comments = true
|
||||||
kudos = false
|
|
||||||
+++
|
+++
|
||||||
|
|
||||||
We're not sure what you were looking for but it's not here.
|
We're not sure what you were looking for but it's not here.
|
||||||
|
|
|
@ -2,7 +2,7 @@
|
||||||
title = "Hi, I'm John."
|
title = "Hi, I'm John."
|
||||||
description = "A brief introduction to me, this blog, and what you're likely to see here."
|
description = "A brief introduction to me, this blog, and what you're likely to see here."
|
||||||
timeless = true
|
timeless = true
|
||||||
comments = false
|
reply = false
|
||||||
aliases = ["tldr", "bio"]
|
aliases = ["tldr", "bio"]
|
||||||
+++
|
+++
|
||||||
![Me, +/- a few decades](/images/john.jpg)
|
![Me, +/- a few decades](/images/john.jpg)
|
||||||
|
|
|
@ -9,4 +9,5 @@ timeless: true
|
||||||
---
|
---
|
||||||
|
|
||||||
#### 2024-05-26
|
#### 2024-05-26
|
||||||
- Begin changelog
|
- Begin changelog
|
||||||
|
- Simplify logic for displaying kudos and post reply buttons
|
|
@ -6,7 +6,6 @@ description: "Using the power of Home Assistant automations and Ntfy push notifi
|
||||||
featured: true
|
featured: true
|
||||||
alias: automating-security-camera-notifications-with-home-assistant-and-ntfy
|
alias: automating-security-camera-notifications-with-home-assistant-and-ntfy
|
||||||
toc: true
|
toc: true
|
||||||
comments: true
|
|
||||||
thumbnail: thumbnail.png
|
thumbnail: thumbnail.png
|
||||||
categories: Self-Hosting
|
categories: Self-Hosting
|
||||||
tags:
|
tags:
|
||||||
|
|
|
@ -5,7 +5,6 @@ lastmod: "2024-04-14T02:21:57Z"
|
||||||
description: "Using Hugo to politely ask AI bots to not steal my content - and then configuring Cloudflare's WAF to actively block them, just to be sure."
|
description: "Using Hugo to politely ask AI bots to not steal my content - and then configuring Cloudflare's WAF to actively block them, just to be sure."
|
||||||
featured: false
|
featured: false
|
||||||
toc: true
|
toc: true
|
||||||
comments: true
|
|
||||||
categories: Backstage
|
categories: Backstage
|
||||||
tags:
|
tags:
|
||||||
- cloud
|
- cloud
|
||||||
|
|
|
@ -5,7 +5,6 @@ date: 2024-01-21
|
||||||
description: "Using GitHub Actions to automatically deploy a Hugo website to Neocities."
|
description: "Using GitHub Actions to automatically deploy a Hugo website to Neocities."
|
||||||
featured: false
|
featured: false
|
||||||
toc: true
|
toc: true
|
||||||
comments: true
|
|
||||||
categories: Backstage
|
categories: Backstage
|
||||||
tags:
|
tags:
|
||||||
- cicd
|
- cicd
|
||||||
|
|
|
@ -6,7 +6,6 @@ description: "Using a GitHub Actions workflow to retrieve data from an authentic
|
||||||
featured: false
|
featured: false
|
||||||
thumbnail: "finished-product.png"
|
thumbnail: "finished-product.png"
|
||||||
toc: true
|
toc: true
|
||||||
comments: true
|
|
||||||
categories: Backstage
|
categories: Backstage
|
||||||
tags:
|
tags:
|
||||||
- api
|
- api
|
||||||
|
|
|
@ -4,7 +4,6 @@ date: 2023-11-24
|
||||||
description: "I moved my homelab from VMware vSphere to Proxmox VE, and my only regret is that I didn't make this change sooner."
|
description: "I moved my homelab from VMware vSphere to Proxmox VE, and my only regret is that I didn't make this change sooner."
|
||||||
featured: false
|
featured: false
|
||||||
toc: true
|
toc: true
|
||||||
comments: true
|
|
||||||
categories: Tips # Projects, Code
|
categories: Tips # Projects, Code
|
||||||
tags:
|
tags:
|
||||||
- homelab
|
- homelab
|
||||||
|
|
|
@ -5,7 +5,6 @@ date: "2024-02-19T04:12:27Z"
|
||||||
description: "Using Hugo built-in functions to dynamically generate OpenGraph share images for every post."
|
description: "Using Hugo built-in functions to dynamically generate OpenGraph share images for every post."
|
||||||
featured: false
|
featured: false
|
||||||
toc: true
|
toc: true
|
||||||
comments: true
|
|
||||||
thumbnail: hugo-logo-wide.png
|
thumbnail: hugo-logo-wide.png
|
||||||
categories: Backstage
|
categories: Backstage
|
||||||
tags:
|
tags:
|
||||||
|
|
|
@ -5,7 +5,6 @@ lastmod: 2023-12-22
|
||||||
description: "Deploying and configuring a self-hosted pub-sub notification handler, getting another server to send a notifcation when it boots, and integrating the notification handler into Home Assistant."
|
description: "Deploying and configuring a self-hosted pub-sub notification handler, getting another server to send a notifcation when it boots, and integrating the notification handler into Home Assistant."
|
||||||
featured: false
|
featured: false
|
||||||
toc: true
|
toc: true
|
||||||
comments: true
|
|
||||||
categories: Self-Hosting
|
categories: Self-Hosting
|
||||||
tags:
|
tags:
|
||||||
- android
|
- android
|
||||||
|
|
|
@ -4,7 +4,6 @@ date: 2024-01-19
|
||||||
# lastmod: 2024-01-19
|
# lastmod: 2024-01-19
|
||||||
description: "Never in my life have I seen enabling FIPS *fix* a problem - until now."
|
description: "Never in my life have I seen enabling FIPS *fix* a problem - until now."
|
||||||
featured: false
|
featured: false
|
||||||
comments: true
|
|
||||||
categories: VMware
|
categories: VMware
|
||||||
tags:
|
tags:
|
||||||
- vmware
|
- vmware
|
||||||
|
|
|
@ -5,7 +5,6 @@ lastmod: "2024-04-05T21:07:38Z"
|
||||||
description: "Deploying a Gemini capsule, powered by Agate, gempost, kineto, Tailscale, and GitHub Actions"
|
description: "Deploying a Gemini capsule, powered by Agate, gempost, kineto, Tailscale, and GitHub Actions"
|
||||||
featured: false
|
featured: false
|
||||||
toc: true
|
toc: true
|
||||||
comments: true
|
|
||||||
categories: Self-Hosting
|
categories: Self-Hosting
|
||||||
tags:
|
tags:
|
||||||
- caddy
|
- caddy
|
||||||
|
|
|
@ -5,7 +5,6 @@ description: "Making my Hugo-generated RSS XML look as good to human visitors as
|
||||||
featured: false
|
featured: false
|
||||||
thumbnail: pretty-feed.png
|
thumbnail: pretty-feed.png
|
||||||
toc: true
|
toc: true
|
||||||
comments: true
|
|
||||||
categories: Backstage
|
categories: Backstage
|
||||||
tags:
|
tags:
|
||||||
- hugo
|
- hugo
|
||||||
|
|
|
@ -5,7 +5,6 @@ date: 2024-01-15
|
||||||
description: "Exploring Cloudflare Tunnel as an alternative to Tailscale Funnel for secure public access to internal resources."
|
description: "Exploring Cloudflare Tunnel as an alternative to Tailscale Funnel for secure public access to internal resources."
|
||||||
featured: false
|
featured: false
|
||||||
toc: true
|
toc: true
|
||||||
comments: true
|
|
||||||
categories: Self-Hosting
|
categories: Self-Hosting
|
||||||
tags:
|
tags:
|
||||||
- cloudflare
|
- cloudflare
|
||||||
|
|
|
@ -5,7 +5,6 @@ lastmod: 2024-02-03
|
||||||
description: "A hasty Salt state to deploy netdata monitoring and publish it internally on my tailnet with Tailscale Serve"
|
description: "A hasty Salt state to deploy netdata monitoring and publish it internally on my tailnet with Tailscale Serve"
|
||||||
featured: false
|
featured: false
|
||||||
toc: true
|
toc: true
|
||||||
comments: true
|
|
||||||
categories: Code
|
categories: Code
|
||||||
tags:
|
tags:
|
||||||
- homelab
|
- homelab
|
||||||
|
|
|
@ -5,7 +5,6 @@ lastmod: 2023-11-13
|
||||||
description: "Syntax highlighting powered by the Torchlight.dev API makes it easier to dress up code blocks. Here's an overview of what I did to replace this blog's built-in Hugo highlighter (Chroma) with Torchlight."
|
description: "Syntax highlighting powered by the Torchlight.dev API makes it easier to dress up code blocks. Here's an overview of what I did to replace this blog's built-in Hugo highlighter (Chroma) with Torchlight."
|
||||||
featured: false
|
featured: false
|
||||||
toc: true
|
toc: true
|
||||||
comments: true
|
|
||||||
categories: Backstage
|
categories: Backstage
|
||||||
tags:
|
tags:
|
||||||
- javascript
|
- javascript
|
||||||
|
|
|
@ -5,7 +5,6 @@ date: 2023-10-15
|
||||||
description: "Quick notes on using `systemctl edit` to override a systemd service to delay its startup."
|
description: "Quick notes on using `systemctl edit` to override a systemd service to delay its startup."
|
||||||
featured: false
|
featured: false
|
||||||
toc: false
|
toc: false
|
||||||
comments: true
|
|
||||||
categories: Tips # Projects, Code
|
categories: Tips # Projects, Code
|
||||||
tags:
|
tags:
|
||||||
- crostini
|
- crostini
|
||||||
|
|
|
@ -5,7 +5,6 @@ lastmod: 2024-02-07
|
||||||
description: "Using Docker Compose to deploy containerized applications and make them available via Tailscale Serve and Tailscale Funnel"
|
description: "Using Docker Compose to deploy containerized applications and make them available via Tailscale Serve and Tailscale Funnel"
|
||||||
featured: false
|
featured: false
|
||||||
toc: true
|
toc: true
|
||||||
comments: true
|
|
||||||
categories: Self-Hosting
|
categories: Self-Hosting
|
||||||
tags:
|
tags:
|
||||||
- containers
|
- containers
|
||||||
|
|
|
@ -5,7 +5,6 @@ date: 2023-12-20
|
||||||
description: "Exploring some of my favorite Tailscale addon features: SSH, Serve, and Funnel."
|
description: "Exploring some of my favorite Tailscale addon features: SSH, Serve, and Funnel."
|
||||||
featured: false
|
featured: false
|
||||||
toc: true
|
toc: true
|
||||||
comments: true
|
|
||||||
categories: Tips # Projects, Code
|
categories: Tips # Projects, Code
|
||||||
tags:
|
tags:
|
||||||
- homelab
|
- homelab
|
||||||
|
|
|
@ -5,7 +5,6 @@ lastmod: "2024-05-01T13:29:30Z"
|
||||||
description: "Installing a custom font on a Hugo site, and taking steps to protect the paid font files from unauthorized distribution. Plus a brief exploration of a pair of storage CDNs, and using Tailscale in a GitHub Actions workflow."
|
description: "Installing a custom font on a Hugo site, and taking steps to protect the paid font files from unauthorized distribution. Plus a brief exploration of a pair of storage CDNs, and using Tailscale in a GitHub Actions workflow."
|
||||||
featured: false
|
featured: false
|
||||||
toc: true
|
toc: true
|
||||||
comments: true
|
|
||||||
categories: Backstage
|
categories: Backstage
|
||||||
tags:
|
tags:
|
||||||
- bunny
|
- bunny
|
||||||
|
|
|
@ -6,7 +6,6 @@ timeless: true
|
||||||
draft: false
|
draft: false
|
||||||
description: "This blog has migrated from virtuallypotato.com to runtimeterror.dev."
|
description: "This blog has migrated from virtuallypotato.com to runtimeterror.dev."
|
||||||
toc: false
|
toc: false
|
||||||
comments: true
|
|
||||||
categories: Backstage
|
categories: Backstage
|
||||||
tags:
|
tags:
|
||||||
- meta
|
- meta
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
+++
|
+++
|
||||||
comments = false
|
reply = false
|
||||||
toc = false
|
toc = false
|
||||||
usePageBundles = false
|
usePageBundles = false
|
||||||
showDate = false
|
showDate = false
|
||||||
|
|
|
@ -33,36 +33,23 @@
|
||||||
<div class="content__body">
|
<div class="content__body">
|
||||||
{{ .Content }}
|
{{ .Content }}
|
||||||
</div>
|
</div>
|
||||||
|
{{- $reply := true }}
|
||||||
{{- $showComments := true }}
|
{{- if eq .Site.Params.reply false }}
|
||||||
{{- if eq .Site.Params.comments false }}
|
{{- $reply = false }}
|
||||||
{{- $showComments = false }}
|
{{- else if eq .Params.reply false }}
|
||||||
{{- else if eq .Params.comments false }}
|
{{- $reply = false }}
|
||||||
{{- $showComments = false }}
|
|
||||||
{{- end }}
|
{{- end }}
|
||||||
{{- if ne $showComments false }}
|
{{- if or (eq $reply true) (eq .Site.Params.analytics "true") }}
|
||||||
<hr>
|
<hr>
|
||||||
{{- $showKudos := true }}
|
{{- if eq .Site.Params.analytics true }}
|
||||||
{{- if eq .Site.Params.kudos false }}
|
|
||||||
{{- $showKudos = false }}
|
|
||||||
{{- else if eq .Params.kudos false }}
|
|
||||||
{{- $showKudos = false }}
|
|
||||||
{{- end }}
|
|
||||||
{{- if and (eq .Site.Params.analytics true) (ne $showKudos false) }}
|
|
||||||
<span class="post_kudos"><button class="tinylytics_kudos"></button></span>
|
<span class="post_kudos"><button class="tinylytics_kudos"></button></span>
|
||||||
{{- end }}
|
{{- end }}
|
||||||
{{- $emailReplies := true }}
|
{{- if (eq $reply true) }}
|
||||||
{{- if eq .Site.Params.emailReplies false }}
|
|
||||||
{{- $emailReplies = false }}
|
|
||||||
{{- else if eq .Params.emailReplies false }}
|
|
||||||
{{- $emailReplies = false }}
|
|
||||||
{{- end }}
|
|
||||||
{{- if and (eq .Site.Params.comments true) (eq $emailReplies true) }}
|
|
||||||
{{- $path := .Page.RelPermalink | path.Dir }}
|
{{- $path := .Page.RelPermalink | path.Dir }}
|
||||||
{{- $path := strings.Trim $path "/" }}
|
{{- $path := strings.Trim $path "/" }}
|
||||||
{{- $address := printf "blogreply.%s@%s" $path "runtimeterror.dev" }}
|
{{- $address := printf "blogreply.%s@%s" $path "runtimeterror.dev" }}
|
||||||
<span class="post_email_reply"><a href="mailto:{{ $address }}?Subject=Re: {{ .Title }}">📧 Reply by email</a></span>
|
<span class="post_email_reply"><a href="mailto:{{ $address }}?Subject=Re: {{ .Title }}">📧 Reply by email</a></span>
|
||||||
{{- end }}
|
{{- end }}
|
||||||
{{- end }}
|
{{- end }}
|
||||||
<footer class="content__footer"></footer>
|
<footer class="content__footer"></footer>
|
||||||
{{ end }}
|
{{ end }}
|
||||||
|
|
Loading…
Reference in a new issue