云本地微服务API网关

如果您想编写博客或修复一些与博客有关的问题,请先阅读Apache Apisix博客贡献指南。
首先,您需要安装git 。
然后,您应该分配此存储库,然后克隆您的叉子:
# clone your fork repo
git clone [email protected]: ${your GitHub name} /apisix-website.git
# add this repo as upstream
git remote add upstream https://github.com/apache/apisix-website.git
# default dir should be apisix-website
cd apisix-website如果您使用的是VS代码, Docker和远程 - 容器插件,则可以使用它来快速启动。
不,但是想这样尝试吗?请阅读在容器#安装中开发的开发。
然后,启动VS代码,运行Remote-Containers: Open Folder in Container... 。
提示:有关如何执行此操作的详细信息,请参见在容器#快速启动中开发的文档。
初始化后,您可以跳过下面命令的准备部分,然后直接读取其余部分。
首先,您需要安装node.js ,纱线。
提示:由于安装方法可能会发生变化,因此我们建议您在相应的官方网站上检查安装方法。如果您遇到任何问题,请随时创建一个问题。
然后,您可以阅读下面的命令。
当您发现某些命令未运行或找不到某些命令时,请查看package.json文件。
这可能是因为该项目正在快速更新,但是相应的开发人员没有找到更新相应文档的时间。
除了首次下载项目后需要运行的以下命令外,您可以在遇到任何问题时再次运行它们。
# 1. Install deps
yarn
# 2. Prepare necessary data
yarn prepare-data
# Tip.
# The `yarn prepare-data` command contains the following three commands
# If necessary, you can run any of the following commands individually
yarn sync-doc # Sync all project documents
yarn generate-repos-info # Generate repository information for each project
yarn generate-picked-posts # Generate frontmatter information for featured blogs如果您获得了GitHub
Rate Limit Exceeded,则意味着您已经达到了GitHub API率限制。该项目需要您的个人访问令牌才能无限制。如果您还没有一个,请创建一个,然后在终端中的命令下方运行(不需要您的个人数据范围)
export GITHUB_TOKEN= ${your token}
当您修改文档,博客或页面代码时,开发模式中的预览是最快的。
# Start docs part
yarn start:doc
# Tip.
# in dev, only English docs will be built
# it's a feature of docusaurus
# if you want to specify the locale,
# for example, Chinese, your should run
yarn start:doc --locale zh
# Start English Blog
yarn start:blog:en
# Start Chinese Blog
yarn start:blog:zh
# Start general docs, other pages part
yarn start:website当您要构建或预览看起来与在线相同的站点时,请运行以下命令。
# Since the local environment is slightly different from the online one,
# you must add the environment variable `preview`
preview=true yarn build
# or
yarn build:preview
# The above commands only build the site,
# to preview it locally you need the following commands
yarn serve
# You can also build and preview each part individually,
# just like in development mode
preview=true yarn build:doc && yarn serve:doc
preview=true yarn build:blog:en && yarn serve:blog:en
preview=true yarn build:blog:zh && yarn serve:blog:zh
preview=true yarn build:website && yarn serve:website接下来,您可以修改文档或代码,提交并将其推到GitHub后。如果您对此不熟悉,则可以先阅读GitHub Flow。
如果您只想修改*.md文件,则上述指南可能就足够了。
但是,如果您需要开发,请阅读下面的指南。
省略了一些可能并不重要的文件。
apisix-website
├── .github
│ └── workflows # for GitHub CI, with steps to actually build the site
├── .husky # git hooks, currently only pre-commit is used
├── scripts # scripts to help build the site
├── blog
│ ├── en
│ └── zh
├── config
├── doc
└── website
├── articles
├── docs
│ └── general # https://apisix.apache.org/docs/general/join
├── i18n
│ └── zh # chinese content
│ ├── docusaurus-plugin-content-blog # blog
│ ├── docusaurus-plugin-content-docs # general
│ └── docusaurus-theme-classic # translations of navbar and footer
├── src
│ ├── clientModules # docusaurus feature
│ ├── hooks # react hooks
│ ├── pages
│ ├── shaders
│ └── theme # swizzled any Docs/Blog component
├── static
└── docusaurus.config.js特别感谢Docusaurus。
Apache许可证2.0