#146 Antora 3.0 related updates
Merged 2 years ago by tdawson. Opened 2 years ago by siosm.
Unknown source antora3  into  main

file modified
+13 -7
@@ -1,15 +1,21 @@

  # Name will be mostly visible in the URL. Treat it as an identifier.

- # Tip: If you want to use the local preview scripts that come with this repository, please change this value in the site.yml file as well. (under site/start_page)

- name: epel  # <---- PLEASE MODIFY

+ # Tip: If you want to use the local preview scripts that come with this

+ # repository, please change this value in the site.yml file as well. (under

+ # site/start_page)

+ name: epel

  

- # Title will be visible on the page. 

- title: EPEL # <---- PLEASE MODIFY

+ # Title will be visible on the page.

+ title: EPEL

  

- # If you don't plan to have multiple versions of the docs (for example, to document multiple versions of some software), you can ignore this field. Otherwise, change "master" to a specific version.

+ # If you don't plan to have multiple versions of the docs (for example, to

+ # document multiple versions of some software), you can ignore this field.

+ # Otherwise, change "master" to a specific version.

  version: master

  

- # We encourage you to name the index page as "index.adoc". If you absolutely have to use a different name, please reflect it here. You can ignore this field otherwise. 

- start_page: ROOT:index

+ # We encourage you to name the index page as "index.adoc". If you absolutely

+ # have to use a different name, please reflect it here. You can ignore this

+ # field otherwise.

+ start_page: ROOT:index.adoc

  

  # This lists all the menu definitions of your component.

  nav:

file modified
+13 -8
@@ -3,25 +3,30 @@

  image="docker.io/antora/antora"

  cmd="--html-url-extension-style=indexify site.yml"

  

- if [ "$(uname)" = "Darwin" ]; then

+ if [ "$(uname)" == "Darwin" ]; then

      # Running on macOS.

      # Let's assume that the user has the Docker CE installed

      # which doesn't require a root password.

      echo ""

      echo "This build script is using Docker container runtime to run the build in an isolated environment."

      echo ""

-     docker run --rm -it -v "$(pwd):/antora" $image $cmd

+     docker run --rm -it -v $(pwd):/antora $image $cmd

  

- elif [ "$(expr substr "$(uname -s)" 1 5)" = "Linux" ]; then

+ elif [ "$(expr substr $(uname -s) 1 5)" == "Linux" ]; then

      # Running on Linux.

-     # Check whether podman is available, else fall back to docker

+     # there isn't an antora/aarch64 container, antora can be installed locally

+     # Check whether podman is available, else faill back to docker

      # which requires root.

  

-     if [ -f /usr/bin/podman ]; then

+     if [ -f /usr/local/bin/antora ]; then

+         /usr/local/bin/antora $cmd

+     elif [[ `uname -m` == "aarch64" ]]; then

+         echo "no antora/aarch64 container try just \`npm install -g @antora/cli @antora/site-generator-default\`"

+     elif [ -f /usr/bin/podman ]; then

          echo ""

          echo "This build script is using Podman to run the build in an isolated environment."

          echo ""

-         podman run --rm -it -v "$(pwd):/antora:z" $image $cmd

+         podman run --rm -it -v $(pwd):/antora:z $image $cmd

  

      elif [ -f /usr/bin/docker ]; then

          echo ""
@@ -29,13 +34,13 @@

          echo ""

  

          if groups | grep -wq "docker"; then

-             docker run --rm -it -v "$(pwd):/antora:z" $image $cmd

+             docker run --rm -it -v $(pwd):/antora:z $image $cmd

          else

              echo ""

              echo "This build script is using $runtime to run the build in an isolated environment. You might be asked for your password."

              echo "You can avoid this by adding your user to the 'docker' group, but be aware of the security implications. See https://docs.docker.com/install/linux/linux-postinstall/."

              echo ""

-             sudo docker run --rm -it -v "$(pwd):/antora:z" $image $cmd

+             sudo docker run --rm -it -v $(pwd):/antora:z $image $cmd

          fi

      else

          echo ""

file modified
+7 -7
@@ -1,6 +1,6 @@

- site: 

+ site:

    title: Local Preview

-   start_page: epel::index

+   start_page: epel::index.adoc

  content:

    sources:

     - url: .
@@ -10,11 +10,11 @@

      url: https://asamalik.fedorapeople.org/ui-bundle.zip

      snapshot: true

    default_layout: with_menu

- output: 

-   clean: true 

+ output:

+   clean: true

    dir: ./public

-   destinations: 

-   - provider: archive 

+   destinations:

+   - provider: archive

  runtime:

-   pull: true

+   fetch: true

    cache_dir: ./cache

rebased onto dc6812a

2 years ago

I don't much about the antora 3.0 update, but I have verified that these changes do not break what we currently have.
Merging.

Pull-Request has been merged by tdawson

2 years ago