Git Product home page Git Product logo

rancher-docs's Introduction

Contribute to Rancher Docs

Welcome to the Rancher docs repository. See the Rancher software repository if you have questions or requests for the Rancher platform.

Make a Suggestion

You can suggest changes to the Rancher docs in two ways:

  1. Open an issue.
  2. Edit the docs in the way you see fit and open a pull request.

Edit the Docs

To get started, fork and clone the rancher-docs repository.

Our repository doesn't allow you to make changes directly to the main branch. Create a working branch and make pull requests from your fork to rancher/rancher-docs.

For most updates, you'll need to edit a file in /docs, and the corresponding file in /versioned_docs/version-2.7. If a change affects older versions, you can find files documenting Rancher v2.0 and later in the /versioned_docs directory.

If a file is moved or renamed, you'll also need to edit the sidebars.js files for each version, and the list of redirects in docusaurus.config.js. See Moving or Renaming Docs.

Navigate the Repo

The file paths in the repo correspond to the URLs for pages on the docs website. The docs for the latest version of Rancher are located in /docs. Most index pages are found within the /pages-for-subheaders directory in /docs. All images are in /static/img in the top level of the repo. Older docs are found within /versioned_docs and generally follow the same structure as the files in /docs.

Style & Formatting

The docs are written in Markdown. We refer to the Microsoft style guide and use standard American English. Many pages are also available in Simplified Chinese.

Every docs page contain metadata in the first few lines:

---
title: Some Title
---

The title is rendered as the page's headline. The site renderer wraps the title value in H1 tags, which are equivalent to # in Markdown syntax. This means that all subsequent headers on the page should be second level (##) or more.

Run the Docs Website

The Rancher Docs website is built with Docusaurus 2, a modern static website generator.

You can run the site on your local machine, to preview how pages on your working branch will look live.

First, install Docusaurus 2:

  1. If you haven't already, install Node and Yarn.
  2. Go into your local rancher-docs folder.
  3. The Rancher Docs repository already contains a yarn.lock file, which contains the dependencies you need to build the website. Run yarn to install Docusaurus and associated dependencies.

Start Site

yarn start

This command starts a local development server for Docusaurus 2, and opens up a browser window. Most changes are reflected live without having to restart the server.

Note: The yarn start command won't include some important static site features. For example, switching between languages from the site's dropdown menu is not available. If you need these features, use yarn build.

Build Site

yarn build

This command generates static content into the build directory and can be served using any static contents hosting service.

Launch With Docker

You can also use Docker to launch the website.

The below command can be used to install the dependencies and run the site inside a container:

docker run --rm -it -v $PWD:$PWD -w $PWD -p 3000:3000 node:18 /bin/sh -c "yarn install && yarn start -h 0.0.0.0"

Subsequent executions will check for updated dependencies, if there are none, it will skip the updates and quickly start the server.

License

Copyright (c) 2014-2023 Rancher Labs, Inc.

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

rancher-docs's People

Contributors

catherineluse avatar btat avatar mbishop17 avatar martyav avatar superseb avatar vincent99 avatar lvuch avatar tejeev avatar dnoland1 avatar bashofmann avatar niusmallnan avatar cattlebot avatar jgreat avatar vickyhella avatar westlywright avatar davidnuzik avatar divya-mohan0209 avatar macedogm avatar andypitcher avatar oskapt avatar lucassaintarbor avatar dkeightley avatar galal-hussein avatar cbron avatar roboparker avatar janeczku avatar erikwilson avatar mrajashree avatar maxsokolovsky avatar dereknola avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.