Skip to content

FEAT/improve subdirectory compatibility#1998

Open
musterdies-web wants to merge 11 commits intoLissy93:masterfrom
musterdies-web:feat/improve-subdirectory-compatibility
Open

FEAT/improve subdirectory compatibility#1998
musterdies-web wants to merge 11 commits intoLissy93:masterfrom
musterdies-web:feat/improve-subdirectory-compatibility

Conversation

@musterdies-web
Copy link

@musterdies-web musterdies-web commented Mar 2, 2026

musterdies-web Medium musterdies-web /feat/improve-subdirectory-compatibility → Lissy93/dashy Commits: 10 | Files Changed: 15 | Additions: 38 Label Powered by Pull Request Badge

Category:

Other (refactor / feat / improvement)

Overview

My changes relate to how dashy works as a subdirectory. I have noticed that some requests are hardcoded to go from the root, while 99% is already dynamic with BASE_URL.
With my changes dashy can be used under any url configured with traefik or nginx or so under any subdirectory without having to lock dashy to a single url.
For this the confFilePath will now be made up of the BASE_URL and the VUE_APP_CONFIG_PATH and still choose the VUE_APP_CONFIG_PATH if it is a full url.
Implemented the new helper in both store.js and InitServiceWorker.js which had a completely hardcoded confFilePath.
I also made a small improvement to the previous helper function which had a flaw, that if anywhere in the path 'http' was used, it registered as a full url.
Fror index.html all images have been updated to use relative paths, only the loading-screen.css did not work with that, why I had to insert the BASE_URL into the template. Note that because BASE_URL always ends with an / there is no / in between BASE_URL and the css file.
All fonts are now available from relative paths for which I had to move them.
Made the front page be defined by the BASE_URL.

Issue Number #31, #193, #249, #351, #543, #600, #628, #666

New Vars

No new wars, but changed the behavior of how BASE_URL and VUE_APP_CONFIG_PATH work together.

Code Quality Checklist

all completed.

For testing, spin up dashy with the BASE_URL set to something like

  • './yourSubdomainName/'
    And add a reverse proxy with the strip prefix for '/yourSubdomainName' under the domain that dashy is available from.

Default usage at the root is not impacted by these changes.

@musterdies-web musterdies-web requested a review from Lissy93 as a code owner March 2, 2026 22:30
@netlify
Copy link

netlify bot commented Mar 2, 2026

Deploy Preview for dashy-dev ready!

Name Link
🔨 Latest commit e9fd48c
🔍 Latest deploy log https://app.netlify.com/projects/dashy-dev/deploys/69b599554984500008bd9ca0
😎 Deploy Preview https://deploy-preview-1998--dashy-dev.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

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

Successfully merging this pull request may close these issues.

1 participant