- Notifications
You must be signed in to change notification settings - Fork188
apache/apisix-website
Folders and files
Name | Name | Last commit message | Last commit date | |
---|---|---|---|---|
Repository files navigation
If you want to write a blog or fix some blog-related issues, please readApache APISIX Blog Contributing Guide first.
First, you need to installGit.
Then you should fork this repo, and clone your fork:
# clone your fork repogit clone git@github.com:${your GitHub name}/apisix-website.git# add this repo as upstreamgit remote add upstream https://github.com/apache/apisix-website.git# default dir should be apisix-websitecd apisix-website
If you are usingVS Code,Docker, andRemote - Containers plugin, you can use this to get started quickly.
No, but want to try this way? Please readDeveloping inside a Container#Installation.
Then, startVS Code, run theRemote-Containers: Open Folder in Container...
command.
Tip: For details on how to do this, see the documentationDeveloping inside a Container#Quick Start.
After the initialization, you can skip the preparation part of the commands below and readthe rest directly.
First, you need to installNode.js,Yarn.
Tip: Since the installation method may change, we recommend that you check the installation method on the corresponding official website. If you encounter any problems, please feel free to create an issue.
Then you can readthe commands below.
When you find that some commands do not run, or cannot be found, look at the package.json file.
This may be because the project is being updated quickly, but the corresponding developer did not find the time to update the corresponding documentation.
Except for the following commands that you need to run after downloading the project for the first time, you cantry running them again when you encounter any problems.
# 1. Install depsyarn# 2. Prepare necessary datayarn prepare-data# Tip.# The `yarn prepare-data` command contains the following three commands# If necessary, you can run any of the following commands individuallyyarn sync-doc# Sync all project documentsyarn generate-repos-info# Generate repository information for each projectyarn generate-picked-posts# Generate frontmatter information for featured blogs
If you get a 403 error
Rate Limit Exceeded
from GitHub, that means you have hit the GitHub API rate limit. the project needs yourpersonal access token to unlimit it.If you don't already have one,create one, and run below command in your terminal (no scope to your personal data is needed)
export GITHUB_TOKEN=${your token}
When you modify a document, blog, or page code, the preview in development mode is the fastest.
# Start docs partyarn 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 runyarn start:doc --locale zh# Start English Blogyarn start:blog:en# Start Chinese Blogyarn start:blog:zh# Start general docs, other pages partyarn start:website
When you want to build or preview a site that looks the same as it does online, run the following commands.
# Since the local environment is slightly different from the online one,# you must add the environment variable `preview`preview=true yarn build# oryarn build:preview# The above commands only build the site,# to preview it locally you need the following commandsyarn serve# You can also build and preview each part individually,# just like in development modepreview=true yarn build:doc&& yarn serve:docpreview=true yarn build:blog:en&& yarn serve:blog:enpreview=true yarn build:blog:zh&& yarn serve:blog:zhpreview=true yarn build:website&& yarn serve:website
Next, you can modify the documentation or code, commit it and push it to GitHub when you're done. If you're not familiar with this, you can readGitHub flow first.
If you only want to modify the*.md
files, the above guide may be sufficient.
But if you need to develop, please read the guide below.
Omitted some documents that may not be important.
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
Special thanks toDocusaurus.