بوابة واجهة برمجة تطبيقات الخدمات الصغيرة السحابية

إذا كنت ترغب في كتابة مدونة أو إصلاح بعض المشكلات المتعلقة بالمدونة ، فيرجى قراءة دليل مساهمة مدونة 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 Code و Docker و Remote - Containers ، فيمكنك استخدام هذا للبدء بسرعة.
لا ، لكن هل تريد تجربة بهذه الطريقة؟ يرجى قراءة التطوير داخل تثبيت حاوية#.
بعد ذلك ، ابدأ مقابل رمز ، قم بتشغيل 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إذا حصلت على
Rate Limit Exceededمن GitHub ، فهذا يعني أنك قد حصلت على حد 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شكر خاص للوثائق.
ترخيص Apache 2.0