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

URL schema for pages #2686

Closed
TH3UNKN0WN-1337 opened this issue Apr 19, 2021 · 3 comments
Closed

URL schema for pages #2686

TH3UNKN0WN-1337 opened this issue Apr 19, 2021 · 3 comments

Comments

@TH3UNKN0WN-1337
Copy link

TH3UNKN0WN-1337 commented Apr 19, 2021

We would like to have better, readable URLs.

Right now BookStacks generates URLs for pages like the following:
{baseUrl}/books/{bookName}/pages/{pageName}[-XXX]

We would like to have a URL scheme like the following:
{baseUrl}/{shelveName}/{bookName}/{chapterName}/{pageName}
{baseUrl}/shelves/{shelveName}/books/{bookName}/chapters/{chapterName}/pages/{pageName}

It may would not benefit the BookStack user itself, but we for example use BookStack to share documetation links to internal customers. And whenever two pages inside the same book have the same name the URL gets a random generated postfix {-XXX} behind it. As a work-around you could add a prefix before everything, for example:
BookName: ChatperName
ChapterName: BookName
But when looking at the generated PDF document it looks just not good, especially the chapters overview.

Is it possibleto make a change in the underlying MVC-Route, to optional change the URL schema?

@ssddanbrown
Copy link
Member

Thanks for the request @TH3UNKN0WN-1337,

We won't really look to use the shelf as part of the URL path since a page can be in many shelves and since shelves are an optional component.

The URLs generated are quite an opinionated element, from the feedback I've seen so far many would prefer to have URLs simpler than currently defined, with less text in the URL.

Just to confirm, is the requested scheme just due to get around the auto generated component of the URL slug on duplicates? If so may I ask why this is problematic in your instance?

@TH3UNKN0WN-1337
Copy link
Author

TH3UNKN0WN-1337 commented Apr 19, 2021

Hello and thanks for your fast reply @ssddanbrown!

I totally forgot about the optional shelf part. I also agree that’s this topic is very opinionated.

Well, basically it’s about the auto generated slug at the end of the page URL when two pages in a book have the same name.
maybe it sounds weird, but it’s just a esthetic thing mine/our management noted.

I was thinking a bit about WordPress and how these guys offer options to define the routes for pages. Maybe a configurable option would be a thing?

Sadly I’m not familiar with PHP and so I’m not able to just change it myself inside the source to use another routing scheme.

Hopefully my feature request is now more clear and understandable.

Greetings from Germany and thanks for sour great product,
Mirko

@ssddanbrown
Copy link
Member

Thanks for following up with detail.

I'm going to close this off since including the chapter component has already been requested as part of #497.
Realistically, I'd look to make more substantial changes in the future to accommodate a wider set of requests, so while I don't think it's likely we'll just add in chapter to the URLs, they could be part of a future scheme.

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

No branches or pull requests

2 participants