|
| 1 | +:fn-ninjas: footnote:[https://ninjas.cl] |
| 2 | + |
| 3 | += Antora Docs Bootstrap |
| 4 | + |
| 5 | +This is a simple configuration for creating documentation with https://docs.antora.org/[Antora Docs]. |
| 6 | + |
| 7 | +It includes: |
| 8 | + |
| 9 | +- Dockerfile |
| 10 | +- Kroki (Plant UML and others) |
| 11 | +- Search |
| 12 | + |
| 13 | +== Commands |
| 14 | + |
| 15 | +- `make install`: Builds the Dockerfile. |
| 16 | +- `make build`: Compiles Antora Docs. |
| 17 | +- `make sh`: Opens the Container. |
| 18 | +- `make server`: Starts a new server for the html version. (requires python3). |
| 19 | + |
| 20 | +== Usage |
| 21 | + |
| 22 | +. Change `CONTAINER_LABEL=local/antora:example-docs` (in Makefile) to an unique name for your docs. |
| 23 | +. Install the Container: `make install`. |
| 24 | +. (In another terminal) Open a localhost: `make server`. |
| 25 | +. Open Container: `make sh`. |
| 26 | +. Change settings in `antora-playbook.yml` |
| 27 | +. Add modules in `antora.yml` |
| 28 | +. Run Antora: `antora antora-playbook.yml --stacktrace`. |
| 29 | +. See results in `localhost:8000` |
| 30 | + |
| 31 | +If something does not work or not render well remember that *antora* needs a git repository. |
| 32 | + |
| 33 | +- `git init`: Creates a new git repo. |
| 34 | +- `git commit -am 'update docs'`: Creates a new commit, after this try to render the docs again. |
| 35 | + |
| 36 | +[NOTE] |
| 37 | +==== |
| 38 | +If you want to have `make` in Windows you can use https://git-scm.com/install/windows[bash from git] |
| 39 | +==== |
| 40 | + |
| 41 | +== How to add content |
| 42 | + |
| 43 | +Inside `modules` you can add a new module that will contain pages, examples and images. |
| 44 | + |
| 45 | +Example let's create a new *users* module. |
| 46 | + |
| 47 | +[source, text] |
| 48 | +---- |
| 49 | +modules/ |
| 50 | + users/ |
| 51 | + nav.adoc |
| 52 | + pages/ |
| 53 | + users.adoc |
| 54 | + roles.adoc |
| 55 | + images/ |
| 56 | + image1.png |
| 57 | + examples/ |
| 58 | + example.py |
| 59 | + ROOT/ |
| 60 | + ... |
| 61 | +---- |
| 62 | + |
| 63 | +- pages: Will contain the adoc pages for the content. |
| 64 | +- images: Will contain images used inside the pages with `image::image1.png[]`. |
| 65 | +- examples: Will contain code examples and other resources for the content. |
| 66 | + |
| 67 | +=== Contents |
| 68 | + |
| 69 | +Inside `nav.adoc` you must put the pages. |
| 70 | + |
| 71 | +.nav.adoc |
| 72 | +[source, asciidoc] |
| 73 | +---- |
| 74 | +.Users |
| 75 | +* xref:users.adoc[] |
| 76 | +* xref:roles.adoc[] |
| 77 | +---- |
| 78 | + |
| 79 | +Inside `examples` you can store code. |
| 80 | + |
| 81 | +.examples/example.py |
| 82 | +[source, asciidoc] |
| 83 | +---- |
| 84 | +include::example$example.py[] |
| 85 | +---- |
| 86 | + |
| 87 | +== License |
| 88 | + |
| 89 | +Created with ❤️ by https://ninjas.cl[Camilo Castro] and https://github.com/NinjasCL/antora-docs-bootstrap/graphs/contributors[contributors]footnote:[https://github.com/NinjasCL/antora-docs-bootstrap/graphs/contributors]. for https://ninjas.cl[Ninjas.cl]{fn-ninjas}. |
| 90 | + |
| 91 | +This document is licensed with http://creativecommons.org/licenses/by-nc-sa/4.0/[Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International]footnote:[http://creativecommons.org/licenses/by-nc-sa/4.0/] |
| 92 | + |
| 93 | +http://creativecommons.org/licenses/by-nc-sa/4.0/[image:https://raw.githubusercontent.com/NinjasCL/asciidoc-book-template/main/resources/images/by-nc-sa.svg[Licencia Creative Commons]] |
| 94 | + |
| 95 | +Source code licensed with https://opensource.org/licenses/BSD-2-Clause[BSD-2]footnote:[https://opensource.org/licenses/BSD-2-Clause]. |
| 96 | + |
| 97 | +== 🤩 Credits |
| 98 | + |
| 99 | +++++ |
| 100 | +<p> |
| 101 | + Made with <i class="fa fa-heart">♥</i> by |
| 102 | + <a href="https://ninjas.cl"> |
| 103 | + Ninjas.cl |
| 104 | + </a>. |
| 105 | +</p> |
| 106 | +++++ |
| 107 | + |
| 108 | + |
| 109 | +See Also: https://github.com/NinjasCL/asciidoc-book-template/tree/main[Asciidoc Book Template] |
0 commit comments