-
Notifications
You must be signed in to change notification settings - Fork 155
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
Accessing page links through a different URL than base-url
fails
#456
Comments
Created a PR to solve it: #457 |
Solved in #457 |
@mrueg @st-karol As a simple mechanism to form relative links we could simply extract the path from the link = url.Parse(api.BaseURL).Path + page.Links.Full That should be robust enough to handle both Confluence Cloud (with the What do you think? |
base-url
failsbase-url
fails
base-url
failsbase-url
fails
if page != nil {
var path, err = url.Parse(api.BaseURL)
if nil == err {
link = path.Path + page.Links.Full
}
} Works perfectly fine in our case (cloud). Correct relative link is generated 💥 Go for it if that works with your setup as well 🙇 |
Sure, feel free to propose the suggestion as a PR! |
Closing as #477 has been merged. Thanks for your contribution! |
What happened?
In our company we access the same Confluence instance through different domains depending on the authentication scheme. However,
mark
hardcodes the entire URL (including thebase-url
) whenever a Confluence page from the same instance is referenced via relative paths, creating a hard reference to thebase-url
that was specified at the timemark
was invoked.This can be fixed by removing the hardcoded reference to
base-url
as Confluence supports relative links to refer to pages under the same Confluence instance.This would also make the pages and links independent from the current
base-url
in general, allowing for more flexibility.What did you expect to happen?
Links to Confluence pages within the same page should always work regardless of the Confluence's hostname/domain.
How can we reproduce the behavior you experienced?
Steps to reproduce the behavior:
Create a page referencing a relative file containing another page, e.g.:
<!-- Title: PageWithRef --> See this [page](../path/to/other/page.md)
Create a DNS alias for your Confluence instance
Deploy the page above using the new alias as
base-url
Observe how the references above points to the new
base-url
(DNS alias), even in the regular URLFurther Information (please complete the following information)
mark --version
): 9.12.0The text was updated successfully, but these errors were encountered: