Links outside the same post
tags: links
Description/Summary
ox-hugo Issue #30 External links with search options external-links # Links between documents can contain some search options. Only links to a heading with a :CUSTOM_ID property will be resolved to the appropriate location in the linked file. Links to headings and links to targets will be resolved to the containing file. Link to CUSTOM_ID Link to a heading Links to Org Targets: here and here Internal links internal-links # Internal links point to targets in the current subtree that will be exported to the same Hugo post as the link source.
Content
ox-hugo Issue #30
External links with search options external-links #
Links between documents can contain some search options. Only links to a heading with a :CUSTOM_ID property will be resolved to the appropriate location in the linked file. Links to headings and links to targets will be resolved to the containing file.
- Link to CUSTOM_ID
- Link to a heading
- Links to Org Targets: here and here
Internal links internal-links #
Internal links point to targets in the current subtree that will be
exported to the same Hugo post as the link source. To handle links to
an :ID property, the org-id feature must first be loaded, either
through org-customize or by adding (require 'org-id) in your Emacs
init file.
Cross-post links crosspost-links #
Cross-post links are internal links pointing to targets in a different
subtree that will be exported to another Hugo post than the link
source in subtree-based exports. The Hugo’s ref and relref
shortcodes only supports anchors to headings, so links to a heading,
a :CUSTOM_ID property, or an :ID property will be resolved to the
appropriate location in the linked file, but links to targets will be
resolved to the containing post.
Below section throws this error
Error: user-error ("Org export aborted. Unable to resolve link: \"posts/link-destination.pre-processed.org::#external-target\"
Internal target #
Page (Debug)
| Page Variable | Value | |
|---|---|---|
| Name | "Links outside the same post" | |
| Title | "Links outside the same post" | |
| ResourceType | "page" | |
| Kind | "page" | |
| Section | "posts" | |
| Draft | false | |
| Type | "posts" | |
| Layout | "" | |
| Permalink | "https://ox-hugo.scripter.co/test/posts/links-outside-the-same-post/" | |
| RelPermalink | "/posts/links-outside-the-same-post/" | |
| Data |
| |
| NextPage | Link to headings by name | |
| PrevPage | Links to equations | |
| NextInSection | Link to headings by name | |
| PrevInSection | Links to equations |
Page Params (Debug)
| Key | Type | Value |
|---|---|---|
| draft | bool | false |
| iscjklanguage | bool | false |
| lastmod | time.Time | 2025-02-12 13:34:15 -0500 -0500 |
| tags | []string | "links" |
| title | string | "Links outside the same post" |
File Object (Debug)
| FileInfo Variable | Value |
|---|---|
| UniqueID | "8780ed88545cc9fd034c54b9843503a2" |
| BaseFileName | "links-outside-the-same-post" |
| TranslationBaseName | "links-outside-the-same-post" |
| Lang | "en" |
| Section | "posts" |
| LogicalName | "links-outside-the-same-post.md" |
| Dir | "posts/" |
| Ext | "md" |
| Path | "posts/links-outside-the-same-post.md" |