-
Notifications
You must be signed in to change notification settings - Fork 69
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
generate: Remove only tfplugindocs
managed files and subdirectories from rendered website directory
#267
Conversation
Hey @SBGoods 👋 Definitely 👍 on handling this somehow, but I'm a little curious about two mutually exclusive ideas here:
|
…and directories directly managed by `tfplugindocs`
tfplugindocs
managed files and subdirectories from rendered website directory
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good to me 🚀
I'm going to lock this pull request because it has been closed for 30 days ⏳. This helps our maintainers find and focus on the active contributions. |
Relates: hashicorp/terraform-provider-null#218
Previously,
tfplugindocs
would remove the rendered website directory and all subdirectories if they exist before generating new website documentation. This method prevents documentation not managed bytfplugindocs
to coexist in the website directory. This change modifies the generation to only remove subdirectories and files directly managed by the tool including: "data-sources", "guides", "resources", and "index.md".Due to the lack of existing end-to-end testing, this was verified by locally compiling and running against a branch of
terraform-provider-null
which had acdktf
subdirectory within docs. Running the command excludes thecdktf
subdirectory from deletion while still generating documentation from the templates and examples as expected.