• Stars
    star
    148
  • Rank 249,983 (Top 5 %)
  • Language
    HTML
  • License
    Creative Commons ...
  • Created over 6 years ago
  • Updated 2 months ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

Kubeflow Website

Kubeflow Website

Netlify Status

Welcome to the GitHub repository for Kubeflow's public website!

The docs website is hosted at https://www.kubeflow.org.

We use Hugo with the google/docsy theme for styling and site structure, and Netlify to manage the deployment of the site.

Quickstart

Here's a quick guide to updating the docs:

  1. Fork the kubeflow/website repository on GitHub.

  2. Make your changes and send a pull request (PR).

  3. If you're not yet ready for a review, add "WIP" to the PR name to indicate it's a work in progress. Alternatively, you use the /hold prow command in a comment to mark the PR as not ready for merge.

  4. Wait for the automated PR workflow to do some checks. When it's ready, you should see a comment like this: deploy/netlify — Deploy preview ready!

  5. Click Details to the right of "Deploy preview ready" to see a preview of your updates.

  6. Continue updating your doc and pushing your changes until you're happy with the content.

  7. When you're ready for a review, add a comment to the PR, remove any holds or "WIP" markers, and assign a reviewer/approver. See the Kubeflow contributor guide.

If you need more help with the GitHub workflow, follow this guide to a standard GitHub workflow.

Local development

This section will show you how to develop the website locally, by running a local Hugo server.

Install Hugo

To install Hugo, follow the instructions for your system type.

NOTE: we recommend that you use Hugo version 0.92.0, as this is currently the version we deploy to Netlify.

For example, using homebrew to install hugo on macOS or linux:

# WARNING: this may install a newer version than `0.92.0`
brew install hugo

Install Node Packages

If you plan to make changes to the site styling, you need to install some node libraries as well. (See the Docsy setup guide for more information)

You can install the same versions we use in Netlify (defined in package.json) with the following command:

npm install -D

Run local hugo server

Follow the usual GitHub workflow of forking the repository on GitHub and then cloning your fork to your local machine.

  1. Fork the kubeflow/website repository in the GitHub UI.

  2. Clone your fork locally:

    git clone [email protected]:<your-github-username>/website.git
    cd website/
  3. Recursively download the submodules (for docsy):

    git submodule update --init --recursive
  4. Start your local Hugo server:

    hugo server -D
  5. You can access your website at http://localhost:1313/

Useful docs

Menu structure

The site theme has one Hugo menu (main), which defines the top navigation bar. You can find and adjust the definition of the menu in the site configuration file.

The left-hand navigation panel is defined by the directory structure under the docs directory.

A weight property in the front matter of each page determines the position of the page relative to the others in the same directory. The lower the weight, the earlier the page appears in the section.

Here is an example _index.md file:

+++
title = "Getting Started with Kubeflow"
description = "Overview"
weight = 1
+++

Docsy Theme

We use the Docsy theme for the website. The theme files are managed with a git submodule in the themes/docsy directory.

Do not change these files, they are not actually inside this repo, but are part of the google/docsy repo.

To update referenced docsy commit, run the following command at the root of the repo:

git submodule update --remote

Documentation style guide

For guidance on writing effective documentation, see the style guide for the Kubeflow docs.

Styling your content

The theme holds its styles in the assets/scss directory.

Do not change these files, they are not actually inside this repo, but are part of the google/docsy repo.

You can override the default styles and add new ones:

  • In general, put your files in the project directory structure under website rather than in the theme directory. Use the same file name as the theme does, and put the file in the same relative position. Hugo looks first at the file in the main project directories, if present, then at the files under the theme directory. For example, the Kubeflow website's layouts/partials/navbar.html overrides the theme's layouts/partials/navbar.html

  • You can update the Kubeflow website's project variables in the _variables_project.scss file. Values in that file override the Docsy variables. You can also use _variables_project.scss to specify your own values for any of the default Bootstrap 4 variables.

  • Custom styles _styles_project file

Styling of images:

The site's front page:

Using Hugo shortcodes

Sometimes it's useful to define a snippet of information in one place and reuse it wherever we need it. For example, we want to be able to refer to the minimum version of various frameworks/libraries throughout the docs, without causing a maintenance nightmare.

For this purpose, we use Hugo's "shortcodes". Shortcodes are similar to Django variables. You define a shortcode in a file, then use a specific markup to invoke the shortcode in the docs. That markup is replaced by the content of the shortcode file when the page is built.

To create a shortcode:

  1. Add an HTML file in the /website/layouts/shortcodes/ directory. The file name must be short and meaningful, as it determines the shortcode you and others use in the docs.

  2. For the file content, add the text and HTML markup that should replace the shortcode markup when the web page is built.

