From 3cddc2b00c5bd59e6788f617ef0e9ddd745a9052 Mon Sep 17 00:00:00 2001 From: jeremy brisson Date: Wed, 22 Jan 2025 13:23:16 +0100 Subject: [PATCH] Sync docs: update sidebars and transform relative links to absolute paths --- .github/workflows/sync-docs.yml | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/.github/workflows/sync-docs.yml b/.github/workflows/sync-docs.yml index b008d733c6..756588741e 100644 --- a/.github/workflows/sync-docs.yml +++ b/.github/workflows/sync-docs.yml @@ -38,6 +38,13 @@ jobs: cp -r source-repo/.vale/* target-repo/.vale/ cp -r source-repo/docs/docs/* target-repo/docs/docs/ cp source-repo/docs/sidebars.ts target-repo/docs/sidebars.ts + + sed -i "/docsSidebar/,/\],/ s/'readme',/'introduction\/readme',/" target-repo/docs/sidebars.ts + mkdir target-repo/docs/docs/introduction + mv target-repo/docs/docs/readme.mdx target-repo/docs/docs/introduction/ + sed -i '/^title: Introduction/i sidebar_label: Introduction' target-repo/docs/docs/introduction/readme.mdx + sed -i 's|](\./|](/|g' target-repo/docs/docs/introduction/readme.mdx + cd target-repo git config user.name github-actions git config user.email github-actions@github.com