From 0d7e545542430b29568c3395900c06aedef543b2 Mon Sep 17 00:00:00 2001 From: milldr Date: Thu, 1 Aug 2024 11:17:35 -0400 Subject: [PATCH] Update Terraform docs rendering and collapse sidebar items --- scripts/docs-collator/ModuleRenderer.py | 8 ++------ scripts/render-docs-for-github-actions.sh | 2 +- sidebars.js | 4 ++-- 3 files changed, 5 insertions(+), 9 deletions(-) diff --git a/scripts/docs-collator/ModuleRenderer.py b/scripts/docs-collator/ModuleRenderer.py index 2f076b515..3300aea28 100644 --- a/scripts/docs-collator/ModuleRenderer.py +++ b/scripts/docs-collator/ModuleRenderer.py @@ -63,12 +63,8 @@ def __render_readme(self, module_download_dir, module_docs_dir): io.create_dirs(module_docs_dir) - # Copy the local terraform-docs configuration file to the module directory - # so that make readme uses that configuration - # io.copy_file( - # os.path.join(TEMPLATES_DIR, "terraform-docs.yml"), - # os.path.join(module_download_dir, ".terraform-docs.yml"), - # ) + # Re-render terraform docs with this repo's terraform-docs template for modules. + # This replaces docs/terraform.md for the given module in place rendering.render_terraform_docs( module_download_dir, os.path.join(TEMPLATES_DIR, "terraform-docs.yml") ) diff --git a/scripts/render-docs-for-github-actions.sh b/scripts/render-docs-for-github-actions.sh index aa4136e4e..af3554552 100755 --- a/scripts/render-docs-for-github-actions.sh +++ b/scripts/render-docs-for-github-actions.sh @@ -9,7 +9,7 @@ usage() { [ -z "${PUBLIC_REPO_ACCESS_TOKEN}" ] && usage "PUBLIC_REPO_ACCESS_TOKEN" -RENDERED_DOCS_DIR="${RENDERED_DOCS_DIR:-content/reference/github-actions/library}" +RENDERED_DOCS_DIR="${RENDERED_DOCS_DIR:-docs/github-actions/library}" DOWNLOAD_TMP_DIR="${DOWNLOAD_TMP_DIR:-tmp/github-actions}" python scripts/docs-collator/render_docs_for_github_actions.py \ diff --git a/sidebars.js b/sidebars.js index f24b4ecb7..ab5cb7cce 100644 --- a/sidebars.js +++ b/sidebars.js @@ -454,7 +454,7 @@ module.exports = { label: 'Terraform Components', className: 'sidebar-title', collapsible: true, - collapsed: false, + collapsed: true, link: { type: 'doc', id: 'components/components' @@ -471,7 +471,7 @@ module.exports = { label: 'Terraform Modules', className: 'sidebar-title', collapsible: true, - collapsed: false, + collapsed: true, link: { type: 'doc', id: 'modules/modules'