Documentation

How to make contributions to this site

This site uses Docsy and was forked from the docsy-example

Prerequisites

  • Install hugo
  • Clone kustomize
    • git clone git@github.com:kubernetes-sigs/cli-experimental && cd site/

Development

The doc input files are in the site directory. The site can be hosted locally using hugo server.

  1. cd site/
  2. npm install
  3. npm install -g postcss-cli
  4. npm install autoprefixer
  5. npm audit fix
  6. hugo server
  1. ...
  2. Running in Fast Render Mode. For full rebuilds on change: hugo server --disableFastRender
  3. Web Server is available at http://localhost:1313/ (bind address 127.0.0.1)

Publishing

Hugo compiles the files under site Hugo into html which it puts in the docs folder:

  1. cd site/
  2. hugo
  1. | EN
  2. -+--
  3. Pages | 99
  4. Paginator pages | 0
  5. Non-page files | 0
  6. Static files | 47
  7. Processed images | 0
  8. Aliases | 2
  9. Sitemaps | 1
  10. Cleaned | 0

Add the site/ and docs/ folders to a commit, then create a PR.

Publishing docs in forked repository

We use Netlify to publish changes in the site. You can also enable netlify on you’re forked repo by doing the following step.

  • Log into Netlify using your Github Credentials.
  • Click New Site from Git button in the Netlify Dashboard.
  • The setup has 3 steps.
    • Connect to Git Provider - Select Github here and authenticate your Github account if not done earlier.
    • Pick a repository - Select the forked repository here.
    • Build options, and deploy! - Here set Branch to deploy to the branch that has the latest changes also set Publish directory to ./docs.

Netlify Setup Image

Raising a PR for changes in the site

  • Once deployed, you’ll have a URL pointing to the newly deployed site. Submit the URL along with the PR.
  • Make sure your changes are working as expected in the newly received netlify URL before PR.

Netlify Deployed Image

Setting Custom Domain & DNS changes

Note

This is applicable only for the site adminisrators on the event of site migration.

  • Make sure you’re a part of Kubernetes Docs Netlify team.
  • Under Site Settings you’ll find Domain Management, where in you can set the site’s custom domain.
  • Ideally, it should match up with the wild card *.k8s.io
  • Once custom domains are set on Netlify, you can raise a PR in k8s.io github repository.
  • You’ll have to add this snippet in dns/zone-configs/k8s.io._0_base.yaml file:
  1. # <github repo url> (@maintainers)
  2. <custom_name>:
  3. type: CNAME
  4. value: <current_netlify_url>.

Useful Links