You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Each resource in the sitemap of a Middleman site has a page ID, whether implicit or explicit. The page ID can be used to create a reference to a resource. In a template context, the url_for helper is used for this purpose. Extend the AsciiDoc xref macro to support create page references by page ID in an AsciiDoc document, effectively emulating the behavior of the url_for helper.
This extended behavior needs to be distinguished from a normal inter-document xref. This can either by done by:
a) requiring the page ID to be prefixed with /, or
b) requiring a normal inter-document xref to be prefixed with ./.
Here's an example of a page reference under proposal a).
xref:/about#[]
Here's an example of a page reference under proposal b)
xref:about#[]
Another idea is to require the extension, .adoc, to make a normal inter-document xref. This works since the page ID does not include the extension.
The text was updated successfully, but these errors were encountered:
mojavelinux
changed the title
Extend xref macro to support page references by page ID
Extend xref macro to support referencing a page by page ID
Dec 11, 2017
Each resource in the sitemap of a Middleman site has a page ID, whether implicit or explicit. The page ID can be used to create a reference to a resource. In a template context, the
url_for
helper is used for this purpose. Extend the AsciiDoc xref macro to support create page references by page ID in an AsciiDoc document, effectively emulating the behavior of theurl_for
helper.This extended behavior needs to be distinguished from a normal inter-document xref. This can either by done by:
a) requiring the page ID to be prefixed with
/
, orb) requiring a normal inter-document xref to be prefixed with
./
.Here's an example of a page reference under proposal a).
Here's an example of a page reference under proposal b)
Another idea is to require the extension,
.adoc
, to make a normal inter-document xref. This works since the page ID does not include the extension.The text was updated successfully, but these errors were encountered: