gRPC website
The grpc.io site, built using Hugo and hosted on Netlify.
Build prerequisites
To build and serve the site, you'll need the latest LTS release of Node.
Install it using nvm, for example:
$ nvm install --ltsSetup
- Clone this repo.
- From a terminal window, change to the cloned repo directory.
- Get NPM packages and git submodules, including the the Docsy theme:
$ npm install
Build the site
Run the following command to have Hugo generate the site files:
$ npm run buildYou'll find the generated site files in the public folder.
Serve the site locally
To locally serve the site at localhost:8888, run the following command:
$ npm run serveSetup Google Analytics (GA) and Google Tag Manager (GTM)
-
Google Analytics (GA):
- Follow the GA setup guide to create your account, property, and data stream.
- Update
config.yamlwith your GA Measurement ID:
params: googleAnalytics: "G-XXXXXXXXXX" # Replace with your GA Measurement ID
Verify GA setup using real-time reports to ensure data from your website is being tracked.
-
Google Tag Manager (GTM):
- Follow the GTM setup guide to create your account and container.
- Update
config.yamlwith your GTM ID:
params: gtmID: "GTM-XXXXXXXX" # Replace with your GTM ID
Check GTM setup using Preview mode and verify that Tag Assistant displays "Connected" for your website URL.
Build the site by setting Hugo environment to production to make sure GA and GTM work.
$ HUGO_ENV=production npm run serveSite deploys and PR previews
If you submit a PR, Netlify will create a deploy preview so that you can
review your changes. Once your PR is merged, Netlify deploys the updated site to
the production server.
Note: PR previews include draft pages, but production builds do not.
To see deploy logs and more, visit project's dashboard -- Netlify login
required.
Check links
If you have htmltest in your path, then
you can check the site's internal links by running this command:
$ npm run check-linksYou can check all links (internal and external) as well:
$ npm run check-links:allContribute
We welcome issues and PRs! For details, see Contribute.