[PR #2108] [CLOSED] add support for user-defined templates #2502

Closed
opened 2025-12-29 03:21:33 +01:00 by adam · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/juanfont/headscale/pull/2108
Author: @YouSysAdmin
Created: 9/5/2024
Status: Closed

Base: mainHead: templates/custom-templates-use-ability


📝 Commits (5)

  • 44fc9e9 add support for user-defined templates
  • df4af40 update changelog
  • 3c6e67d fix grammar issues in the custom-template doc
  • 11dcdba remove unnecessary imports of pkg embed
  • bfe5858 update mkdocs config

📊 Changes

15 files changed (+457 additions, -398 deletions)

View changed files

📝 CHANGELOG.md (+1 -0)
📝 config-example.yaml (+4 -0)
docs/custom-templates.md (+26 -0)
📝 hscontrol/app.go (+7 -2)
📝 hscontrol/handlers.go (+12 -40)
hscontrol/html/config_help_apple.html (+170 -0)
📝 hscontrol/html/config_help_windows.html (+0 -0)
📝 hscontrol/html/oidc_callback.html (+0 -0)
hscontrol/html/register_node.html (+25 -0)
📝 hscontrol/oidc.go (+28 -39)
📝 hscontrol/platform_config.go (+114 -147)
hscontrol/templates/apple.html (+0 -170)
hscontrol/templates/templates.go (+56 -0)
📝 hscontrol/types/config.go (+13 -0)
📝 mkdocs.yml (+1 -0)

📄 Description

Hi :)

Changes:

  • Adds support for user-defined templates for
    • Node (machine) register page
    • Apple/Windows client config help page
    • OIDC callback
  • Adds doc about user-defined templates
  • Moved all embedded templates in one place /hscontrol/html for comfortable managing
  • For rendering templates using new pkg hscontrol/templates

Motivation:

  • Multilanguage
  • It's easy to change the design of these pages without maintaining a separate version of the app.
  • Ability to add additional information for additional steps etc.

Summary by CodeRabbit

  • New Features

    • Introduced custom templates for specific pages, enhancing user customisation options.
    • Added configuration option for user template directory, improving template management flexibility.
    • New HTML guides for configuring Tailscale on Apple devices and registering machines within the Headscale network.
  • Bug Fixes

    • Streamlined OIDC callback handling for improved performance and maintainability.
  • Documentation

    • Added comprehensive guide on using custom templates in the Headscale server environment.
    • Enhanced documentation structure with a dedicated link for custom templates.

🔄 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/juanfont/headscale/pull/2108 **Author:** [@YouSysAdmin](https://github.com/YouSysAdmin) **Created:** 9/5/2024 **Status:** ❌ Closed **Base:** `main` ← **Head:** `templates/custom-templates-use-ability` --- ### 📝 Commits (5) - [`44fc9e9`](https://github.com/juanfont/headscale/commit/44fc9e9b58b4b015e2fa051d6dbe443bc1644d6e) add support for user-defined templates - [`df4af40`](https://github.com/juanfont/headscale/commit/df4af406faf5066e8c04c67829548a55895e147b) update changelog - [`3c6e67d`](https://github.com/juanfont/headscale/commit/3c6e67d3f90a5ca3701fc8f7125c26fd8943ca75) fix grammar issues in the custom-template doc - [`11dcdba`](https://github.com/juanfont/headscale/commit/11dcdbaf86046f60fb304c8c27d60f829cc57b3a) remove unnecessary imports of pkg embed - [`bfe5858`](https://github.com/juanfont/headscale/commit/bfe58586c710917b0efde7ed9dd3d682eb9dfc35) update mkdocs config ### 📊 Changes **15 files changed** (+457 additions, -398 deletions) <details> <summary>View changed files</summary> 📝 `CHANGELOG.md` (+1 -0) 📝 `config-example.yaml` (+4 -0) ➕ `docs/custom-templates.md` (+26 -0) 📝 `hscontrol/app.go` (+7 -2) 📝 `hscontrol/handlers.go` (+12 -40) ➕ `hscontrol/html/config_help_apple.html` (+170 -0) 📝 `hscontrol/html/config_help_windows.html` (+0 -0) 📝 `hscontrol/html/oidc_callback.html` (+0 -0) ➕ `hscontrol/html/register_node.html` (+25 -0) 📝 `hscontrol/oidc.go` (+28 -39) 📝 `hscontrol/platform_config.go` (+114 -147) ➖ `hscontrol/templates/apple.html` (+0 -170) ➕ `hscontrol/templates/templates.go` (+56 -0) 📝 `hscontrol/types/config.go` (+13 -0) 📝 `mkdocs.yml` (+1 -0) </details> ### 📄 Description Hi :) **Changes:** - Adds support for user-defined templates for - Node (machine) register page - Apple/Windows client config help page - OIDC callback - Adds doc about user-defined templates - Moved all embedded templates in one place `/hscontrol/html` for comfortable managing - For rendering templates using new pkg `hscontrol/templates` **Motivation:** - Multilanguage - It's easy to change the design of these pages without maintaining a separate version of the app. - Ability to add additional information for additional steps etc. <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit - **New Features** - Introduced custom templates for specific pages, enhancing user customisation options. - Added configuration option for user template directory, improving template management flexibility. - New HTML guides for configuring Tailscale on Apple devices and registering machines within the Headscale network. - **Bug Fixes** - Streamlined OIDC callback handling for improved performance and maintainability. - **Documentation** - Added comprehensive guide on using custom templates in the Headscale server environment. - Enhanced documentation structure with a dedicated link for custom templates. <!-- end of auto-generated comment: release notes by coderabbit.ai --> --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
adam added the pull-request label 2025-12-29 03:21:33 +01:00
adam closed this issue 2025-12-29 03:21:33 +01:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/headscale#2502