Option to use relative url #3

Closed
opened 2023-02-07 12:15:34 +01:00 by SimonDelmas · 3 comments
SimonDelmas commented 2023-02-07 12:15:34 +01:00 (Migrated from github.com)

I use your plugin for a project documentation and I really enjoy it!

I recently encountered a problem with the alias link, as the url used for replacement is an absolute url.
Indeed my documentation site is hosted on a specific route: https://my_site.net/my_project/documentation/
In this case using an absolute url resulted in a link that points to the wrong destination :
https://my_site.net/my_alias instead of https://my_site.net/my_project/documentation/my_alias

I would like to add an option to make the link relative to the current page to fix this issue.

I use your plugin for a project documentation and I really enjoy it! I recently encountered a problem with the alias link, as the url used for replacement is an absolute url. Indeed my documentation site is hosted on a specific route: https://my_site.net/my_project/documentation/ In this case using an absolute url resulted in a link that points to the wrong destination : https://my_site.net/my_alias instead of https://my_site.net/my_project/documentation/my_alias I would like to add an option to make the link relative to the current page to fix this issue.
EddyLuten commented 2023-02-07 17:02:50 +01:00 (Migrated from github.com)

Hi, thanks for reporting this issue, @SimonDelmas! I noticed that you closed your PR. Is this issue still valid?

Hi, thanks for reporting this issue, @SimonDelmas! I noticed that you closed your PR. Is this issue still valid?
SimonDelmas commented 2023-02-08 16:40:18 +01:00 (Migrated from github.com)

Hi @EddyLuten, I did a PR yesterday to propose you an option to fix my issue, but I went too fast and the patch did not correct my problem... I have just submitted another cleaner proposal.

It consist in adding an option "use_relative_link" to define links relative to the page path instead of using absolute path. Let me know if you agree with this.

Hi @EddyLuten, I did a PR yesterday to propose you an option to fix my issue, but I went too fast and the patch did not correct my problem... I have just submitted another cleaner proposal. It consist in adding an option "use_relative_link" to define links relative to the page path instead of using absolute path. Let me know if you agree with this.
EddyLuten commented 2023-02-08 17:28:43 +01:00 (Migrated from github.com)

Thanks, your solution could be helpful for a wide variety of folks. I will push this new feature out in the next minor release after I update the readme, etc.

Thanks for your contribution!

Thanks, your solution could be helpful for a wide variety of folks. I will push this new feature out in the next minor release after I update the readme, etc. Thanks for your contribution!
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
luten/mkdocs-alias-plugin#3
No description provided.