Skip to content

Commit 15ae496

Browse files
authored
Initial commit
0 parents  commit 15ae496

828 files changed

Lines changed: 251316 additions & 0 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.editorconfig

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
root = true
2+
[*]
3+
indent_size = 2
4+
indent_style = space
5+
charset = utf-8
6+
insert_final_newline = true
7+
trim_trailing_whitespace = true
8+
end_of_line = lf
9+
10+
[{*.adoc, *.md}]
11+
trim_trailing_whitespace = false
12+
13+
[Makefile]
14+
indent_style = tab

.gitattributes

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
$ cat .gitattributes
2+
* text=auto eol=lf
3+
*.dbml linguist-language=JavaScript
4+
*.dbml linguist-vendored
5+
*.png binary
6+
*.jpg binary
7+
*.jpeg binary
8+
*.gif binary
9+
*.webp binary
10+
*.avif binary

.gitignore

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
.DS_Store
2+
.vscode
3+
.idea
4+
node_modules/
5+
dbml-error.log
6+

Dockerfile

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
FROM docker.io/antora/antora:3.1.14
2+
3+
# We have yarn.tar.gz with all these deps
4+
# This was needed because javascript dependencies tend to rot with time
5+
# So we have static deps that works for this specific antora version
6+
# To create this file
7+
# 1. open instance with make sh
8+
# 2. cd /usr/local/share/.config/yarn/global
9+
# 3. create tar file: tar -czvf yarn.tar.gz .
10+
# 4. move file to antora dir: mv yarn.tar.gz /antora
11+
12+
COPY ./yarn.tar.gz /usr/local/share/.config/yarn/global
13+
RUN tar -xzvf /usr/local/share/.config/yarn/global/yarn.tar.gz -C /usr/local/share/.config/yarn/global
14+
RUN rm /usr/local/share/.config/yarn/global/yarn.tar.gz
15+
16+
# Update to the same antora version as docker if needed
17+
#RUN yarn global add @antora/cli@3.1.14 @antora/site-generator@3.1.14
18+
19+
# You can install deps manually if you want
20+
#RUN yarn global add asciidoctor-kroki@0.18.1
21+
#RUN yarn global add asciidoctor-emoji@0.5.0
22+
#RUN yarn global add @antora/lunr-extension@1.0.0-alpha.10
23+
#RUN yarn global add @djencks/asciidoctor-mathjax@0.0.9

LICENSE

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
These documents are licensed with Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International
2+
3+
Unless explicitly specified source code Licensed with BSD-2.

Makefile

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
.PHONY: install build server sh antora.build
2+
BUILD=docker
3+
CONTAINER_LABEL=local/antora:example-docs
4+
5+
install i:
6+
${BUILD} build -t ${CONTAINER_LABEL} .
7+
8+
build b:
9+
@rm -rf docs/
10+
${BUILD} run -v .:/antora:z --rm -t ${CONTAINER_LABEL} antora-playbook.yml --stacktrace
11+
@touch docs/.nojekyll
12+
13+
server s:
14+
@cd docs && python3 -m http.server
15+
16+
shell sh:
17+
${BUILD} run -it --entrypoint /bin/sh -v .:/antora:z -t ${CONTAINER_LABEL}
18+
19+
antora.build ab:
20+
antora antora-playbook.yml --stacktrace

README.adoc

Lines changed: 109 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,109 @@
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">&#9829;</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]

antora-playbook.yml

Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
site:
2+
title: Example Documentation
3+
url: https://ninjascl.github.io/antora-docs-bootstrap
4+
start_page: "ROOT::index.adoc"
5+
6+
content:
7+
sources:
8+
- url: .
9+
branches: HEAD
10+
start_path: .
11+
12+
antora:
13+
extensions:
14+
- require: "@antora/lunr-extension"
15+
16+
asciidoc:
17+
extensions:
18+
- asciidoctor-emoji
19+
- asciidoctor-kroki
20+
- "@djencks/asciidoctor-mathjax"
21+
attributes:
22+
kroki-fetch-diagram: true
23+
experimental: ""
24+
idprefix: ""
25+
idseparator: "-"
26+
page-pagination: ""
27+
highlightjs-theme: monokai
28+
highlightjs-languages: js, elixir, sql, yaml, html, css, c, python, ada, objc
29+
30+
ui:
31+
bundle:
32+
# https://gitlab.com/antora/antora-ui-default/-/jobs/artifacts/HEAD/raw/build/ui-bundle.zip?job=bundle-stable
33+
url: ui-bundle.zip
34+
snapshot: true
35+
# https://gitlab.com/antora/antora-ui-default/-/tree/master/src/partials
36+
supplemental_files: supplemental-ui/
37+
38+
output:
39+
dir: docs/

antora.yml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
name: ROOT
2+
version: ~
3+
title: Example Documentation
4+
nav:
5+
- modules/ROOT/nav.adoc

docs/.nojekyll

Whitespace-only changes.

0 commit comments

Comments
 (0)