GithubHelp home page GithubHelp logo

build_for_antora's Introduction

build_for_antora

Using codespaces for OKD on Antora

  • Create a codespace on main branch of https://github.com/gabriel-rh/build_for_antora
  • Wait for extensions, packages to be installed (less than a minute)
  • cd /workspaces
  • git clone --depth=1 https://github.com/openshift/openshift-docs
  • cd /workspaces/build_for_antora/scripts
  • node ./build_for_antora.js
  • cp /workspaces/build_for_antora/antora-template/antora-playbook.yml /workspaces/okd-antora/
  • cp /workspaces/build_for_antora/antora-template/docs/antora.yml /workspaces/okd-antora/docs/
  • cd /workspaces/okd-antora/
  • antora antora-playbook.yml
    • git init
    • git add .
    • git commit -m "init"
    • antora antora-playbook.yml
  • http-server -c-1 build/site/

Using codespaces to build a specific version of a specific distro

In this example, we will build version 4.13 of OCP Enterprise docs

  • Create a codespace on main branch of https://github.com/gabriel-rh/build_for_antora

  • Wait for extensions, packages to be installed (less than a minute)

  • cd /workspaces

  • git clone https://github.com/openshift/openshift-docs

  • cd openshift-docs/

  • git checkout enterprise-4.13

  • cd /workspaces/build_for_antora/scripts

  • Edit the .env.codespace file so it looks like:

    INPUT_DIR=/workspaces/openshift-docs
    
    DISTRO="openshift-enterprise"
    PRODUCT_TITLE="OCP"
    PRODUCT_VERSION=4.13
    
    TOPIC_MAP_DIR=$INPUT_DIR/_topic_maps
    TOPIC_MAP_FILE=_topic_map.yml
    
    BASE_DIR=/workspaces/ocp-4.13-antora
    
  • node ./build_for_antora.js

  • copy the templates to the new folder and update for distro and version

    • cp /workspaces/build_for_antora/antora-template/antora-playbook.yml /workspaces/ocp-4.13-antora/
      site:
        title: OCP
      
    • cp /workspaces/build_for_antora/antora-template/docs/antora.yml /workspaces/ocp-4.13-antora/docs/
      ---
      asciidoc:
        attributes:
          prod-ver: 2.2
          product-title: OCP
          product-version: 4.13
      name: okd
      start_page: welcome:index.adoc
      title: OpenShift Enterprise Docs
      version: "4.13"
      nav:    
      
      • copy the nav content from the top-level-nav.yml file into the nav: section (this will be automated!)

Now do the usual build stuff:

  • cd /workspaces/ocp-4.13-antora/
  • antora antora-playbook.yml
    • git init
    • git add .
    • git commit -m "init"
    • antora antora-playbook.yml
  • http-server -c-1 build/site/

Local builds for OKD on Antora

  • git clone https://github.com/gabriel-rh/build_for_antora
  • cd build_for_antora
  • edit the ./scripts/env.local file with your config
    • set input location for openshift docs
    • set output location for antora content
    • set distro, product title and version
  • edit the ./scripts/build_for_antora.js to use your env.local instead of env.codespace
    var myEnv = dotenv.config({path: ".env.local"}) // use env.local for local builds - fix for your own setup
    
  • Install node, antora, http-server
  • npm i
  • update and copy the 2 template files from antora-template to your output directory
  • build with antora in your output directory - must git init, etc first
  • run http server locally to view files (or just view from file system)

build_for_antora's People

Contributors

gabriel-rh avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.