[PR #1390] [MERGED] Advanced message templating: Sprig functions, pre-defined templates, custom templates via template-dir #1589

Closed
opened 2026-05-07 01:02:48 +02:00 by BreizhHardware · 0 comments

📋 Pull Request Information

Original PR: https://github.com/binwiederhier/ntfy/pull/1390
Author: @binwiederhier
Created: 7/16/2025
Status: Merged
Merged: 7/21/2025
Merged by: @binwiederhier

Base: mainHead: template-dir


📝 Commits (10+)

📊 Changes

61 files changed (+8620 additions, -308 deletions)

View changed files

📝 README.md (+1 -0)
📝 client/options.go (+6 -0)
📝 cmd/publish.go (+5 -0)
📝 cmd/serve.go (+4 -5)
📝 cmd/user.go (+2 -1)
📝 docs/publish.md (+195 -11)
docs/publish/template-functions.md (+1507 -0)
📝 docs/releases.md (+7 -0)
docs/static/img/android-screenshot-template-custom.png (+0 -0)
docs/static/img/android-screenshot-template-predefined.png (+0 -0)
docs/static/img/screenshot-github-webhook-config.png (+0 -0)
📝 go.mod (+15 -15)
📝 go.sum (+31 -0)
📝 mkdocs.yml (+1 -0)
📝 server/config.go (+5 -1)
📝 server/errors.go (+2 -0)
📝 server/server.go (+96 -38)
📝 server/server.yml (+20 -0)
📝 server/server_test.go (+159 -3)
📝 server/smtp_server.go (+3 -3)

...and 41 more files

📄 Description

What

  • Pre-defined message templates
  • Sprig functions
  • template-dir for custom templates

Docs

image image image image image image

🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/binwiederhier/ntfy/pull/1390 **Author:** [@binwiederhier](https://github.com/binwiederhier) **Created:** 7/16/2025 **Status:** ✅ Merged **Merged:** 7/21/2025 **Merged by:** [@binwiederhier](https://github.com/binwiederhier) **Base:** `main` ← **Head:** `template-dir` --- ### 📝 Commits (10+) - [`1f2c76e`](https://github.com/binwiederhier/ntfy/commit/1f2c76e63d3c256f335918f9653527ed5526c6a6) copy subset of Sprig template functions - [`650f492`](https://github.com/binwiederhier/ntfy/commit/650f492d7dd2b3196474cc3ce334767ff63a367f) make tests happy - [`fea0f30`](https://github.com/binwiederhier/ntfy/commit/fea0f301d2375a664ba52f50be7998efb4fa236e) Sprig funcs - [`3ac3e2e`](https://github.com/binwiederhier/ntfy/commit/3ac3e2ec7c75739716fcbaeb762fa2892e2eef27) Merge branch 'main' of github.com:binwiederhier/ntfy into sprig - [`2a46849`](https://github.com/binwiederhier/ntfy/commit/2a468493f92a17e626a3b3a48d87ccbc72d3848b) any - [`93e14b7`](https://github.com/binwiederhier/ntfy/commit/93e14b73bbab56f688099cde385969195e8df132) Tempalte dir - [`b1e935d`](https://github.com/binwiederhier/ntfy/commit/b1e935da45365c5e7e731d544a1ad4c7ea3643cd) TEmplate dir - [`610792b`](https://github.com/binwiederhier/ntfy/commit/610792b9024ad7bce364bd797bd78485b56d2923) WIP - [`4603802`](https://github.com/binwiederhier/ntfy/commit/4603802f62bdb6495c159d33c9dfc80801204159) WIP - [`ae62e0d`](https://github.com/binwiederhier/ntfy/commit/ae62e0d9556381bdc835f803fa55476c381975f1) Docs docs docs ### 📊 Changes **61 files changed** (+8620 additions, -308 deletions) <details> <summary>View changed files</summary> 📝 `README.md` (+1 -0) 📝 `client/options.go` (+6 -0) 📝 `cmd/publish.go` (+5 -0) 📝 `cmd/serve.go` (+4 -5) 📝 `cmd/user.go` (+2 -1) 📝 `docs/publish.md` (+195 -11) ➕ `docs/publish/template-functions.md` (+1507 -0) 📝 `docs/releases.md` (+7 -0) ➕ `docs/static/img/android-screenshot-template-custom.png` (+0 -0) ➕ `docs/static/img/android-screenshot-template-predefined.png` (+0 -0) ➕ `docs/static/img/screenshot-github-webhook-config.png` (+0 -0) 📝 `go.mod` (+15 -15) 📝 `go.sum` (+31 -0) 📝 `mkdocs.yml` (+1 -0) 📝 `server/config.go` (+5 -1) 📝 `server/errors.go` (+2 -0) 📝 `server/server.go` (+96 -38) 📝 `server/server.yml` (+20 -0) 📝 `server/server_test.go` (+159 -3) 📝 `server/smtp_server.go` (+3 -3) _...and 41 more files_ </details> ### 📄 Description # What - Pre-defined message templates - Sprig functions - `template-dir` for custom templates # Docs <img width="1623" height="1107" alt="image" src="https://github.com/user-attachments/assets/db5edaa7-5983-45f6-ab49-068197b366fc" /> <img width="1587" height="1579" alt="image" src="https://github.com/user-attachments/assets/2e351ec6-fb9a-4f37-9e5e-2f2a14495837" /> <img width="1587" height="1579" alt="image" src="https://github.com/user-attachments/assets/57c7fcc1-11f0-40b2-b25f-b4b0f57ba768" /> <img width="1587" height="1579" alt="image" src="https://github.com/user-attachments/assets/f1576527-62a4-42e2-b960-3ade0caf8c80" /> <img width="1587" height="1579" alt="image" src="https://github.com/user-attachments/assets/3f4ab67a-a4cb-408d-8259-a4985ee81a42" /> <img width="1587" height="1579" alt="image" src="https://github.com/user-attachments/assets/6bc3e06d-89d5-41fb-a4b8-09719c560bed" /> --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
BreizhHardware 2026-05-07 01:02:48 +02:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/ntfy#1589
No description provided.