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.

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

A paragraph followed by an unordered list[1] with square bullets.[2]

  • item 1

  • item 2

  • item 3

Ordered list

  1. Protons

  2. Electrons

  3. Neutrons

Nested

  1. Step 1

  2. Step 2

    1. Step 2a

    2. Step 2b

  3. Step 3

Nested unordered with in ordered

  1. Linux

    • Fedora

    • Ubuntu

    • Slackware

  2. BSD

    • FreeBSD

    • NetBSD

Reversed

Parts of an atom
  1. Protons

  2. Electrons

  3. Neutrons

Start with different Number

  1. Step four

  2. Step five

  3. 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?

Ask questions in the community chat.

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 File  Save.

Select View  Zoom  Reset to reset the zoom level to the default setting.

Image

Sunset
Figure 1. A mountain sunset

You can find Linux everywhere these days.

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.
It’s not their fault you can’t find your boots.

Block

Example 1. Optional title
This is an example of an example block.
Example 2. Onomatopoeia

The book hit the floor with a thud.

He could hear doves cooing in the pine trees’ branches.

After landing the cloaked Klingon bird of prey in Golden Gate park:
Everybody remember where we parked.
— Captain James T. Kirk
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.
— The documentation attorneys

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?

— Monty Python and the Holy Grail
The fog comes
on little cat feet.

It sits looking
over harbor and city
on silent haunches
and then moves on.
— Carl Sandburg
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

Table 1. A table with a title
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))\).

\[sqrt(4) = 2\]

\(C = \alpha + \beta Y^{\gamma} + \epsilon\)

My Diabolical Mathematical Opus

An e-xciting limit with LaTeX!
\[\lim_{n \to \infty}\frac{n}{\sqrt[n]{n!}} = {\large e}\]
A basic square root with AsciiMath
\$sqrt(4) = 2\$

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.


1. AsciiDoc supports unordered, ordered, and description lists.
2. You may choose from square, disc, and circle for the bullet style.