:octothorpe: # :colon: : :rsolidus: \ :underscore: _ :3dashes: pass:q[<nobr>`---`</nobr>] :4dashes: pass:q[<nobr>`----`</nobr>]
Because I have a bad memory,
I often
need to
search the web
or
the
AsciiDoc docs
for the
tips and fragments
in this article.
Now I can
visit this page,
which is easy to get to when I’m
developing
the
Infinite Ink
website
because,
thanks to
my multi-monitor setup
and
the hugo server
command,
this article is easily viewable
on my
http://localhost:1313/
monitor
(at
http://localhost:1313/asciidoc-tips-fragments/
).
To learn about AsciiDoc attributes in general, see:
To learn about custom AsciiDoc attributes, see
The following table is forked from docs.asciidoctor.org/asciidoc/latest/attributes/character-replacement-ref/.
Attribute name | Replacement text | Appearance |
---|---|---|
| nothing | |
| nothing | |
| space | |
|   |
|
| ​ | |
| ⁠ | |
| ' | ' |
| " | " |
| ‘ | ‘ |
| ’ | ’ |
| “ | “ |
| ” | ” |
| ° | ° |
| + | + |
| ¦ | ¦ |
| | | | |
| & | & |
| < | < |
| > | > |
| [ | [ |
| ] | ] |
| ^ | ^ |
| * | * |
| ~ | ~ |
| \ | \ |
| ` | ` |
| :: | :: |
| ;; | ;; |
| C++ | C++ |
| ++ | ++ |
In addition to the above built-in attributes, I define the following custom attributes.
:octothorpe: # :colon: : :rsolidus: \ :underscore: _ :3dashes: pass:q[<nobr>`---`</nobr>] :4dashes: pass:q[<nobr>`----`</nobr>]
When coding in AsciiDoc, you reference attributes using syntax like this:
// A line starting with slash slash (//) is a comment // Some built-in attributes {asterisk} {tilde} // Some Infinite Ink custom attributes {octothorpe} {colon} {rsolidus} {underscore} {3dashes} {4dashes}
Asciidoctor can transform the above AsciiDoc source fragment to HTML that is rendered like the following in your web browser:
* ~
#
:
\
_
The source code of Infinite Ink’s qutebrowser Tips and Fragments includes this section heading:
[[_wsl]] == Calling a bash script from a Windows userscript[[_gitbash]]
Note:
_wsl
is the primary ID
_gitbash
is the secondary ID
With the above section heading code, each of the following is true.
Both of the next two AsciiDoc source code fragments link to this section heading:
link:/qutebrowser-tips-fragments/#_wsl[userscript on Windows] link:/qutebrowser-tips-fragments/#_gitbash[userscript on Windows]
In the Asciidoctor-generated table of contents, the next (primary) link is used:
link:/qutebrowser-tips-fragments/#_wsl[Calling a bash script from a Windows userscript]
If you’re interested in this topic, here’s a live link: Calling a bash script from a Windows userscript.
This is interesting.
And so is this.
Reference for this section: docs.asciidoctor.org/asciidoc/latest/directives/include/
For more about AsciiDoc, see Infinite Ink’s…
Hugo’s .RenderString
Method (featuring AsciiDoc admonitions in Go HTML and Markdown)
A Way to Compare Hugo’s Markup Languages (featuring inline footnotes)
Scoop: A Windows Package Manager (featuring Hugo, Figlet, and Ruby examples)
Hugo’s Markup Languages: AsciiDoc, HTML, Markdown,
Configuring Security in Hugo (featuring settings needed to use Asciidoctor and Pandoc)
🔗 Linkified Section Headings in Hugo-Generated Web Pages (featuring Markdown and AsciiDoc examples)
AsciiDoc Passthroughs, Hugo, LaTeX, and MathJax on Infinite Ink
Your public comment or question might immediately improve this page or help me to (eventually) improve this page.