Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 20 additions & 0 deletions convert-xref-to-includes.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
#!/bin/bash

# Recursively find all .adoc files in build/ directory and nested directories, excluding top-level index.adoc
find build/ -type f -name "*.adoc" ! -path "build/index.adoc" | while read -r file; do
# Use temporary file for safe in-place editing
tmpfile=$(mktemp)

while IFS= read -r line; do
if [[ "$line" == *xref:* ]]; then
# Replace 'xref:' with 'include::' and append '[leveloffset=+1]' on the same line
new_line="${line/xref:/include::}"
echo "$new_line[leveloffset=+1]" >> "$tmpfile"
else
echo "$line" >> "$tmpfile"
fi
done < "$file"

# Replace the original file with the modified content
mv "$tmpfile" "$file"
done
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
// Automatically generated by 'openshift-apidocs-gen'. Do not edit.
:_content-type: ASSEMBLY
[id="aap-ansible-com"]
= aap.ansible.com
ifdef::product-title[]
include::modules/common-attributes.adoc[]
endif::[]

toc::[]

== AnsibleAutomationPlatform [aap.ansible.com/v1alpha1]

Description::
+
--
AnsibleAutomationPlatform is the Schema for the ansibleautomationplatforms API
--

Type::
`object`

== AnsibleAutomationPlatformBackup [aap.ansible.com/v1alpha1]

Description::
+
--
Schema validation for the AnsibleAutomationPlatformBackup CRD
--

Type::
`object`

== AnsibleAutomationPlatformRestore [aap.ansible.com/v1alpha1]

Description::
+
--
Schema validation for the AnsibleAutomationPlatformRestore CRD
--

Type::
`object`

Loading