雲本地微服務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