Source for the istio.io site
Go to file
Martin Taillefer 9d63959234 Rename root _index.md to _index.html to keep new Hugo happy. 2020-03-06 19:02:59 -08:00
.circleci Update build files to match master. (#1528) 2018-06-15 17:26:18 -07:00
archetypes Switch from Jekyll to Hugo. 2018-05-25 20:02:32 -07:00
content Rename root _index.md to _index.html to keep new Hugo happy. 2020-03-06 19:02:59 -08:00
data Update for simplified release tracking. 2019-04-22 20:59:54 -07:00
layouts Simplified menu. 2019-06-19 04:51:51 -07:00
scripts Remove minifier since it's no longer present and not worth fixing. 2019-09-12 11:50:55 -07:00
src Add a banner for OSCON. 2018-06-26 20:28:59 -07:00
static Add a banner for OSCON. 2018-06-26 20:28:59 -07:00
.gitignore Switch from Jekyll to Hugo. 2018-05-25 20:02:32 -07:00
.spelling Resubmit #1590 to release 0.8.0 (#1624) 2018-06-29 09:27:56 -04:00
CONTRIBUTING.md Setup for linting markdown files. (#1147) 2018-04-04 22:22:14 -07:00
LICENSE extend copyright to 2018 (#843) 2018-01-06 12:28:55 -08:00
Makefile Bring latest build stuff from master to try and fix searcch on istio.io 2018-06-20 06:21:00 -07:00
OWNERS Create Owners 2018-04-02 16:18:05 -07:00
README.md Update build files to match master. (#1528) 2018-06-15 17:26:18 -07:00
config.toml A number of fixes to allow the site to be served from a subdirectory. 2018-08-01 21:34:22 -07:00
mdl_style.rb Update multi-paragraph list layout to facilitate migration from Jekyll to Hugo. (#1284) 2018-05-15 10:02:42 -07:00
netlify.toml Bring latest build stuff from master to try and fix searcch on istio.io 2018-06-20 06:21:00 -07:00

README.md

istio.github.io

This repository contains the source code for the istio.io, preliminary.istio.io and archive.istio.io sites.

Please see the main Istio README file to learn about the overall Istio project and how to get in touch with us. To learn how you can contribute to any of the Istio components, please see the Istio contribution guidelines.

Editing and testing content

We use Hugo to generate our sites. To build and test the site locally, we use a docker image that contains Hugo. To build and serve the site, simply go to the root of the tree and do:

$ make serve

This will build the site and start a web server hosting the site. You can then connect to the web server at http://localhost:1313.

All normal content for the site is located in the content directory, as well as in sibling translated directories such as content_zh.

Linting

We use linters to ensure some base quality to the site's content. We currently run 3 linters as a precommit requirement:

  • HTML proofing, which ensures all your links are valid along with other checks.

  • Spell checking.

  • Style checking, which makes sure your markdown files comply with our common style rules.

You can run these linters locally using:

$ make build
$ make lint

If you get spelling errors, you have three choices to address it:

  • It's a real typo, so fix your markdown.

  • It's a command/field/symbol name, so stick some backticks around it.

  • It's really valid, so go add the word to the .spelling file at the root of the repo.

Site infrastructure

Here's how things work:

  • Primary site content is in the content directory. This is mostly markdown files which Hugo processes into HTML.

  • Additional site content is in the static directory. These are files that Hugo directly copies to the site without any processing.

  • The src directory contains the source material for certain files from the static directory. You use

    $ make build
    

    to build the material from the src directory and refresh what's in the static directory.

Versions and releases

Istio maintains three variations of its public site:

  • istio.io is the main site, showing documentation for the current release of the product. This site is currently hosted on Firebase.

  • archive.istio.io contains snapshots of the documentation for previous releases of the product. This is useful for customers still using these older releases. This site is currently hosted on Firebase.

  • preliminary.istio.io contains the actively updated documentation for the next release of the product. This site is hosted by GitHub Pages.

The user can trivially navigate between the different variations of the site using the gear menu in the top right of each page.

How versioning works

  • Documentation changes are primarily committed to the master branch of istio.github.io. Changes committed to this branch are automatically reflected on preliminary.istio.io.

  • The content of istio.io is taken from the latest release-XXX branch. The specific branch that is used is determined by the BRANCH variable in this script

  • The content of archive.istio.io is taken from the older release-XXX branches. The set of branches that are included on archive.istio.io is determined by the TOBUILD variable in this script

The above means that if you want to do a change to the main istio.io site, you will need to make the change in the master branch of istio.github.io and then merge that change into the release branch.

Publishing content immediately

Checking in updates to the master branch will automatically update preliminary.istio.io, and will only be reflected on istio.io the next time a release is created, which can be several weeks in the future. If you'd like some changes to be immediately reflected on istio.io, you need to check your changes both to the master branch and to the current release branch (named release-XXX such as release-0.7).

Creating a version

Here are the steps necessary to create a new documentation version. Let's assume the current version of Istio is 0.6 and you wish to introduce 0.7 which has been under development.

  1. Create a new release branch off of master, named as release-major.minor, which in this case would be release-0.7. There is one such branch for every release.

  2. In the master branch, edit the file data/args.yml and update the version field to have the version of the next release of Istio. In this case, you would set the field to 0.8.

  3. In the master branch, edit the file data/releases.yml and add a new entry at the top of the file for version 0.8. You'll need to make sure the URLs are updated for the first few entries. The top entry (0.8) should point to preliminary.istio.io. The second entry (0.7) should point to istio.io. The third and subsequent entries should point to archive.istio.io.

  4. Commit the previous two edits to GitHub.

  5. In the release branch you created, edit the file data/args.yml. Set the preliminary field to false.

  6. Commit the previous edit to GitHub.

  7. Go to the Google Search Console and create a new search engine that searches the archive.istio.io/V<major>.<minor> directory. This search engine will be used to perform version-specific searches on archive.istio.io.

  8. In the previous release's branch (in this case release-0.6), edit the file data/args.yml. Set the archive field to true, the archive_date field to the current date, the search_engine_id field to the ID of the search engine you created in the prior step, and the branch_name field to the name of the branch.

  9. Switch to the istio/admin-sites repo.

  10. Navigate to the archive.istio.io directory.

  11. Edit the build.sh script to add the newest archive version (in this case release-0.6) to the TOBUILD variable.

  12. Commit the previous edit to GitHub.

  13. Run the build.sh script.

  14. Once the script completes, run firebase deploy. This will update archive.istio.io to contain the right set of archives, based on the above steps.

  15. Navigate to the current.istio.io directory.

  16. Edit the build.sh script to set the BRANCH variable to the current release branch (in this case release-0.7)

  17. Run the build.sh script.

  18. Once the script completes, run 'firebase deploy`. This will update the content of istio.io to reflect what is the new release branch you created.

Once all this is done, browse the three sites (preliminary.istio.io, istio.io, and archive.istio.io) to make sure everything looks good.