Skip to content

Previewing a Dev build of your Antora Uyuni Static Site

Joseph Cayouette edited this page Dec 4, 2019 · 1 revision

Introduction

While you work on documentation is a good idea to see how your latest changes appear. You can use Antora to simplify the development process and ensure your docs are looking as you expect them too.

Pulling the Antora Docker Image

To get started you should have docker setup as described in our docker guide.

  1. Pull the latest Antora Image: docker pull antora/antora
  2. Clone my temporary antora publishing repo: git clone https://github.com/jcayouette/doc-susemanager-publisher
  3. Create a new working directory in the publisher repo called workspace and clone SUSE/doc-susemanager:
cd doc-susemanager-publisher
mkdir workspace
cd workspace
git clone https://github.com/SUSE/doc-susemanager
cd ../../
chmod +x clean.sh "simple script to clean up before a new build"

The .gitignore file is configured by default to ignore the workspace dir.

Tips

Work out of the doc-susemanager-publisher/workspace/doc-susemanager directory.

When you wish to preview your dev changes and build the static site with antora run the following commands from the top level doc-susemanager-publisher repo.

Cleaning up and Building

Clean up the cache and public folder:

./clean.sh 

Build the static site:

docker run -u $UID -v `pwd`:/antora --rm -t antora/antora uyuni-publisher-local.yml

Preview Your Site

  1. Start up a ruby server from the public/ directory:
ruby -run -ehttpd . -p8000
  1. Preview your site at localhost:8000 or on whatever port you specified.
Clone this wiki locally