Skip to content

kmesh-net/website

Repository files navigation

Kmesh Docs & Website

This repo contains the source code of Kmesh Website and all of the docs for Kmesh.

Welcome to join us and you are more than appreciated to contribute!

Quick Start

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:

  1. Fork the Kmesh/website repo on GitHub.
  2. Make your changes and send a pull request (PR).
  3. 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.
  4. Wait for the automated PR workflow to do some checks. When it's ready, you should see a comment like this: Deploy Preview for kmesh-net ready!
  5. Click Details to the right of "Deploy preview ready" to see a preview of your updates.
  6. Continue updating your doc until you're happy with it.
  7. When you're ready for a review, add a comment to the PR and assign a reviewer/approver. See the Kmesh contributor guide.

How to Install

The Kmesh website is built using Docusaurus with React. Follow these steps to install and run it:

1. Prerequisites

  • Ensure you have Node.js installed (version 16.14 or above)
  • npm or yarn package manager

2. Installation Steps

  1. Clone the repository:

    git clone https://github.com/kmesh-net/website.git
    cd website
  2. Install dependencies:

    npm install
    # or
    yarn install

3. Running the Development Server

To start the local development server:

npm start
# or
yarn start

Access the local site at: http://localhost:3000

4. Building for Production

To build the static files:

npm run build
# or
yarn build

The built files will be in the build directory.

To serve the built website locally:

npm run serve
# or
yarn serve

Notes of Writing Documentation

In the Kmesh documentation, each document should include frontmatter at the beginning as follows:

---
title: Document Title
sidebar_label: Menu Label
sidebar_position: 2
description: Brief description of the document
slug: /custom-url-path
---

There are several key points to note:

  • title is the title displayed at the top of the document page
  • sidebar_label is the title displayed in the sidebar menu (optional)
  • sidebar_position determines the order of documents in the sidebar (lower numbers appear higher)
  • description is used for SEO and appears in search results
  • slug allows you to customize the URL path (optional)

For the sidebar structure, refer to the sidebar configuration in sidebars.js.

Image Optimization Guidelines

To enhance performance, all images (except logos and icons) should include the following attributes:

import Image from "@theme/IdealImage";

<Image
  img={require("/img/path/to/image.png")}
  alt="image description"
  width={1200}
/>;

Or for markdown:

![image_description](/img/path/to/image.png)

Docusaurus automatically handles image optimization including:

  • Lazy loading for improved page speed
  • Responsive sizing
  • Image optimization

Please follow this standard when contributing images to the documentation.

Happy contributing!

About

Kmesh website and documentation repo

Resources

License

Code of conduct

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published