Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
170 changes: 103 additions & 67 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,106 +1,142 @@
[![Netlify Status](https://api.netlify.com/api/v1/badges/8cf65901-dae4-4826-b32b-17feeebddc86/deploy-status)](https://app.netlify.com/sites/kind-montalcini-bed86a/deploys)

# Volcano Website Documentation Guide

# Creating and updating the docs
Welcome to the GitHub repository for Volcano's public website. The docs are
hosted at https://volcano.sh.
Welcome to the GitHub repository for Volcano's public website. The documentation and website are hosted at [https://volcano.sh](https://volcano.sh).

We use [Hugo](https://gohugo.io/) to format and generate our website, and
[Netlify](https://www.netlify.com/) to manage the deployment of the site. Hugo
is an open-source static site generator that provides us with templates, content
organisation in a standard directory structure, and a website generation engine.
You write the pages in Markdown, and Hugo wraps them up into a website.
We use **[Hugo](https://gohugo.io/)** — a fast and flexible static site generator — to format and generate the website. The site is deployed automatically via **[Netlify](https://www.netlify.com/)**.

* Please see [How to contributing](https://github.com/volcano-sh/volcano/blob/master/contribute.md) for instructions on how to contribute, if you are not familiar with the
GitHub workflow
-----

## Quickstart
## Table of Contents
* [About](#about)
* [Getting Started](#getting-started)
* [Prerequisites](#prerequisites)
* [Installation](#installation)
* [Local Development](#local-development)
* [Contributing](#contributing)
* [Deployment](#deployment)
* [Resources](#resources)
-----

Here's a quick guide to updating the docs. It assumes you're familiar with the
GitHub workflow and you're happy to use the automated preview of your doc
updates:
## About

1. Fork the repo on GitHub.
1. Make your changes and send a pull request (PR).
1. If you're not yet ready for a review, add a comment to the PR saying it's a
work in progress or add `[WIP]` in your PRs title. You can also add `/hold` in a comment to mark the PR as not
ready for merge. (**Don't** add the Hugo declarative "draft = true" to the
page front matter, because that will prevent the auto-deployment of the
content preview described in the next point.)
1. 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!**
1. Click **Details** to the right of "Deploy preview ready" to see a preview
of your updates.
1. Continue updating your doc until you're happy with it.
1. When you're ready for a review, add a comment to the PR and assign a
reviewer/approver.
Volcano uses **[Hugo](https://gohugo.io/)** to organize content in a standard directory structure and generate the website from Markdown pages. Hugo templates wrap the Markdown content into a fully functional website.

## Previewing your changes on a local website server
This repository holds the source files, and **[Netlify](https://www.netlify.com/)** automates the building and deployment process whenever changes are pushed or pull requests are made.

If you'd like to preview your doc updates as you work, you can install Hugo
and run a local server. This section shows you how.
-----

### Install Hugo
## Getting Started

See the [Hugo installation guide][hugo-install]. Here are some examples:
### Prerequisites

#### Mac OS X:
* **Git** (for version control)
* **Hugo** (version specified in `netlify.toml`)

```
### Installation

#### macOS

```bash
brew install hugo
```

#### Debian:

1. Download the Debian package from the [Hugo website][hugo-install].
Make sure to install the Hugo version specified by the `HUGO_VERSION` environment variable in the [`netlify.toml`](netlify.toml#L6) file.
For example, [hugo_0.57.2_Linux-64bit.deb][hugo_0.57.2_Linux-64bit.deb].
1. Install the package using `dpkg`:
#### Debian / Ubuntu Linux

```
1. Download the correct Hugo version (check `HUGO_VERSION` in `netlify.toml`):
`hugo_0.57.2_Linux-64bit.deb`
[https://github.com/gohugoio/hugo/releases/download/v0.57.2/hugo\_0.57.2\_Linux-64bit.deb](https://github.com/gohugoio/hugo/releases/download/v0.57.2/hugo_0.57.2_Linux-64bit.deb)
2. Install the package:
```bash
sudo dpkg -i hugo_0.57.2_Linux-64bit.deb
```
3. Verify installation:
```bash
hugo version
```

1. Verify your installation:
#### Windows

```
* Download the latest Hugo Windows binary from the [Hugo Releases page](https://github.com/gohugoio/hugo/releases).
* Unzip and place `hugo.exe` in a directory included in your system **PATH**.
* Verify installation in Command Prompt or PowerShell:
```bash
hugo version
```

### Run a local website server
-----

Follow the usual GitHub workflow to fork the repo on GitHub and clone it to your
local machine, then use your local repo as input to your Hugo web server:
## Local Development

1. Ensure you are in your target branch:
Follow these steps to preview the website locally as you make changes:

```
git branch
1. Fork this repository on GitHub and clone your fork:

```bash
git clone https://github.com/your-username/website.git
cd website
```

1. Start your website server. Make sure you run this command from the
`/website/` directory, so that Hugo can find the config files it needs:
2. Checkout the branch you want to work on:

```bash
git checkout <branch-name>
```

3. Start the Hugo local server from the `/website/` directory (where `config.toml` exists):

```bash
hugo server -D
```

1. Your website is at [http://localhost:1313/](http://localhost:1313/).
4. Open your browser and visit:
`http://localhost:1313/`

The `-D` flag ensures Hugo builds draft content as well, useful for previewing in-progress pages.

5. Make changes in your editor, and Hugo will automatically reload the site preview with your updates.

6. Commit and push your changes to your fork:

```bash
git add .
git commit -m "commit message"
git push origin <branch-name>
```

7. Create a pull request (PR) to the main Volcano repo to propose your changes.

-----

## Contributing

Please refer to the [Volcano contributing guide](https://github.com/volcano-sh/volcano/blob/master/contribute.md).

### Pull Request Guidelines:

* If your PR is a work in progress, mark the title with `[WIP]` or add `/hold` in the comments.
* Do not set `draft = true` in your page front matter if you want Netlify preview deployments to work.
* Wait for automated checks; once you see the comment "deploy/netlify — Deploy preview ready\!", click **Details** to preview your changes.
* Assign reviewers when ready for review.

-----

## Deployment

The site is deployed automatically through **Netlify** when changes are pushed to the repository or pull requests are created.

The status of the latest deployment is visible at the top of this README.

-----

## Resources

1. Continue with the usual GitHub workflow to edit files, commit them, push the
changes up to your fork, and create a pull request. (See the GitHub workflow)
* [Hugo Installation Guide](https://gohugo.io/getting-started/installing/)
* [Hugo Basic Usage](https://gohugo.io/getting-started/usage/)
* [Hugo Directory Structure](https://gohugo.io/getting-started/directory-structure/)
* [Hugo Server Reference](https://gohugo.io/commands/hugo_server/)
* [Hugo New Content Reference](https://gohugo.io/commands/hugo_new/)

1. While making the changes, you can preview them on your local version of the
website at [http://localhost:1313/](http://localhost:1313/). Note that if you
have more than one local git branch, when you switch between git branches the
local website reflects the files in the current branch.

Useful Hugo docs:
- [Hugo installation guide](https://gohugo.io/getting-started/installing/)
- [Hugo basic usage](https://gohugo.io/getting-started/usage/)
- [Hugo site directory structure](https://gohugo.io/getting-started/directory-structure/)
- [hugo server reference](https://gohugo.io/commands/hugo_server/)
- [hugo new reference](https://gohugo.io/commands/hugo_new/)

[hugo-install]: https://gohugo.io/getting-started/installing/
[hugo_0.57.2_Linux-64bit.deb]: https://github.com/gohugoio/hugo/releases/download/v0.57.2/hugo_0.57.2_Linux-64bit.deb