The docsite is generated using Hugo and hosted using Github Pages. The theme is Hugo Book by Alex Shpak. Magic Modules documentation should adhere to the Google developer documentation style guide.
To view locally:
-
Ensure you've installed Git, Go, and Dart Sass. You require these prerequisites for installing Hugo.
-
Install Hugo v0.150.0:
CGO_ENABLED=1 go install -tags extended github.com/gohugoio/hugo@v0.150.0
-
Restart your terminal.
-
Clone the
magic-modulesGitHub repository:git clone https://github.com/GoogleCloudPlatform/magic-modules.git
-
Navigate to the
docsdirectory inside themagic-modulesrepository:cd magic-modules/docs/ -
Start Hugo's development server to view the Magic Modules site:
hugo server
-
View the docs by visiting the following URL in a browser window:
http://localhost:1313/magic-modules/
You can press Ctrl+C to stop Hugo's development server.
If you are having deployment issues, try to reset your hugo module cache.
hugo mod clean
To upgrade the theme version:
- Find the version you want at https://github.com/alex-shpak/hugo-book/releases
- Run the following
Example:
hugo mod get github.com/alex-shpak/hugo-book/${module_version}Or to get specific commit tagged with v12.0.0hugo mod get github.com/alex-shpak/hugo-book/v12hugo mod get github.com/alex-shpak/hugo-book/v12@v12.0.0