-
Notifications
You must be signed in to change notification settings - Fork 5
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
Internal anchor link references are forced external #13
Comments
Hi! Is it the effect of the GIF demonstration below. You can also see that the internal anchor links in the PDF I generated are clickable. The HTML code for this effect is as follows: http://localhost:5173/guide/theme-team-page.html#vpteammembers I hope it can help you. |
This is very helpful to know that I have a chance to make this work!
What I can see with all of our page anchor links is that the href has a full url—but that the url contains the full origin of the site. The generated site is still single page but I dont know what I did to the configuration to cause that. When I use the html site it works without page refresh, but the generated pdf renders links to our external site as if I clicked on a web url.
…________________________________
From: CondorHero ***@***.***>
Sent: Friday, August 25, 2023 9:50:02 PM
To: condorheroblog/vitepress-export-pdf ***@***.***>
Cc: Kurt Westerfeld ***@***.***>; Author ***@***.***>
Subject: Re: [condorheroblog/vitepress-export-pdf] Internal anchor link references are forced external (Issue #13)
Hi! Is it the effect of the GIF demonstration below. You can also see that the internal anchor links in the PDF I generated are clickable.
[2023-08-26 09-35-16 2023-08-26 09_40_54]<https://user-images.githubusercontent.com/47056890/263426361-200b4faa-ad74-4dae-b5eb-a13be0de408e.gif>
The HTML code for this effect is as follows:
[image]<https://user-images.githubusercontent.com/47056890/263426509-4b403f30-7cdc-4dcc-95d7-510fa8a74863.png>
http://localhost:5173/guide/theme-team-page.html#vpteammembers
I hope it can help you.
—
Reply to this email directly, view it on GitHub<#13 (comment)>, or unsubscribe<https://github.com/notifications/unsubscribe-auth/AJC6YIQIMTU4QL6ATDZYKSDXXFI4VANCNFSM6AAAAAA367XYMI>.
You are receiving this because you authored the thread.Message ID: ***@***.***>
|
The rules for generating anchor points in the MD file of VitePress are as follows: `<VPTeamMembers>`](#vpteammembers) If the |
I am wondering how one would generate cross page links if one can only do links as suggested?
…________________________________
From: CondorHero ***@***.***>
Sent: Friday, August 25, 2023 11:38:40 PM
To: condorheroblog/vitepress-export-pdf ***@***.***>
Cc: Kurt Westerfeld ***@***.***>; Author ***@***.***>
Subject: Re: [condorheroblog/vitepress-export-pdf] Internal anchor link references are forced external (Issue #13)
The rules for generating anchor points in the MD file of VitePress are as follows:
`<VPTeamMembers>`](#vpteammembers)
If the href is a full link, then it is a link first and an anchor second.
—
Reply to this email directly, view it on GitHub<#13 (comment)>, or unsubscribe<https://github.com/notifications/unsubscribe-auth/AJC6YIW23U23VBO5LNABBMDXXFVUBANCNFSM6AAAAAA367XYMI>.
You are receiving this because you authored the thread.Message ID: ***@***.***>
|
To handle this requirement, you need to write your own library for merging PDFs. |
It seems like perhaps this is a good addition to your library. Would you accept a PR for this feature?
Basically, it looks like anchor elements only support page-relative navigation, not cross-page navigation. The PR I am thinking of working on supports a means to handle cross-page navigation. We are using the exact recommended syntax found for internal links here: https://vitepress.dev/guide/markdown#internal-links. It would seem to be a common vitepress usecase. Example on one of our pages: [Sharing System Resources](../workload/wlm_concepts.md)
|
You can research it. If it works, accept PR🥳 |
I'm not sure exactly how to describe what is happening other than, every anchor link in my vitepress site, when rendered to HTML, refers to the origin passed to the export configuration, rather than an internal document link.
Is this configurable, perhaps through a puppeteer option?
The text was updated successfully, but these errors were encountered: