This page contains snippets used in AsciiDoc blogging examples, and it uses include directives to embed content from other files. The main blog entry is the place to look for context.
Let’s kick things off with an example of a simple note admonition.
|
This is a NOTE admonition with a Lucide info circle icon. It should display with a blue color scheme and an information icon. It can contain multiple paragraphs, like this second one. |
Those ==== demarcation characters and the [NOTE] heading are only necessary when there is something special about your admonition content, such as multiple paragraphs or distinct styling.
| Normally, this works just fine to create an admonition block. |
And blogging in standardized lightweight markup doesn’t get much simpler than that.
def hello_world message="Hello, world!", case="upper" (1)
message_cased = case == "upper" ? message.upcase : message.downcase (2)
puts message_cased (3)
end
| 1 | defines the method with default parameters |
| 2 | processes the message based on the case parameter |
| 3 | outputs the processed message |
This is a blockquote with a citation. Not something you use in tech writing very often, but quite common in all kinds of blogging.
This is some text that I want to highlight as a pull quote. I’ve styled it to be distinct from a standard blockquote, and I use them to preview interesting content that appears later in a post.
| Header 1 | Header 2 | Header 3 |
|---|---|---|
Cell 1 |
Cell 2 |
Cell 3 |
Cell 4 |
Cell 5 |
Cell 6 |
Cell 7 |
Cell 8 |
Cell 9 |
| Multiverse Documentation Planning Matrix — Because simple tables are for mortals | |||||
|---|---|---|---|---|---|
Persona |
Toolkit |
Sample Artifact |
KPI |
||
End-User Pain points:
|
AsciiDoc + Antora |
Quickstart Guide
|
⏱ Time-to-First-Success ↓ |
||
Admin User |
Paligo + Snagit |
Troubleshooting Article |
☎ Support Tickets/1k users ↓ |
||
——— Sprint 42: Docs Ops Experiments ——— |
|||||
Developer |
AsciiDoc + Make + PlantUML |
Code-Adjacent HOWTO
|
⚙ Build Failures Blamed on Docs ↓ |
||
Jekyll + Kramdown |
API Changelog
|
🔁 PRs Merged w/ Docs ↑ |
|||
Antora + Lunr |
“Docs as Feature” RFC
— A slightly dramatic PM
|
🧭 Feature Discoverability ↑ |
|||
——— Release Train: 2.3 “Quantum Marmot” ——— |
|||||
Composite Artifact: “One Doc to Rule Them All”
|
📈 Adoption Rate ↑ |
||||
Internal Auditor |
AsciiDoc + CSV + a dash of awk |
Compliance Matrix (SOC 2, ISO 27001) |
σ = 2.3± [1] |
||
Site Reliability Engineer |
Runbook Pack |
Incident Bundle
|
🔍 Incident Response Time ↓ |
||
In conclusion: Tables are for communicating structure, not suffering. Use colspans/rowspans judiciously, and never apologize for beautiful grids. |
|||||
- AsciiDoc
-
A lightweight markup language that is particularly well-suited for technical documentation and blogging, offering a rich set of features for structuring content.
- Markdown
-
A widely-used lightweight markup language known for its simplicity and ease of use, but with fewer features compared to AsciiDoc.
- lightweight markup
-
A category of markup languages designed to be easy to read and write in plain text, while still allowing for formatting and structuring of content.
An ordered list broken up by an admonition:
-
Install the NPM packages.
npm install
-
Build the app.
npm run build
| Your app is now built and ready to deploy! |
-
Deploy the app.
npm run deploy // end::ordered-list[]
-
First item
-
Sub-item A
-
Sub-sub-item i
-
Sub-sub-item ii
-
-
Sub-item B
-
-
Second item
-
Another first-level item
-
Nested with dashes
-
Back to dashes at first level
-
-
Final item
This would be mainline text that pertains very directly and prominently to the subject. The reader is reading or scanning along, but at this point the author wants to at least introduce some auxiliary content that is relevant but not strictly necessary to the main point, or not a priority at this stage.
Below that sidebar element, the mainline text would resume, and the reader can choose to read the sidebar, stash it for later, or skip it altogether.
You can also just stick all your sidebars at the end of the post like little appendices, optionally linking to them from the point in the text where they are relevant.
I typically use example blocks to show results, but you can also use them for code listings as well. Let’s make this one a combo.
name: example
array:
- item1
- item2
- item3
def hello_world():
print("Hello, world!")
This was written in a code block denoted with `+++```+++` literals.
Here come the backticks: ```
This is a literal block, the syntax for which was a simple 1-space indent
This literal block is fenced by four dots (periods), which allows for non-contiguous multiline text.
Use a heading line if you wish to assign a role or other options.
This line was indented by 4 spaces to indicate a literal.
You can keep adding lines that are indented by 4 spaces.
Some converters will render this embedded in `<code>` tags anyway. // end::literal-markdown[]
You're looking at HTML right now, sourced inside an AsciiDoc file.
It can be used for anything, including to embed adorable SVG images you come up with after an all-night coding session, like this:
This is the built-in role for strikethrough.
This is an alternate method for slightly with fewer characters.