Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Components Rendering: Support nested readmes #609

Merged
merged 4 commits into from
May 2, 2024
Merged

Conversation

Benbentwo
Copy link
Member

what

  • Update Component Renderer to support other Markdown files, such as docs/some-doc.md
    • ignores Changelog, since that is added to the README.md specifically (at the bottom)
    • supports copying images to keep local references

why

  • Components can have a docs folder, this is a common pattern. This is a pattern we will be implementing in terraform-aws-components
  • This pattern will continue as we move components to the cloudposse-components GitHub organization.

github_edit_url = f"https://github.com/{GITHUB_REPO}/blob/master/modules/{relative_path}"

if len(relative_path.split('/')) > 2: # this is submodule
if len(relative_path.split('/')) > 2 and relative_path.split('/')[1] != 'docs' : # this is submodule
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This smells. Though I'm not sure how we want to handle this, we need to enforce either docs/ or modules but think of tgw which uses tgw/hub as a component, it is nested, therefore I stuck with docs as an exception to the rule (where it's not a directory of TF)

Comment on lines +46 to +47
- name: "Benjamin Smith"
github: "Benbentwo"
Copy link
Sponsor Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

FYI this doesnt do anything. Contributors are pulled from contribs. But doesnt hurt either

Copy link
Sponsor Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

(with the updated README template)

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah added mostly to trigger a build

@Benbentwo Benbentwo merged commit 47fa8b6 into master May 2, 2024
3 checks passed
@Benbentwo Benbentwo deleted the support-any-md-file branch May 2, 2024 19:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants