Merge branch 'main' into drafts

This commit is contained in:
John Bowdre 2023-09-17 19:22:56 -05:00
commit 2d6fb19455
2 changed files with 16 additions and 12 deletions

View file

@ -2,7 +2,6 @@
title: "Easy Push Notifications With ntfy.sh"
date: 2023-09-17
# lastmod: 2023-09-17
draft: true
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
@ -28,7 +27,7 @@ Wouldn't it be great if there was a simple way to send a notification to your ph
I thought it sounded pretty compelling - and *then* I noticed that [ntfy's docs](https://docs.ntfy.sh/install/) made it sound really easy to self-host the server component, which would give me a bit more control and peace of mind.
{{% notice tip "Topics are public" %}}
{{% notice note "Topics are public" %}}
Ntfy leverages uses a [pub-sub](https://en.wikipedia.org/wiki/Publish%E2%80%93subscribe_pattern) approach, and (by default) all topics are public. This means that anyone can write to or read from any topic, which makes it important to use a topic name that others aren't likely to guess.
Self-hosting lets you [define ACLs](https://docs.ntfy.sh/config/#access-control) to protect sensitive topics.

View file

@ -5,27 +5,32 @@
<p>
{{ if .Params.date }}<table><tr><td>posted:</td><td>{{ $postDate }}</td></tr>{{- if ne $postDate $updateDate }}<tr><td>updated:</td><td>{{ $updateDate }}</td></tr>{{ end }}</table>{{ end }}
</p>
<hr>
{{ if and (gt .WordCount 400 ) (gt (len .TableOfContents) 180) }}
<p>
<h3>On this page</h3>
{{ .TableOfContents }}
<hr>
</p>
{{ end }}
{{- with .Params.tags -}}
<a href="/tags">tags</a>:<br>
<p>
<h3>Tags</h3>
[<a href="/tags">all</a>]
{{- range . }}
{{- $tag := urlize . -}}
[<a href='{{ absLangURL (printf "tags/%s" $tag) }}' title="{{ . }}">{{ . }}</a>]
{{- end }}
{{- end }}
<br><br>
<hr>
</p>
<hr>
{{ end }}
{{ if and (gt .WordCount 400 ) (gt (len .TableOfContents) 180) }}
<h2>On this page</h2>
{{ .TableOfContents }}
<hr>
{{- end }}
{{ end }}
{{ if isset .Params "series" }}
{{$related := where .Site.RegularPages ".Params.series" "eq" .Params.series }}
{{- $relatedLimit := default 8 .Site.Params.numberOfRelatedPosts }}
<h2>More {{ .Params.series }}</h2>
<h3>More {{ .Params.series }}</h3>
<ul>
{{- range first $relatedLimit $related }}
<li>
@ -45,7 +50,7 @@
{{- $featured := default 8 .Site.Params.numberOfFeaturedPosts }}
{{- $featuredPosts := first $featured (where $posts "Params.featured" true)}}
{{- with $featuredPosts }}
<h2>Featured Posts</h2>
<h3>Featured Posts</h3>
<ul>
{{- range . }}
<li>