Uploaded image for project: 'Red Hat Developer Hub Bugs'
  1. Red Hat Developer Hub Bugs
  2. RHDHBUGS-1240

fail PR checks and builds if unrendered attributes found in code snippets

XMLWordPrintable

      Description of problem:

      As noted in https://github.com/redhat-developer/red-hat-developers-documentation-rhdh/pull/257 I'm seeing more unrendered attributes in the code snippets, like `{product-chart-version}` instead of `1.3`. For example this:

      \[source,terminal]
      ----
      podman push --remove-signatures registry.redhat.io/rhdh/rhdh-hub-rhel9:\{product-chart-version}
      default-route-openshift-image-registry.<hostname>/<project_name>/rhdh-hub-rhel9:\{product-chart-version}
      ----
      

      should have the `subs="attributes+"` declaration:

      \[source,terminal,subs="attributes+"]
      

      Task here is to look through all the 1.2 or 1.3 user docs and look for places where an attribute appears in the code snippet instead of being replaced by its value.

      List of attributes:
      https://github.com/redhat-developer/red-hat-developers-documentation-rhdh/blob/main/artifacts/attributes.adoc#L15

      Another approach could be to

      • add
        ,subs="attributes+"]

        to ALL code blocks

      • add a grep check in the build.sh (and/or build-ccutil.sh) that will fail if any
        [source]

        blocks are found which do NOT declare the

        subs="attributres+"

        rendering instruction.

      Of course if we're moving away from .adoc and over to some new Adobe DITA XML format, this might be moot.

              rhn-support-pabel Priyanka Kantem
              nickboldt Nick Boldt
              RHIDP - Documentation
              Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

                Created:
                Updated:
                Resolved: