feat: custom stylesheet management
Introduce a guided Custom.css workflow: load the stylesheet from the wiki, seed new installs with a commented template, hide it from the page index, and surface quick links in user settings. Restrict access so only admins or writers can edit or view the raw page while the rest of the site consumes the compiled CSS. The editor now treats Custom.css as real CSS with syntax highlighting and a streamlined UI.
Full disclosure, this PR was written via ChatGPT Codex.
Hey @hollisticated-horse, thanks for the PR!
Really like this idea. I'll need some time to review it fully, so please be patient.
Just one quick question: Why is the 'Custom.css' file created by default in server.py? Would it be better to create it only when saving it, after opening it from the settings? It should just be saved like other pages? Let me know your thoughts!
Really like this idea. I'll need some time to review it fully, so please be patient.
Cheers, no worries about time.
Just one quick question: Why is the 'Custom.css' file created by default in
server.py? Would it be better to create it only when saving it, after opening it from the settings? It should just be saved like other pages? Let me know your thoughts!
Good question. My thinking was to create it by default with relevant selectors already in the file, for quicker onboarding. But if we can do that when an admin/user creates the custom.css file from within the UI, I guess that works too.
EDIT: I had forgotten: I made an initial custom.css file, with the selector commented out. This file is copied to custom.css when custom css is activated. Easier restore file. (But I didn't implement the reset).