-
Notifications
You must be signed in to change notification settings - Fork 68
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
Add offline emulation of the site #5
Comments
Has any thought been given on how to implement this? I've started putting something together that reuses https://registry.terraform.io/tools/doc-preview to avoid having duplicate implementations of the rendering of the markdown. While there are a number of things that still need to be done (mostly marked with TODO comments), would this be acceptable? My implementation proxies requests to the doc preview page and injects enough JavaScript to show the page and support switching the content of the textarea to display the other pages. |
Found this gem while working on a terraform provider. @wjam I really like the approach for the local preview to reuse the Terraform registry doc preview tool. It is a real time saver when reviewing the documentation. When trying the implementation at wjam@c488aaf, the browser debugger shows errors related to the Starting from wjam@c488aaf, I added the following improvements and resolved some open TODOs:
Checkout the improved @paultyng Do you have an update on the planing/roadmap of the preview feature? The approach to inject javascript/markdown in the proxy is not ideal. However, it serves the purpose well as it includes a working navigation between resources and data sources like in the real terraform registry docs. When going with the proxy approach, one direction could be to improve the registry doc preview tool to integrate nicer with the proxy (e.g. provide a javascript function to render the markdown to avoid the textarea injection). A fully offline preview would of course require all assets of the preview tool to be embedded in |
This will be really helpful when developing provider. There are several use cases here:
|
Same use case with @spikewang. @paultyng Is there any roadmap for an offline site of terraform plugin docs? |
Would really love this feature. We're trying to figure out why some of our docs are rendering incorrectly and the only thing we can do between tries is publish a new version. This inconveniences our users. We should be able to verify our changes locally. |
Ability to run something like
tfplugindocs serve
to browse the site locally.The text was updated successfully, but these errors were encountered: