opencpn-manuals / development

Part of opencpn-manuals/main, not maintained as a separate manual
1 stars 2 forks source link

Asciidoc-Antora Installation -Windows #44

Open rgleason opened 3 years ago

rgleason commented 3 years ago

Add to authoring.

Local Builds

Also see https://github.com/opencpn-manuals/main/blob/main/INSTALL.md#local-builds

Installation of asciidoc

  1. Install Chocolatey https://docs.antora.org/antora/3.0/install/windows-requirements/#install-choco and https://chocolatey.org/install
  2. Install Python 3.10 asciidoc needs python >=3.5 choco install python type py to check the version https://pypi.org/project/asciidoc/
  3. Pip is a script in Python, that is normally provided. Find python with python where, result probably C:\path\to\python\python3.exe
  4. https://www.liquidweb.com/kb/install-pip-windows/
  5. Check if pip works by C:\path\to\python\Scripts\pip3 if it does add it to your environment variables. 6 Download and Install AsciiDoc 10.0 now installable with python pip https://pypi.org/project/asciidoc/ "pip3 install asciidoc"
  6. Antora Requirement for Windows https://docs.antora.org/antora/3.0/install/windows-requirements/
  7. Next install nvm and node https://docs.antora.org/antora/3.0/install/windows-requirements/#install-nvm
  8. Install nvm https://docs.antora.org/antora/3.0/install/windows-requirements/#install-nvm
  9. Install Node (Long Term Support LTS)
  10. Upgrade node using nvm https://docs.antora.org/antora/3.0/install/windows-requirements/#upgrade-node
  11. Install Antora Globally https://docs.antora.org/antora/3.0/install-and-run-quickstart/
  12. When we say “globally” here, it does not imply system-wide. It means the location where Node is installed. If you used nvm to install Node, this location will be inside your home directory (thus not requiring elevated permissions). Install using the latest long term support (LTS) release of Node. While you can use other versions of Node, Antora is only tested against active LTS releases.

(Nvm for Windows not working https://stackoverflow.com/questions/28313372/nvm-for-windows-not-working)


Older Asciidoc Install for 9.0.4 which also needed python 3.5

  1. Previous Install was 9.0.4 https://github.com/asciidoc/asciidoc-py3/releases asciidoc-9.0.4.tar.gz
  2. How to install AsciiDoctor on Windows https://prj2.fontysvenlo.org/install_asciidoctor.html
  3. Download and Install Ruby + Devkit 2.7.2-1 x64 https://rubyinstaller.org/downloads/ rubyinstaller-devkit-2.7.2-1-x64.exe
    • check the Option "Add Ruby executable to your path" during installation routine
  4. Install AsciiDoctor https://asciidoctor.org/ just below
    • Now Open a Windows Command Shell (WIN + type CMD) and install the asciidoctor gem:
    • gem install asciidoctor
    • asciidoctor --version Asciidoctor 1.5.5 [http://asciidoctor.org] Runtime Environment (ruby 2.0.0p648 (2015-12-16 revision 53162) [universal.x86_64-darwin16]) (lc:UTF-8 fs:UTF-8 in:- ex:UTF-8)

Additional Information about use

  1. Asciidoc writers guide https://asciidoctor.org/docs/asciidoc-writers-guide/
  2. Asciidoc is just plain text! So it is helpful to have a text editor that colors text for legibility.
  3. You can use Windows Notepad++, Atom Linux Vim, Emacs MacOS Textmate