mirror of
https://github.com/jbowdre/runtimeterror.git
synced 2024-11-21 06:22: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..."
|
||||
featured: false
|
||||
toc: true
|
||||
comments: true
|
||||
reply: true
|
||||
categories: Tips # Backstage, ChromeOS, Code, Self-Hosting, VMware
|
||||
tags:
|
||||
- android
|
||||
|
|
|
@ -37,10 +37,8 @@ robots = [
|
|||
]
|
||||
|
||||
# Comments
|
||||
comments = true
|
||||
analytics = true
|
||||
kudos = true
|
||||
emailReplies = true
|
||||
reply = true
|
||||
|
||||
[author]
|
||||
name = "John Bowdre"
|
||||
|
|
|
@ -1,2 +1 @@
|
|||
comments = true
|
||||
analytics = false
|
|
@ -1,2 +1,2 @@
|
|||
comments = false
|
||||
reply = false
|
||||
analytics = false
|
|
@ -3,7 +3,6 @@ title = "404'd!"
|
|||
noindex = true
|
||||
timeless = true
|
||||
comments = true
|
||||
kudos = false
|
||||
+++
|
||||
|
||||
We're not sure what you were looking for but it's not here.
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
title = "Hi, I'm John."
|
||||
description = "A brief introduction to me, this blog, and what you're likely to see here."
|
||||
timeless = true
|
||||
comments = false
|
||||
reply = false
|
||||
aliases = ["tldr", "bio"]
|
||||
+++
|
||||
![Me, +/- a few decades](/images/john.jpg)
|
||||
|
|
|
@ -9,4 +9,5 @@ timeless: true
|
|||
---
|
||||
|
||||
#### 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
|
||||
alias: automating-security-camera-notifications-with-home-assistant-and-ntfy
|
||||
toc: true
|
||||
comments: true
|
||||
thumbnail: thumbnail.png
|
||||
categories: Self-Hosting
|
||||
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."
|
||||
featured: false
|
||||
toc: true
|
||||
comments: true
|
||||
categories: Backstage
|
||||
tags:
|
||||
- cloud
|
||||
|
|
|
@ -5,7 +5,6 @@ date: 2024-01-21
|
|||
description: "Using GitHub Actions to automatically deploy a Hugo website to Neocities."
|
||||
featured: false
|
||||
toc: true
|
||||
comments: true
|
||||
categories: Backstage
|
||||
tags:
|
||||
- cicd
|
||||
|
|
|
@ -6,7 +6,6 @@ description: "Using a GitHub Actions workflow to retrieve data from an authentic
|
|||
featured: false
|
||||
thumbnail: "finished-product.png"
|
||||
toc: true
|
||||
comments: true
|
||||
categories: Backstage
|
||||
tags:
|
||||
- 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."
|
||||
featured: false
|
||||
toc: true
|
||||
comments: true
|
||||
categories: Tips # Projects, Code
|
||||
tags:
|
||||
- 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."
|
||||
featured: false
|
||||
toc: true
|
||||
comments: true
|
||||
thumbnail: hugo-logo-wide.png
|
||||
categories: Backstage
|
||||
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."
|
||||
featured: false
|
||||
toc: true
|
||||
comments: true
|
||||
categories: Self-Hosting
|
||||
tags:
|
||||
- android
|
||||
|
|
|
@ -4,7 +4,6 @@ date: 2024-01-19
|
|||
# lastmod: 2024-01-19
|
||||
description: "Never in my life have I seen enabling FIPS *fix* a problem - until now."
|
||||
featured: false
|
||||
comments: true
|
||||
categories: VMware
|
||||
tags:
|
||||
- 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"
|
||||
featured: false
|
||||
toc: true
|
||||
comments: true
|
||||
categories: Self-Hosting
|
||||
tags:
|
||||
- caddy
|
||||
|
|
|
@ -5,7 +5,6 @@ description: "Making my Hugo-generated RSS XML look as good to human visitors as
|
|||
featured: false
|
||||
thumbnail: pretty-feed.png
|
||||
toc: true
|
||||
comments: true
|
||||
categories: Backstage
|
||||
tags:
|
||||
- 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."
|
||||
featured: false
|
||||
toc: true
|
||||
comments: true
|
||||
categories: Self-Hosting
|
||||
tags:
|
||||
- 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"
|
||||
featured: false
|
||||
toc: true
|
||||
comments: true
|
||||
categories: Code
|
||||
tags:
|
||||
- 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."
|
||||
featured: false
|
||||
toc: true
|
||||
comments: true
|
||||
categories: Backstage
|
||||
tags:
|
||||
- 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."
|
||||
featured: false
|
||||
toc: false
|
||||
comments: true
|
||||
categories: Tips # Projects, Code
|
||||
tags:
|
||||
- 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"
|
||||
featured: false
|
||||
toc: true
|
||||
comments: true
|
||||
categories: Self-Hosting
|
||||
tags:
|
||||
- containers
|
||||
|
|
|
@ -5,7 +5,6 @@ date: 2023-12-20
|
|||
description: "Exploring some of my favorite Tailscale addon features: SSH, Serve, and Funnel."
|
||||
featured: false
|
||||
toc: true
|
||||
comments: true
|
||||
categories: Tips # Projects, Code
|
||||
tags:
|
||||
- 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."
|
||||
featured: false
|
||||
toc: true
|
||||
comments: true
|
||||
categories: Backstage
|
||||
tags:
|
||||
- bunny
|
||||
|
|
|
@ -6,7 +6,6 @@ timeless: true
|
|||
draft: false
|
||||
description: "This blog has migrated from virtuallypotato.com to runtimeterror.dev."
|
||||
toc: false
|
||||
comments: true
|
||||
categories: Backstage
|
||||
tags:
|
||||
- meta
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
+++
|
||||
comments = false
|
||||
reply = false
|
||||
toc = false
|
||||
usePageBundles = false
|
||||
showDate = false
|
||||
|
|
|
@ -33,36 +33,23 @@
|
|||
<div class="content__body">
|
||||
{{ .Content }}
|
||||
</div>
|
||||
|
||||
{{- $showComments := true }}
|
||||
{{- if eq .Site.Params.comments false }}
|
||||
{{- $showComments = false }}
|
||||
{{- else if eq .Params.comments false }}
|
||||
{{- $showComments = false }}
|
||||
{{- $reply := true }}
|
||||
{{- if eq .Site.Params.reply false }}
|
||||
{{- $reply = false }}
|
||||
{{- else if eq .Params.reply false }}
|
||||
{{- $reply = false }}
|
||||
{{- end }}
|
||||
{{- if ne $showComments false }}
|
||||
{{- if or (eq $reply true) (eq .Site.Params.analytics "true") }}
|
||||
<hr>
|
||||
{{- $showKudos := 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) }}
|
||||
{{- if eq .Site.Params.analytics true }}
|
||||
<span class="post_kudos"><button class="tinylytics_kudos"></button></span>
|
||||
{{- end }}
|
||||
{{- $emailReplies := 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) }}
|
||||
{{- if (eq $reply true) }}
|
||||
{{- $path := .Page.RelPermalink | path.Dir }}
|
||||
{{- $path := strings.Trim $path "/" }}
|
||||
{{- $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>
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
<footer class="content__footer"></footer>
|
||||
<footer class="content__footer"></footer>
|
||||
{{ end }}
|
||||
|
|
Loading…
Reference in a new issue