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.136.5:
CGO_ENABLED=1 go install -tags extended github.com/gohugoio/hugo@v0.136.5
-
Restart your terminal.
-
Clone the
magic-modules
GitHub repository:git clone https://github.com/GoogleCloudPlatform/magic-modules.git
-
Navigate to the
docs
directory inside themagic-modules
repository: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/commits/master
- Run the following
go get github.com/alex-shpak/hugo-book@{{commit_hash}}
## example
## go get github.com/alex-shpak/hugo-book@d86d5e70c7c0d787675b13d9aee749c1a8b34776