Fossil SCM

fossil-scm / www / mdtest / test1.md
Source Blame History 59 lines
367f9b3… drh 1 # Markdown Link-test
367f9b3… drh 2
a3be0b8… drh 3 This document exists solely as a test for some of the hyperlinking
703e62a… drh 4 capabilities of Markdown as implemented by Fossil.
703e62a… drh 5
703e62a… drh 6 ## Relative-Path Links
367f9b3… drh 7
367f9b3… drh 8 * The index: [](../index.wiki)
367f9b3… drh 9
367f9b3… drh 10 * Load management: [](../loadmgmt.md)
367f9b3… drh 11
367f9b3… drh 12 * Site-map: [](../../../../sitemap)
367f9b3… drh 13
367f9b3… drh 14 * Windows CGI: [](../server/windows/cgi.md)
703e62a… drh 15
703e62a… drh 16 ## The Magic $ROOT Path Prefix
703e62a… drh 17
703e62a… drh 18 In text of the form `href="$ROOT/..."` in the HTML that markdown
fd1282e… drh 19 generates, the $ROOT is replaced by the complete URI for the root
703e62a… drh 20 of the document tree.
703e62a… drh 21 Note that the $ROOT translation only occurs within the `<a href="...">`
703e62a… drh 22 element, not within the text of the hyperlink. So you should see the
703e62a… drh 23 $ROOT text on this page, but if you mouse-over the hyperlink the $ROOT
703e62a… drh 24 value should have been expanded to the actual document root.
703e62a… drh 25
703e62a… drh 26 * Timeline: []($ROOT/timeline)
703e62a… drh 27
703e62a… drh 28 * Site-map: []($ROOT/sitemap)
703e62a… drh 29
703e62a… drh 30 The $ROOT prefix on markdown links is superfluous. The same link
703e62a… drh 31 works without the $ROOT prefix. (Though: the $ROOT prefix is required
703e62a… drh 32 for HTML documents.)
703e62a… drh 33
703e62a… drh 34 * Timeline: [](/timeline)
703e62a… drh 35
c64f28d… drh 36 * Help: [](/help/help)
703e62a… drh 37
703e62a… drh 38 * Site-map: [](/sitemap)
703e62a… drh 39
45427ae… drh 40 ## The Magic $CURRENT Document Version Translation
703e62a… drh 41
45427ae… drh 42 In URI text of the form `.../doc/$CURRENT/...` the
45427ae… drh 43 $CURRENT value is converted to the version number of the document
703e62a… drh 44 currently being displayed. This conversion happens after translation
703e62a… drh 45 into HTML and only occurs on href='...' attributes so it does not occur
703e62a… drh 46 for plain text.
703e62a… drh 47
45427ae… drh 48 * Document index: [](/doc/$CURRENT/www/index.wiki)
703e62a… drh 49
45427ae… drh 50 Both the $ROOT and the $CURRENT conversions can occur on the same link.
703e62a… drh 51
45427ae… drh 52 * Document index: []($ROOT/doc/$CURRENT/www/index.wiki)
703e62a… drh 53
703e62a… drh 54 The translations must be contained within HTML markup in order to work.
703e62a… drh 55 They do not work for ordinary text that appears to be an href= attribute.
703e62a… drh 56
703e62a… drh 57 * `x href='$ROOT/timeline'`
703e62a… drh 58 * `x action="$ROOT/whatever"`
45427ae… drh 59 * `x href="https://some-other-site.com/doc/$CURRENT/tail"`

Keyboard Shortcuts

Open search /
Next entry (timeline) j
Previous entry (timeline) k
Open focused entry Enter
Show this help ?
Toggle theme Top nav button