Prototype of Terraform website being assembled from multiple repositories
This repository contains the build infrastructure and some of the content for terraform.io. Pull requests from the community are welcomed!
Where the Docs Live
terraform.io is a static site built from Markdown source files using Middleman. Unlike most such sites, it draws content from a lot of different Git repositories, which can make it challenging to contribute to.
To find a page the easy way: view it on terraform.io and click the „Edit this page“ link at the bottom. (As of Spring 2019, those links get routed to the correct repo for everything except the Google Cloud Platform provider.)
If you’d rather just remember where to look:
This repository has the Terraform Enterprise docs, the Terraform GitHub Actions docs, and the Extending Terraform section
Those files can be found at content/source/docs/. The master branch is the „live“ content that gets deployed to terraform.io.
Every vendor has a „website/docs“ subfolder where its documentation lives
There’s only a datasource or a resource
The datasources are living in a „d“ directory, the resources in an „r“ directory
The titles are designed as „: „
I didn’t go through all documentation files, but the documentation seems to be quite structured like this.
Using all this information, I could create my documentation index, which included the title, the name, wether it’s a datasource or a resource, the description and a link to the real documentation page.
I included ways to store the indexed documentation, so the future frontend server wouldn’t need to initialize all the required submodules for that. I also wrote a script which updates the documentation every night, which is running on my private server.