Skip to content

NinjasCL/antora-docs-bootstrap

Repository files navigation

Antora Docs Bootstrap

This is a simple configuration for creating documentation with Antora Docs.

It includes:

  • Dockerfile

  • Kroki (Plant UML and others)

  • Search

Commands

  • make install: Builds the Dockerfile.

  • make build: Compiles Antora Docs.

  • make sh: Opens the Container.

  • make server: Starts a new server for the html version. (requires python3).

Usage

  1. Change CONTAINER_LABEL=local/antora:example-docs (in Makefile) to an unique name for your docs.

  2. Install the Container: make install.

  3. (In another terminal) Open a localhost: make server.

  4. Open Container: make sh.

  5. Change settings in antora-playbook.yml

  6. Add modules in antora.yml

  7. Run Antora: antora antora-playbook.yml --stacktrace.

  8. See results in localhost:8000

If something does not work or not render well remember that antora needs a git repository.

  • git init: Creates a new git repo.

  • git commit -am 'update docs': Creates a new commit, after this try to render the docs again.

Note

If you want to have make in Windows you can use bash from git

How to add content

Inside modules you can add a new module that will contain pages, examples and images.

Example let’s create a new users module.

modules/
  users/
   nav.adoc
   pages/
      users.adoc
      roles.adoc
    images/
      image1.png
    examples/
      example.py
  ROOT/
    ...
  • pages: Will contain the adoc pages for the content.

  • images: Will contain images used inside the pages with image::image1.png[].

  • examples: Will contain code examples and other resources for the content.

Contents

Inside nav.adoc you must put the pages.

nav.adoc
.Users
* xref:users.adoc[]
* xref:roles.adoc[]

Inside examples you can store code.

examples/example.py
link:example$example.py[role=include]

License

Created with ❤️ by Camilo Castro and contributors[1]. for Ninjas.cl[2].

Licencia Creative Commons

Source code licensed with BSD-2[4].

🤩 Credits

Made with by Ninjas.cl .