Skip to content

Commit c8ee991

Browse files
committed
add /latest alias with redirect:to strategy in Antora playbooks
1 parent 107ba4a commit c8ee991

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

.github/workflows/merge-build-push.yml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -82,6 +82,14 @@ jobs:
8282
else
8383
echo "WARNING: DETECTED_VERSION is empty. Skipping start_page update for $PLAYBOOK_FILE."
8484
fi
85+
86+
# Add / support symbolic paths for the latest version + redirect:to
87+
yq -i '.urls.latest_version_segment = "latest"' "$PLAYBOOK_FILE"
88+
yq -i '.urls.latest_version_segment_strategy = "redirect:to"' "$PLAYBOOK_FILE"
89+
90+
echo "Set urls.latest_version_segment = latest"
91+
echo "Set urls.latest_version_segment_strategy = redirect:to"
92+
8593
echo "Modified content of $PLAYBOOK_FILE:"
8694
cat "$PLAYBOOK_FILE"
8795
echo "--- Finished modification for $PLAYBOOK_FILE ---"

0 commit comments

Comments
 (0)