Authoring the Course Content

Apart from features that are part of AsciiDoc and Antora, the course templates some extra customizations, like:

  • Clipboard

  • Tabs

  • Differntiating Console Input vs Output

Custom Macros

Apart from built in macros the template provides some customizations for code blocks that can be enabled with clipboard copy or seperating contnet via tabs

Copy-Pasteable Code

In many cases you want the code/commands to be copy-pasteable from the courseware, you can use the special styling .console-input on the AsciiDoc source blocks to have clipboard enabled for the source block.

E.g.

[.console-input]
[source,adoc]
----
kubectl get pods
----

The content above will produce the following output as part of the course site,

kubectl get pods

Console Output

As you have commands that gets executed, you may wish to show the out of the command. Like adding special style source block for console input, you can add similar style like .console-output to the source block.

E.g.

[.console-input]
[source,adoc]
----
echo "Hello World!"
----

The content above will produce the following output as part of the course site,

Hello World!

Tabs

When you want to seprate the content using Tabs, you can use the [tabs] macro. You can add the tab as shown:

[tabs]
====
one::
+
--
--
two::
+
--
--
====

The tab macro will produce an output as shown below:

  • One

  • Two

echo Hello World!
Hello World!

Live Preview

When working with course development, you dont need to publish the site to view the changes. The template is enabled with live reload capability.

Follow the steps outlined below to start the live reload mode:

  • From the root the courseware repository run the following command:

npm install

or

yarn install
  • Once node modules are installed, run the following command to start the development mode:

gulp

The gulp will start will start a local site server at http://localhost:3000.

Once the local dev server is up, any changes made to the course source repository files will trigger the build and reload of the site with new changes.