1 = Antora Docs build procedure
5 == Using generate_docs.pl
7 This tool should perform all of the steps in "Doing it Manually", automatically. This tool requires some command line arguments and also requires some prerequisites.
11 Be sure and have Node installed.
13 see https://github.com/nvm-sh/nvm#installation-and-update[Installing Node]
17 wget -qO- https://raw.githubusercontent.com/nvm-sh/nvm/v0.35.3/install.sh | bash
22 Once Node is installed, follow the Antora prereqs
24 Summarized from https://docs.antora.org/antora/2.3/install/linux-requirements/[Antora pre-reqs]
33 There is one peice of the puzzle using Ansible at the moment. Better get that installed.
37 $ sudo apt-get install ansible
40 === Run generate_docs.pl
42 This tool does the rest of the work. You will be requried to supply these things:
48 |[eg: http//examplesite.org]
51 |[Writable path where we stage antora UI repo and the antora HTML, eg: ../../tmp]
54 |[Path where you want the generated HTML files to go, eg: /var/www/html]
57 |[git link to a repo, could be community repo: https://gitlab.com/antora/antora-ui-default.git]
60 |[target version of antora, eg: 2.1]
68 $ cd Evergreen/docs-antora
69 $ ./generate_docs.pl \
70 --base-url http//examplesite.org/prod \
71 --tmp-space ../../tmp \
72 --html-output /var/www/html/prod \
73 --antora-ui-repo https://git.evergreen-ils.org/eg-antora.git \
78 NOTE: This tool will create two folders within the temp space folder path: "staging" and "antora-ui". These folders will be erased and re-created with each execution.
82 == Doing it all manually
86 $ git clone git://git.evergreen-ils.org/working/Evergreen.git
87 $ git clone git://git.evergreen-ils.org/eg-antora.git
89 $ git checkout collab/blake/LP1848524_antora_ize_docs
92 First we have to install antora:
94 https://docs.antora.org/antora/2.1/install/install-antora/
99 # (we want to install into directory as opposed to globally)
100 $ npm i @antora/cli@2.1 @antora/site-generator-default@2.1
104 Now, install the ui pre-reqs building
106 https://docs.antora.org/antora-ui-default/set-up-project/
115 At this point you should find a file in:
117 NOTE: build/ui-bundle.zip
119 Now you can build the website. But you may want to edit the file:
121 NOTE: docs-antora/site.yml
123 Because the output folder for the website is defaulted to
125 NOTE: /var/www/html/prod
127 And the default web URL is:
129 NOTE: http://localhost/prod
135 $ cd ../Evergreen/docs-antora
139 If all went well - then you will have the site built in the output folder that was configured in site.yml!
141 Interesting reading related to Antora and AsciiDoc and AsciiDoctor
143 NOTE: https://asciidoctor.org/docs/asciidoc-asciidoctor-diffs/
145 NOTE: https://blog.anoff.io/2019-02-15-antora-first-steps/
147 NOTE: https://owncloud.org/news/owncloud-docs-migrating-antora-pt-1-2/
152 First you need to have ansible installed
154 NOTE: If you want to manually edit the file, you don't need to install ansible
158 $ sudo apt-get -y install ansible
161 Now, let's run through the antora-lunr procedure:
163 NOTE: Lifted from the base install notes from the https://github.com/Mogztter/antora-lunr[ git repo]
168 $ ansible-playbook setup_lunr.yml
172 This should have edited this file: node_modules/@antora/site-generator-default/lib/generate-site.js
173 as outlined in the git repo notes
175 Now, install the lunr bits (from docs-antora folder)
182 And now, you can re-generate the site but this time with the search box:
186 $ DOCSEARCH_ENABLED=true DOCSEARCH_ENGINE=lunr antora site.yml