glance
glance copied to clipboard
feat: enhance asset path handling to include config directory and improve assets directory validation
Support Flexible Asset Path Resolution for Local and Docker Environments
Allow users to organize their Glance files in two ways:
- Simple: All files in one
/configdirectory - Advanced: Split between
/config(settings) and/assets(static files) - Existing setup
Changes:
- Improve path detection and validation
- Keep compatibility with existing setups
- Add helpful error messages
Single Volume Setup
Docker Composeservices: glance: image: glanceapp/glance volumes: - ./config:/app/config # All files in config directory ports: - 8080:8080
glance.ymlserver: assets-path: config theme: custom-css-file: /config/user.css branding: favicon-url: /config/favicon.png logo-url: /config/logo.png
I don't think this change is necessary because you can already do this by having the assets directory within your config directory, mounting just the config directory and then specifying the location of the assets within glance.yml like such:
server:
assets-path: /app/config/assets
I don't think this change is necessary because you can already do this by having the assets directory within your config directory, mounting just the config directory and then specifying the location of the assets within
glance.ymllike such:server: assets-path: /app/config/assets
if I keep custom css, js and image files in /app/config/assets
this doesn't work
server:
assets-path: /app/config/assets
theme:
custom-css-file: /config/assets/user.css
branding:
logo-url: /config/assets/logo.png
favicon-url: /config/assets/favicon.png
I understand that my modifications might be wrong, but if there is any other option to use single path or with multiple sub dir for all the files please add a support
You must specify the path relative to the server URL, not relative to local path:
server:
# this is a local directory path
assets-path: /app/config/assets
theme:
# this is a server URL path and will resolve to www.example.com/assets/user.css
custom-css-file: /assets/user.css
branding:
logo-url: /assets/logo.png
favicon-url: /assets/favicon.png
You must specify the path relative to the server URL, not relative to local path:
server: # this is a local directory path assets-path: /app/config/assets theme: # this is a server URL path and will resolve to www.example.com/assets/user.css custom-css-file: /assets/user.css branding: logo-url: /assets/logo.png favicon-url: /assets/favicon.png
aah you are right, may bad it was confusing a little now i get this
not relevant PR as it already works