Code Monkey home page Code Monkey logo

website-kubebb's Introduction

Local Development

# Get the required node_modules
npm install --registry=https://registry.npm.taobao.org

# Start the local server
# 1. Use the default locale, it'll be English
npm run start
# 2. Use other locale, such as Chinese
npm run start -- --locale=zh-Hans

# Test multiple language, have to build it first and then serve it
npm run build
npm run serve

For now, we're mainly using markdown to write docs, so most of the content is under the directory below:

  1. docs/, for English markdown files
  2. i18n/zh-Hans/docusaurus-plugin-content-docs/current, for Chinese markdown files

So under each directory above, they should have the same structure. You can update or put new markdown files as the existing ones, and they'll show up normally.

You can copy between different languages like:

cp -r docs/<some-file> i18n/zh-Hans/docusaurus-plugin-content-docs/current/<some-file>

i18n Tips

For how docusaurus supports i18n, you can get the details i18n Support

For translation of docs sidebar category labels, you can run the command below to generate the current.json file under other languages, and then translate it under i18n. For example:

npm run write-translations -- --locale zh-Hans

Production

Build docker image to deploy

# Run the docker build only once to create the base image
# Also need to run if node modules is updated
docker build -f Dockerfile.base -t hyperledgerk8s/docs-node-base:lts .

# Once we have the base image ready(built above)
# Use it as the build base, it'll be 'hyperledgerk8s/docs-node-base:lts' by default
# And then run the build below to build the final doc image
docker build -t kubebb/websites:<tag> .

Thanks to Docusaurus

This website is built using Docusaurus 2, a modern static website generator.

website-kubebb's People

Contributors

0xff-dev avatar abirdcfly avatar bjwswang avatar nkwangleigit avatar

Watchers

 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.