GraphAcademy course content is written in Asciidoc.
Asciidoc is a lightweight markup language that allows you to write structured documents in a plain text format.
Attributes
Attributes are used to define variables in Asciidoc. They can be used to store values that can be reused throughout the document.
Attributes are also used in GraphAcademy to define metadata for courses, modules, and lessons (type
, order
, repository
, etc).
= Title
:type: lesson
:order: 1
Asciidoc Snippets
These are some common Asciidoc snippets.
Headings
Headings are define using =
characters:
= Heading 1
== Heading 2
=== Heading 3
==== Heading 4
Lists
Lists are defined using *
for unordered lists and .
for ordered lists:
* Unordered list item 1
* Unordered list item 2
* Unordered list item 2
. Ordered list item 1
. Ordered list item 2
. Ordered list item 3
Code
Code blocks are defined using ----
. You can also specify the language for syntax highlighting:
[source,python]
----
print("Hello, World!")
----
Hyperlinks
Hyperlinks are defined using the link:
syntax:
link:https://neo4j.com[Neo4j Website]
Images
Images can be included using the image::
directive:
image::images/my_image.png["A textual description of the image"]
Includes
You can include other Asciidoc files using the include::
directive.
include::path/to/another_file.adoc[]
Including code from a repository can be done using the include::
and you can tag specific blocks of code:
include::{repository}/solutions/my_program.py[tag=mycodeblock]
Admonitions
Admonitions are used to highlight important information.
They can be used to provide a TIP
, IMPORTANT
, or NOTE
.
[TIP]
.Title
====
It provides additional information that may be helpful to the reader.
====
Collaspibles
Collapsibles are used to hide content until the user clicks on it.
[%collapsible]
.Title
====
This content is hidden until the user clicks on the title.
====
Summary
In this lesson, you learned about Asciidoc, its attributes, and some common snippets used in GraphAcademy content.
In the next module, you will learn how to create GraphAcademy courses, including the structure of a course, modules, and lessons.