This article written in asciidoc format. Refer this source
Asciidoc integration with Attila theme in pelican static site generator is in progress. So most of text formatting and syntax highlighting is not supported in this theme.
The same article hosted using pure asciidoctor in here
1. Articles in asciidoc format with pelican static site generator
Refer by pelicanconf.py file. In the plugins section I have added asciidoc_reader
plugin
PLUGINS = [
'sitemap',
'neighbors',
'related_posts',
'post_stats',
'assets',
'asciidoc_reader'
]
Then write this article with asciidoctor syntax and save this with .adoc extenstion.
2. Examples
Here is the example about different components in asciidoc format.
Formatting
A bold word, and a bold phrase of text.
Bold characters within a word.
An italic word, and an italic phrase of text.
Italic characters within a word.
“Wait!” Indigo plucked a small vial from her desk’s top drawer
and held it toward us.
The vial’s label read: E=mc2
; the E
represents energy,
but also pure genius!
The text underline me is underlined.
Mark my words, automation is essential.
“Well the H2O formula written on their whiteboard could be part
of a shopping list, but I don’t think the local bodega sells
E=mc2,” Lazarus replied.
The deepest body of water is Deep Creek Lake.[citation needed]
Do werewolves believe in small print?
Once upon an infinite loop.
Type the word asciidoctor into the search bar.
List
-
item 1
-
item 2
-
item 3
Ordered list
-
Protons
-
Electrons
-
Neutrons
Nested
-
Step 1
-
Step 2
-
Step 2a
-
Step 2b
-
-
Step 3
Nested unordered with in ordered
-
Linux
-
Fedora
-
Ubuntu
-
Slackware
-
-
BSD
-
FreeBSD
-
NetBSD
-
Reversed
-
Protons
-
Electrons
-
Neutrons
Start with different Number
-
Step four
-
Step five
-
Step six
Description list
- CPU
-
The brain of the computer.
- Hard drive
-
Permanent storage for operating system and/or user files.
- RAM
-
Temporarily stores information the CPU uses during operation.
- Keyboard
-
Used to enter text or control items on the screen.
- Mouse
-
Used to point to and select items on your computer screen.
- Monitor
-
Displays information in visual form using text and graphics.
Checkbox
What is there to do?
-
Done
-
Next
-
Who’s counting?
Keyboard macro
Shortcut | Purpose |
---|---|
F11 |
Toggle fullscreen |
Ctrl+T |
Open a new tab |
Ctrl+Shift+N |
New incognito window |
\ |
Used to escape characters |
Ctrl+] |
Jump to keyword |
Ctrl++ |
Increase zoom |
To save the file, select
.Select
to reset the zoom level to the default setting.Video
Vimeo Video
Youtube Video
Admonitions
Wolpertingers are known to nest in server racks. Enter at your own risk. |
Remember the milk! |
The Wolpertingers can smell your procrastination. |
Block
The book hit the floor with a thud.
He could hear doves cooing in the pine trees’ branches.
Everybody remember where we parked.
Star Trek IV: The Voyage Home
No bark was harmed in the making of this potion.
We’re not so sure about a couple ants though.
Nor those worlds…
Crap, I smell an injunction.
Dennis: Come and see the violence inherent in the system. Help! Help! I’m being repressed!
King Arthur: Bloody peasant!
Dennis: Oh, what a giveaway! Did you hear that? Did you hear that, eh? That’s what I’m on about! Did you see him repressing me? You saw him, Didn’t you?
The fog comes
on little cat feet.
It sits looking
over harbor and city
on silent haunches
and then moves on.
Fog
collapsible Block
Show stacktrace
Error: Content repository not found (url: https://git.example.org/repo.git) at transformGitCloneError at git.clone.then.then.catch Caused by: HttpError: HTTP Error: 401 HTTP Basic: Access Denied at GitCredentialManagerStore.rejected at fill.then
Source code
#!/bin/sh
fail () {
echo
echo "$*"
echo
exit 1
} >&2
JAVACMD=java
which java >/dev/null 2>&1 || fail "ERROR: no 'java' command could be found in your PATH.
exec "$JAVACMD" "$@"
puts 1
puts 2
puts 3
ORDERED_LIST_KEYWORDS = {
'loweralpha' => 'a',
'lowerroman' => 'i',
'upperalpha' => 'A',
'upperroman' => 'I',
}
require 'sinatra' (1)
get '/hi' do (2) (3)
"Hello World!"
end
1 | Library import |
2 | URL mapping |
3 | Response block |
Table
Cell in column 1, row 1 |
Cell in column 2, row 1 |
Cell in column 1, row 2 |
Cell in column 2, row 2 |
Cell in column 1, row 3 |
Cell in column 2, row 3 |
Column 1, header row | Column 2, header row |
---|---|
Cell in column 1, row 2 |
Cell in column 2, row 2 |
Column 1, header row | Column 2, header row | Column 3, header row |
---|---|---|
Cell in column 1, row 2 |
Cell in column 2, row 2 |
Cell in column 3, row 2 |
Cell in column 1, row 3 |
Cell in column 2, row 3 |
Cell in column 3, row 3 |
Formulas
\(sqrt(4) = 2\)
Water (\(H_2O\)) is a critical component.
A matrix can be written as \([[a,b],[c,d]]((n),(k))\).
\(C = \alpha + \beta Y^{\gamma} + \epsilon\)
My Diabolical Mathematical Opus
3. Conclustion
I am not happy with the output.
-
Code block is not well formatted.
-
MathJax is not supported.
-
Table is not well formatted.
Made few changes on the attila theme to support code highlight in asciidoc and added MathJax support.
But require lot of styling changes to make it better OR use asciidoctor.js to render the asciidoc content in the browser.
Need to support in my base theme. Lot of work.
Will add more features in the future in attila theme. Stay tuned.