Skip to content
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

🔗 Support project cross references in embed #1197

Merged
merged 27 commits into from
May 10, 2024
Merged

🔗 Support project cross references in embed #1197

merged 27 commits into from
May 10, 2024

Conversation

fwkoch
Copy link
Member

@fwkoch fwkoch commented May 10, 2024

Previously, project cross references were enabled with [](xref:key#identifier). Now, you can also embed this content with

:::{embed} xref:key#identifier
:::

This content gets modified to indicate that the source location has a different base URL, so links/xrefs/etc resolve correctly.

This PR includes a number of other related improvements:

  • project cross references allow cite style, e.g. @xref:key#identifier
    • This required some reordering and reorganization of link/cross-reference resolution
  • slightly better caching - centralized logic, maxAge - this de-risks the reordered link resolution a bit (we run the link transforms more often, but results are more reliably cached)
  • local cross references with page, e.g. [](page#identifier) now resolve to the same type of cross references as identifier-only, e.g. [](#identifier)
  • embed nodes with page also resolve, e.g.
    :::{embed} page#identifier
    :::
    Previously those just did not work at all.

@choldgraf
Copy link
Member

@rowanc1
Copy link
Member

rowanc1 commented May 10, 2024

Testing now @choldgraf ... hopefully getting this out this eve! 🚀

@rowanc1 rowanc1 merged commit 61c7291 into main May 10, 2024
5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants