Hi,
I want to publish generated W3C respec HTML in a confluence page via the HTML macro.
I solved the separate CSS by including it in the HTML. However, the respec also contains: <section id="95f0458e-6677-46c7-b93a-c3707cf49b2c">
and references to a section like this : <a href=#95f0458e-6677-46c7-b93a-c3707cf49b2c>Identification of Borehole</a>
Clicking links refers to URL's outside the page. How can I fix this?
Ensure that the links are relative to the Confluence page rather than absolute URLs.
If the HTML is generated and IDs cannot be changed, manual adjustments may be necessary to ensure consistency and relative linking.
Hope this helps - Happy to help further!!
Thank you very much and have a great one!
Warm regards
Hi,
First of all, thanks :) . I have the ability to change the href and section to whatever is required. The problem I'm facing is: what would that be? The links are taken relative to the space.
So even if I make the href completely absolute, I guess I need to include the macro (id) itself somehow in the url, right?
Best regards,
Sjaak
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You don't need to include the macro ID in the URL. Use the #pagetitle_anchorname format for relative links or the full URL with the anchor (e.g., https://your-confluence-instance.com/display/SPACEKEY/PAGE#anchorname) for absolute links.
This should resolve the issue of links being relative to the space
Best Regards
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Are you sure this url format works? I read this article and it mentions: "Platform notice: Server and Data Center only."
I used these URL's just to have an absolute path to address the page (not an anchor in the page yet)
Note: I did not even try to address the anchor itself yet.
does work. I do not know how the respec javascript code of w3c is going to handle this to generate the index.
Standard everything seems to be resolved with respect to the base url (so without the "wiki/spaces/..." that means that I've somehow got to include the whole path from there on, knowing space-id and knowing page-id and page-name
Adding an anchor to the url does not jump into the macro. Instead it reloads the macro and ends at the top (not at the anchor)
Note: I can see that the space-id is replaced by the key (I'm using my personal confluence page to test). But directly using that with the `#anchor` extension does not work either.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
To further clarify:
When I use the URL "https://.../wiki/spaces/437059610/pages/781222011/Test#blah" I can see a new loading indicator loading the macro (its an attachment) and the browser just jumps to the top of the html document.
I've tried the short URL, the smart link format.. no difference.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Thanks for adding more Information.
Can you also check if the page title contains special characters, use the page ID instead of the page title to avoid that part, as we have to see what is in the stem.
Regards
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
REST v2 request, getpages.. response body (json): "title":"Test1"
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.