Feature: Permalinks #87

Closed
opened 2026-02-04 16:38:57 +03:00 by OVERLORD · 3 comments
Owner

Originally created by @the-guernic on GitHub (Apr 3, 2016).

Hey, I really love what you did here, because it gives an structure to a wiki than just a search engine.

One thing I would really like to see, would be a permalink solution, tho.
As far as I can tell the only way to link pages to each other is by using their static link. But if a book or a chapter is renamed the link will be dead.

Or am I missing something here?

Thanks in advance.

Originally created by @the-guernic on GitHub (Apr 3, 2016). Hey, I really love what you did here, because it gives an structure to a wiki than just a search engine. One thing I would really like to see, would be a permalink solution, tho. As far as I can tell the only way to link pages to each other is by using their static link. But if a book or a chapter is renamed the link will be dead. Or am I missing something here? Thanks in advance.
Author
Owner

@ssddanbrown commented on GitHub (Apr 3, 2016):

Hi @the-guernic, Thanks! I'm glad you're liking BookStack.

You are partially correct, The URL of a page includes the book name so, If the book name is changed, the link will no longer function in the same way. As of v0.7.5, when a page is updated the book name is recorded via the revision system. If a page is then not found the revisions will be searched. If a matching revision is found (Using the old url) the user will then be redirected to the new url of that same page. This should catch most name changes except for edge cases such as when an old book name is re-used by a new book.

There is also a static link system for pages but it's not instantly obvious. When you select some text on a page you will get a little pop-up with a url and copy button. That url is a permalink to the ID of that page (Which is not affected by any name changes). That url will also link to the exact block of content that was highlighted.

Here's an image of that popup:

image

I do want to go through and document all these little features at some point. Hopefully soon now I've started the documentation pages 😄

@ssddanbrown commented on GitHub (Apr 3, 2016): Hi @the-guernic, Thanks! I'm glad you're liking BookStack. You are partially correct, The URL of a page includes the book name so, If the book name is changed, the link will no longer function in the same way. As of [v0.7.5](https://github.com/ssddanbrown/BookStack/releases/tag/v0.7.5), when a page is updated the book name is recorded via the revision system. If a page is then not found the revisions will be searched. If a matching revision is found (Using the old url) the user will then be redirected to the new url of that same page. This should catch most name changes except for edge cases such as when an old book name is re-used by a new book. There is also a static link system for pages but it's not instantly obvious. When you select some text on a page you will get a little pop-up with a url and copy button. That url is a permalink to the ID of that page (Which is not affected by any name changes). That url will also link to the exact block of content that was highlighted. Here's an image of that popup: ![image](https://cloud.githubusercontent.com/assets/8343178/14232842/d6d23280-f9ae-11e5-8a04-585f6a5f5ac7.png) I do want to go through and document all these little features at some point. Hopefully soon now I've started the documentation pages :smile:
Author
Owner

@the-guernic commented on GitHub (Apr 4, 2016):

AAAH! I had not noticed that! Thank you for the heads up!
Thanks for the fast response, too :)

Just out of curiosity: I tried to translate your script to german but noticed, that some of the strings are hardcoded into the blade templates. Do you plan to add localization support in the future?

Cheers!

@the-guernic commented on GitHub (Apr 4, 2016): AAAH! I had not noticed that! Thank you for the heads up! Thanks for the fast response, too :) Just out of curiosity: I tried to translate your script to german but noticed, that some of the strings are hardcoded into the blade templates. Do you plan to add localization support in the future? Cheers!
Author
Owner

@ssddanbrown commented on GitHub (Apr 4, 2016):

@the-guernic No worries! I have opened an issue on the docs to document this better so I will therefore go ahead and close this issue.

In regards to the translations, Yes, that would definitely be something I would like to support. Laravel has a nice translation system built in which we can use when the time comes. I made some changes with some of the JavaScript driven components a while back to ensure we'll still be able to use the Laravel translation system with ease in the future.

Unfortunately I only know English and development of large new features is still fairly rapid. Once things have become a little more stable and the project hopefully has more followers then I'll make localization a higher priority.

@ssddanbrown commented on GitHub (Apr 4, 2016): @the-guernic No worries! I have opened an issue on the docs to document this better so I will therefore go ahead and close this issue. In regards to the translations, Yes, that would definitely be something I would like to support. Laravel has a nice translation system built in which we can use when the time comes. I made some changes with some of the JavaScript driven components a while back to ensure we'll still be able to use the Laravel translation system with ease in the future. Unfortunately I only know English and development of large new features is still fairly rapid. Once things have become a little more stable and the project _hopefully_ has more followers then I'll make localization a higher priority.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/BookStack#87