-
-
Notifications
You must be signed in to change notification settings - Fork 1.9k
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
Dynamic Links and Editor Integration #1275
Conversation
|
Thanks @Xiphoseer for continuing this work.
Don't worry about that, If we were to go down this route I'd prefer it to be all-in rather than an option. If there's a benefit to dynamic links it should be a benefit for all. To be honest, I'm still in two minds about this. Dynamic links makes the stored content less standard and adds additional complexity to both the editing and rendering systems to achieve only a benefit in edge-case scenarios. Tricky one.... |
|
As a user, my organisation is currently migrating our documentation from a Trac, some GitLab wikis and a MediaWiki to a single bookstack instance. The URL for this doumentation is not final yet, as we want to use the same URL our previous wiki had at some point. Not being able to set internal links that will survive the switch is really unfortunate for us. At the same time, I know from a past migration (from Silverstripe to DjangoCMS), that it is problematic to have the source-markup only use IDs and the rendered markup being -- well, rendered. As a developer, I completely understand your hesitant to include a feature that makes a central wiki-feature such as links non-standard. During this re-implementation, I tried some options and would like to lay out my findings below:
TLDR: RFC says reverse-DNS links, TinyMCE doesn't play nice, |
|
Thanks for the in-depth discovery @Xiphoseer. I can see the use-case of not being tied to a specific domain, but in those cases a simple DB find/replace can suffice without adding the overhead of supporting dynamic links, Which has been discussed in #1224 and #1225. I guess it comes down to this:
|
|
Find and replace in the database usually requires some sort of understanding of the database schema, so doing that without a command provided by the application as suggested in #1225 is something that I would consider bad-practice for something that otherwise just depends on how the application is configured. With the The other and more relevant use case that I'd see for this feature is to be able to link to books, chapters, shelves and possibly images in the same way that you can link to pages via the On adding additional complexity to each system handling URLs, I'd argue that changes to the editor supporting selection of those safe URLs mentioned above are worth it, but the custom protocol may be a bit much. Finally: Is there a way to send you some security-related observations, without putting it up as a public issue? |
I am looking to implement such a command though, in the not-too-distant future.
I get the technical idealism in this but I like having links that somewhat describe the content. Even if a link breaks by the content being deleted you still get an idea of what was linked to.
There is some level of handling in this case, although not perfect, via the revision system.
I'm still not 100% convinced. The more I think about it the more I like the absolute-ness and simplicity of absolute URL's.
Sure! You should be able to see my email when you click on my profile, Feel free to report any security concerns there. |
|
Any update on this request, or has it been abandoned? |
|
@tylerlucas It's essentially blocked by my indecision, especially while I've been focused on the redesign. As per my comments above, I'm still not convinced this solution is the best path to achieving the intended benefits. |
|
Thanks for your work here @Xiphoseer, But after thinking about it over the last few years I would not want to implement dynamic links in this manner, I remain on the side of my previous comments above. I would like to standardise on id-based URLs in the future, but I'd like them to still be full valid URLs to avoid any editor or raw content usability complexity. At some point in the future I'll start centralising feedback into a proposal to define a new format. |
This PR is to provide an implementation for the seemingly abandoned #737. It also includes some changes to the Markdown and WYSIWYG editor, to use the new syntax by default.
I'll provide more details later, but I chose a custom URI as the most appropriate solution to implement this feature, as it works nicely alongside other link-schemes, does not produce URL-encoded characters, wherever it is used. I'll also submit a pull-request for another branch, which does not touch the editors at all, making this feature entirely optional for the user.