Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add custom HTML blocks to admin settings #823

Open
icewindow opened this issue Oct 3, 2024 · 0 comments
Open

Add custom HTML blocks to admin settings #823

icewindow opened this issue Oct 3, 2024 · 0 comments

Comments

@icewindow
Copy link
Contributor

Overview

The possibility to write custom CSS is already present in the Appearance settings. A way to add custom HTML to the page would compliment this nicely.

Motivation

Admins may wish to add custom Script snippets to the website. This could be custom tracking code (see #818) or any number of custom JavaScript applications. Currently there is no mechanism to do so, except for maybe hijacking templates via Docker mounts or similar mechanisms.

Possible implementation details

There should be two text fields to allow adding custom HTML into the head, possibly before the closing tag, and another one to add custom HTML to the end of the body. Two fields because some scripts are required to be placed in head, some are required to be placed in body.

Considerations

This opens up the possibility of XSS and similar attacks. There needs to be a warning to not copy-paste code which is not understood what it does into these text fields.
A different precaution could be to make the fields lockable via environment variables.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant