Skip to content

Commit

Permalink
Fixed folders rendering for eks and tgw (#588)
Browse files Browse the repository at this point in the history
  • Loading branch information
zdmytriv authored Jul 6, 2023
1 parent 0ff84d2 commit 5d63ac5
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 8 deletions.
10 changes: 3 additions & 7 deletions scripts/docs-collator/ComponentRenderer.py
Original file line number Diff line number Diff line change
Expand Up @@ -65,13 +65,9 @@ def __render_doc(self, component, file):
self.__create_indexes_for_subfolder(component)

def __create_indexes_for_subfolder(self, component):
# create category index files for dirs that doesn't have files because of docusaurus sidebar rendering issues
files = io.get_filenames_in_dir(os.path.join(self.docs_dir, component), '*', True)
for file in files:
if os.path.isfile(file) or io.has_files(file):
continue

self.__render_category_index(file)
for root, dirs, files in os.walk(os.path.join(self.docs_dir, component)):
if not files and all(os.path.isdir(os.path.join(root, d)) for d in dirs):
self.__render_category_index(root)

def __render_category_index(self, dir):
name = os.path.basename(dir)
Expand Down
2 changes: 1 addition & 1 deletion scripts/render-docs-for-components.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ set -e

GITHUB_ORG=${GITHUB_ORG:-"cloudposse"}
GITHUB_REPO=${GITHUB_REPO:-"terraform-aws-components"}
GIT_BRANCH=${GIT_BRANCH:-"master"}
GIT_BRANCH=${GIT_BRANCH:-"main"}
TMP_CLONE_DIR="${TMP_CLONE_DIR:-tmp/components/${GITHUB_REPO}}"
RENDERED_DOCS_DIR="${RENDERED_DOCS_DIR:-content/components/library/aws/}"

Expand Down

0 comments on commit 5d63ac5

Please sign in to comment.