Giter Site home page Giter Site logo

sermant-website's Introduction

Development Guide

简体中文 | English

How to deploy

First, ensure that the Node.js environment exists. You can download it from the official website. After Node.js is installed, you can use

node -v
npm -v

to check whether the installation is successful. Then go to the root directory, the SERMANT-WEBSITE directory, run

npm install

to install project required dependencies. Local deploy instruction is

npm run dev

Project packaging instruction is

npm run build

Structure

sermant-website
    └─docs
        ├─.vuepress
        │  ├─components (vue component)
        │  ├─public (static resources)
        │  │  ├─img (pictures)
        │  │  └─user-story-logo (user logos of user story)
        │  ├─styles (global style)
        │  └─theme  (theme configuration)
        │      ├─components
        │      └─styles
        ├─en (english document directory)
        │  ├─document
        │  │  ├─community (community documents)
        │  │  ├─developer-guide (development documents)
        │  │  ├─faq (frequently asked questions)
        │  │  ├─plugin (plugin documents)
        │  │  └─user-guide (user documents)
        │  ├─blog
        │  │  └─README.md (blogs)
        │  ├─QuickStart.md
        │  └─README.md (homepage)
        └─zh (same as en)

Markdown usage

The url links in the article need to be changed to the relative path of the desired jump location, and the title can be added after the path to set the jump to the corresponding title of the corresponding document. The special symbol in the title is changed to "-", and the special symbol at the end of the title is omitted (such as "?"). All uppercase letters in the English title need to be changed to lowercase letters.

../../about/question/flowcontrol.md#possible-causes-for-the-retry-rule-does-not-take-effect

Images in the article need to be tagged 'MyImage'. As shown below.

<MyImage src="/docs-img/sermant-rt-arch.png" />

The path in src is the image path, and the images are stored in the .vuepress/public directory. You can create an image directory under the directory.

Homepage

The home page content can be edited in the first README.md file in the zh and en document directories. The content is placed between slot-footer and the header using Markdown syntax. The content is populated above footer on the home page.

Blog

Enter the blog directory, when you need to publish a blog, you can add blog content in the README.md.

blogArr: 
    - name: blog1
      description: 'This is description'
      path: 'blogtest1'
      tags:
      - html
      - javascript
    - name: blog2
      description: 'This is description'
      path: 'blogtest2'
      tags:
      - html
      - javascript

The name field indicates the name of the blog, the description field indicates the description information, and the path indicates the address of the newly created blog. You can add user-defined tag to tags. Note that the format of the tags is consistent with that above.

文档 (document)

There is a README.md file in the document root where you can write information such as an introduction or overview of the entire module. You can then create multiple document information, all of which are md files, in which you can edit the document content. After editing, in order to make the documentation information jump through the left sidebar, you need to go to the .vuepress directory config.js to add configuration information. Add the appropriate content under the sidebar field, as shown below.

sidebar: {
          "/en/document/": ["", "one", "two"],
          "/en/plugin/": [""],
          "/en/blog/": [""],
        },

If you create a new document called one, add the file name (without suffix) to the "/zh/document/" property in the form of an array. At the same time, note that this step should be carried out in the sidebar in both English and Chinese, otherwise it may cause inconsistency between the Chinese and English sidebars.

Advanced usage: Groups can be used when there are more levels.

{
    title: "begin",
    path: "",
    collapsable: false,
    sidebarDepth: 1,
    children: ["", "QuickStart"],
},

Use the object to group, title attribute is the group name and path is the path to be jumped when you click. If empty, you cannot click the group name to jump. Collapsable refers to whether the group can be shrunk; if set to false, all group names in the group name will be collapsable, and if true, all group names in the group name can be shrunk. The sidebarDepth property is the depth of the sidebar title. The default value is 1.

The children attribute is all the md files to be displayed under this group, and the empty string represents the README.md file, where nesting can continue. The string can be changed to the above object form, and the grading can continue (but too many layers can cause confusion in the sidebar and is not recommended).

The sidebar will eventually display the Level 1 title in the md file. If you want to change the title displayed in the sidebar, you can directly modify the level 1 title in the md file. Due to the strict extraction of the sidebar, the title level in the md file should strictly start with the first-level title, and do not skip each level. The current setting expands to show secondary headings when you click on the md file title in a sidebar. To extract deeper titles, modify the sidebarDepth in the configuration file .vuepress/config.js. As shown below, 1 will extract the second-level title, and 2 will extract the second-level title and third-level title, with a maximum of 2.