To use a shortcode in a document, wrap the name of the shortcode in braces and percent signs like this:

{{% shortcode-name %}}

The shortcode name is the file name minus the .html file extension.

Example: The following shortcode defines the minimum required version of Kubernetes:

  • File name of the shortcode:

    kubernetes-min-version.html
    
  • Content of the shortcode:

    1.8
    
  • Usage in a document:

    You need Kubernetes version {{% kubernetes-min-version %}} or later.
    

Useful Hugo docs:

Versioning of the docs

For each stable release, we create a new branch for the relevant documentation. For example, the documentation for the v0.2 stable release is maintained in the v0.2-branch. Each branch has a corresponding Netlify website that automatically syncs each merged PR.

The versioned sites follow this convention:

  • www.kubeflow.org always points to the current master branch
  • master.kubeflow.org always points to GitHub head
  • vXXX-YYY.kubeflow.org points to the release at vXXX.YYY-branch

We also hook up each version to the dropdown on the website menu bar. For information on how to update the website to a new version, see the Kubeflow release guide.

Whenever any documents reference any source code, you should use the version shortcode in the links, like so:

https://github.com/kubeflow/kubeflow/blob/{{< params "githubbranch" >}}/scripts/gke/deploy.sh

This ensures that all the links in a versioned webpage point to the correct branch.

More Repositories

1

kubeflow

Machine Learning Toolkit for Kubernetes
TypeScript
13,574
star
2

pipelines

Machine Learning Pipelines for Kubeflow
Python
3,593
star
3

spark-operator

Kubernetes operator for managing the lifecycle of Apache Spark applications on Kubernetes.
Go
2,765
star
4

training-operator

Distributed ML Training and Fine-Tuning on Kubernetes
Go
1,561
star
5

katib

Repository for hyperparameter tuning
Go
1,415
star
6

examples

A repository to host extended examples and tutorials
Jsonnet
1,400
star
7

manifests

A repository for Kustomize manifests
YAML
735
star
8

arena

A CLI for Kubeflow.
Go
730
star
9

mpi-operator

Kubernetes Operator for MPI-based applications (distributed training, HPC, etc.)
Go
392
star
10

fairing

Python SDK for building, training, and deploying ML models
Jsonnet
335
star
11

pytorch-operator

PyTorch on Kubernetes
Jsonnet
301
star
12

kfctl

kfctl is a CLI for deploying and managing Kubeflow
Go
177
star
13

example-seldon

Example for end-to-end machine learning on Kubernetes using Kubeflow and Seldon Core
Jupyter Notebook
172
star
14

kfp-tekton

Kubeflow Pipelines on Tekton
TypeScript
171
star
15

community

Information about the Kubeflow community including proposals and governance information.
Jsonnet
156
star
16

metadata

Repository for assets related to Metadata.
TypeScript
120
star
17

xgboost-operator

Incubating project for xgboost operator
Python
76
star
18

kubebench

Repository for benchmarking
Jsonnet
75
star
19

testing

Test infrastructure and tooling for Kubeflow.
Python
63
star
20

code-intelligence

ML-Powered Developer Tools, using Kubeflow
Jupyter Notebook
56
star
21

mxnet-operator

A Kubernetes operator for mxnet jobs
Go
53
star
22

common

Common APIs and libraries shared by other Kubeflow operator repositories.
Go
51
star
23

fate-operator

Fate operator
Go
50
star
24

model-registry

Go
32
star
25

batch-predict

Repository for batch predict
Python
17
star
26

chainer-operator

Repository for chainer operator
Jsonnet
17
star
27

blog

Kubeflow blog based on fastpages
Jupyter Notebook
16
star
28

caffe2-operator

Experimental repository for a caffe2 operator
Go
16
star
29

internal-acls

Repository used to main group ACLs used by Kubeflow developers
Go
14
star
30

crd-validation

Validation Generation for Kubeflow CRD on Kubernetes
Go
11
star
31

kfserving-lts

Jsonnet
10
star
32

frontend

Repository for kubeflow frontend
JavaScript
8
star
33

kfp-tekton-backend

Experimental project plugging Tekton yaml behind KFP API and UI engine
TypeScript
8
star
34

marketing-materials

4
star
35

community-infra

Declarative configurations for KF community infrastructure
Go
3
star
36

fastpages

fastpages is a platform for blogging
Jupyter Notebook
3
star
37

.allstar

2
star
38

reporting

Repository for collecting and analyzing metrics about Kubeflow usage.
Jsonnet
2
star
39

.github

Org wide templates
2
star
40

dashboard

1
star