-
Notifications
You must be signed in to change notification settings - Fork 17
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Build website by converting adoc to md (#77)
* generate reference material as md using `skupper man` * convert adoc to md using https://github.com/opendevise/downdoc and https://github.com/asciidoctor/asciidoctor-reducer * remove antora references
- Loading branch information
Showing
404 changed files
with
17,150 additions
and
23,252 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,4 @@ | ||
*.pyc | ||
__pycache__/ | ||
/output | ||
sed?????? |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
# Function to process a single file | ||
process_file() { | ||
local input_file="$1" | ||
local base_name=$(basename "$input_file" .adoc) | ||
local dir_name=$(dirname "$input_file") | ||
local output_file="input/docs/${dir_name}/${base_name}.md" | ||
input_dir=`dirname $input_file` | ||
|
||
mkdir -p "output/$input_dir" | ||
|
||
|
||
# Reduce file so that all includes are resolved and convert to asciidoc | ||
# requires https://github.com/opendevise/downdoc and https://github.com/asciidoctor/asciidoctor-reducer | ||
asciidoctor-reducer "subrepos/skupper-docs/$input_file" | python python/process.py | downdoc -o "$output_file" - | ||
|
||
# Extract the title from the output HTML file | ||
title=$(head -1 "$output_file" |sed -e 's/# //g') | ||
|
||
# Insert the title at the beginning of the output file | ||
sed -i "1s;^;---\ntitle: $title\n---\n;" "$output_file" | ||
} | ||
|
||
# Check if at least one input file is provided | ||
if [ "$#" -eq 0 ]; then | ||
echo "Usage: $0 <input-file-1> [input-file-2] ..." | ||
exit 1 | ||
fi | ||
|
||
# Process each file passed as an argument | ||
for input_file in "$@"; do | ||
process_file "$input_file" | ||
done |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
./convert-adoc.sh cli/index.adoc cli/tokens.adoc cli/podman.adoc cli/native-security-options.adoc yaml/index.adoc operator/index.adoc console/index.adoc policy/index.adoc troubleshooting/index.adoc overview/connectivity.adoc overview/glossary.adoc overview/index.adoc overview/resources.adoc overview/routing.adoc overview/security.adoc | ||
|
||
cp -r subrepos/skupper-docs/images/ input/docs/ | ||
|
||
# To process nested numbered lists | ||
python python/nested-numbers.py input/docs/operator/ | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
cd input/docs | ||
rm -r kubernetes-reference | ||
rm -r podman-reference | ||
skupper --platform kubernetes man | ||
mv docs.out kubernetes-reference | ||
skupper --platform podman man | ||
mv docs.out podman-reference | ||
cd ../.. | ||
|
||
python ./python/process-man.py input/docs/kubernetes-reference | ||
python ./python/process-man.py input/docs/podman-reference | ||
|
||
mv input/docs/kubernetes-reference/skupper.md input/docs/kubernetes-reference/index.md | ||
mv input/docs/podman-reference/skupper.md input/docs/podman-reference/index.md | ||
|
||
|
||
rm input/docs/kubernetes-reference/*.1 | ||
rm input/docs/podman-reference/*.1 | ||
|
||
|
||
./plano render --force |
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.