themeConfig: {
    logo: "/img/sermant-logo.png",
    displayAllHeaders: false,
    smoothScroll: true,
    sidebarDepth: 1,
    }

sermant-website's People

Contributors

robotljw avatar luanwenfei-venus avatar lilai23 avatar daizhenyu avatar xuezechao1 avatar hanbingleixue avatar tangledaily avatar provenceee avatar sherlockhan avatar yangyshdan avatar joeminty avatar

Stargazers

 avatar  avatar

Watchers

James Cloos avatar Zhenguo Niu avatar  avatar  avatar gao yuan avatar  avatar  avatar

sermant-website's Issues

为Pull request增加预览Action

What would you like to be added?

增加一个Action在Pull Request时编译并部署到预览分支

Why is this needed?

需要在提交Pull Request时预览文档效果

博客文档更新

What would you like to be added?

最新博客文档更新

Why is this needed?

官网博客日常维护

修改心跳功能介绍

What would you like to be added?

完善心跳功能介绍

Why is this needed?

当前心跳能力介绍不完善

修改监控指标信息

What would you like to be added?

增加熔断指标信息

Why is this needed?

熔断指标缺少描述

文档整改

What would you like to be added?

官网整改

Why is this needed?

发布1.0 一些目录排版要调整一下

backend 文档更新

What would you like to be added?

backend 事件推动能力说明

Why is this needed?

backend 新增事件推动能力

文档刷新

What would you like to be added?

更新官网文档

Why is this needed?

文档日常维护

开源性能基准测试

What would you like to be added?

Sermant部分插件的开源性能基准测试报告

Why is this needed?

作为基准测试说明

更新流控插件文档

What would you like to be added?

更新流控插件文档

Why is this needed?

修复文档中存在的错误,优化文档结构和内容

【doc】update docs

Permanent issue for updating docs.
Cite this issue when you want to update docs.

增加挂载多个Sermant的问题

What would you like to be added?

1、增加挂载多个Sermanrt的解决方案

Why is this needed?

1、存在需要挂载多个Sermant的场景

文档新增多版本选择支持

What would you like to be added?

在文档导航栏新增多版本选择支持

Why is this needed?

发布1.1.x相较于1.0.x新增功能并且有相应的文档修改,需要为不同版本维护对应文档,方便用户自己选择版本进行使用

【doc】修改插件内容

What would you like to be added?

优化插件文档内容

Why is this needed?

文档描述存在不合理的部分

新增漏洞反馈文档

What would you like to be added?

新增漏洞反馈文档

Why is this needed?

可以帮助Sermant进行安全性建设

二进制产物同步修改

What would you like to be added?

插件的操作和结果验证部分的demo使用方式需修改

Why is this needed?

example仓库新增了各demo的二进制产物release包,需要同步修改文档

添加开发者贡献协议

What would you like to be added?

添加开发者贡献协议

Why is this needed?

供开源贡献者证明有权授予项目使用相关的代码

【doc】修改插件文档

What would you like to be added?

1、按照模板修改文件内容

Why is this needed?

1、方便用户使用

回滚在1.0.x分支中的1.1.x特性文档

What would you like to be added?

1、回滚使用手册中Backed和Agent关于1.1.x版本特性的文档
2、删除服务可见性文档,服务可见性为1.1.x版本的特性

Why is this needed?

在1.0.x的文档中不应该出现1.1.x的特性

更新图片

What do you want to ask?

修改图片中的IP等信息

新增1.1.x版本

What would you like to be added?

新增1.1.x版本

Why is this needed?

Sermant发布新的1.2版本工程,1.1版本文档不再为latest

更新快速开始文档

What would you like to be added?

更新快速开始文档

Why is this needed?

适配1.2.1版本

修改服务可见性插件

What would you like to be added?

修改服务可见性参数配置

Why is this needed?

框架层有代码修改,涉及配置变更

更新1.1.0文档中和1.1.0特性不符的部分

What would you like to be added?

  • 服务黑名单相关配置
  • 服务开关相关配置
  • 网关服务相关配置

Why is this needed?

1.1.0文档和1.1.0版本特性不符合,会造成用户使用上的影响

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.