r/BookStack • • Sep 30 '26

Custom URL strcture

Are there at any times plans to change the URL structure from something like

/shelves/hardware
-> /topics/hardware

/books/keyboards/page/switches
-> /category/keyboards/page/switches

While i like the shelf,book,page,chapter analogy to explain the structuring, the forced naming of the URL parts and especially the UI is currently the main blocking part before i can integrate it in our company.

A more neutral wording for each layer would be already okay, changing it as a setting so the rest of the platform uses this setting (Name + URL slug per part + plurals) would be perfect.

While the overall featureset is working perfectly for us, stakeholders here are currently more comfortable with hosting expenses for wiki.js etc. then using a FOSS that fits in our existing tech stack and content pipelines

From a UX and CI perspective i understand it totally and i for myself would be willing to go the extra mile to change the underlying code after a first evaluation from you, if this makes any sense without breaking the platform regularly.

2 Upvotes

4 comments sorted by

1

u/klassenlager Sep 30 '26

Heey, I’m not aware of an option like this. But you could possibly rewrite the urls with a reverse proxy like nginx

1

u/FitBroccoli19 Sep 30 '26

That’s an easy option for url hygiene, but will be a seo nightmare with canonicals as bookstack itself will still print the default urls in markup and will not prevent users copying internal URLs from the UI.

1

u/ssddanbrown Sep 30 '26

No such existing options or plans.

Have thought about it in the past but, whenever I've dug into it, changing up the URL scheme (to support this and/or other requests) it's just never seemed worthwhile (and by that I'm not just referring to implementation effort, that's a minor element).

2

u/FitBroccoli19 Sep 30 '26

Thanks for the feedback, that was the push i needed to explore this. I "just" had to change 215 lines to go from Shelves/Books to Sections/Topics and everything works like a charm. Most of it was UI translations and hard coded links and routes. I did not touch any models or entity naming and have exactly the result i wanted without interfering with the structure the API and DB is relying on.

For now that is enough to get BookStack a solid foot in the door in our companies wiki project.

For anyone stumbling on this: it is basically 90% search and replace of strings once you know what you are looking at.

I will explore a non destructive way of doing this and focus on a .env or settings page oriented setup that is suitable for first installations before i share it properly, but these are the only files i changed: