Skip to content

Commit

Permalink
refactor: split doc and website (apache#1225)
Browse files Browse the repository at this point in the history
  • Loading branch information
SkyeYoung authored Jul 21, 2022
1 parent 3b1c02e commit 470f49c
Show file tree
Hide file tree
Showing 55 changed files with 12,031 additions and 2,455 deletions.
12 changes: 6 additions & 6 deletions .eslintignore
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
/**/*/src/static/js/**/*.js
/website/src/assets
/website/src/fonts
/website/src/shaders
/**/*/src/assets
/**/*/src/fonts
/**/*/src/shaders
/**/*/.docusaurus
/website/articles
/blog/**/blog
/**/*/build
/website/docs
/website/docs-apisix*
/website/i18n
/**/*/docs
/**/*/docs-apisix*
/**/*/i18n
yarn.lock
13 changes: 8 additions & 5 deletions .eslintrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,10 @@ module.exports = {
'no-lonely-if': OFF,
'no-lone-blocks': OFF,
'react/jsx-filename-extension': [ERROR, { extensions: ['.jsx', '.tsx'] }],
'import/extensions': [ERROR, { tsx: 'never', svg: 'always' }],
'import/extensions': [
ERROR,
{ tsx: 'never', svg: 'always', json: 'never' },
],
'react/jsx-props-no-spreading': OFF,
'react/function-component-definition': [
ERROR,
Expand All @@ -97,10 +100,10 @@ module.exports = {
files: [
'scripts/**/*.js',
'website/src/clientModules/**/*.js',
'website/config/**/*.js',
'website/babel.config.js',
'website/**/docusaurus.config.*',
'blog/**/docusaurus.config.*',
'config/**/*.js',
'**/*/babel.config.js',
'**/*/docusaurus.config.*',
'website/docusaurus.config.js',
],
env: {
node: true,
Expand Down
5 changes: 4 additions & 1 deletion .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ jobs:

- uses: actions/setup-node@v3
with:
node-version: "14"
node-version: "16"

- name: Get node version
id: node-version
Expand Down Expand Up @@ -87,6 +87,9 @@ jobs:
./website/.docusaurus
./website/build
./website/node_modules
./doc/.docusaurus
./doc/build
./doc/node_modules
./blog/node_modules
./blog/en/.docusaurus
./blog/en/build
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/link-check.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ jobs:
- uses: actions/[email protected]
- uses: actions/setup-node@v3
with:
node-version: "14"
node-version: "16"

- name: Install Dependencies
run: |
Expand Down
28 changes: 5 additions & 23 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -40,28 +40,10 @@ scripts/yarn.lock
/.eslintcache
/.stylelintcache

website/docs/*
!website/docs/general
website/docs-apisix_versioned_docs/*
website/docs-apisix_versioned_sidebars/*
website/docs-apisix-dashboard_versioned_docs/*
website/docs-apisix-dashboard_versioned_sidebars/*
website/docs-apisix-docker_versioned_docs/*
website/docs-apisix-docker_versioned_sidebars/*
website/docs-apisix-go-plugin-runner_versioned_docs/*
website/docs-apisix-go-plugin-runner_versioned_sidebars/*
website/docs-apisix-java-plugin-runner_versioned_docs/*
website/docs-apisix-java-plugin-runner_versioned_sidebars/*
website/docs-apisix-python-plugin-runner_versioned_docs/*
website/docs-apisix-python-plugin-runner_versioned_sidebars/*
/doc/docs/*
/doc/docs-apisix*/**
/doc/docs-apisix*.json

website/docs-apisix_versions.json
website/docs-apisix-dashboard_versions.json
website/docs-apisix-docker_versions.json
website/docs-apisix-go-plugin-runner_versions.json
website/docs-apisix-java-plugin-runner_versions.json
website/docs-apisix-python-plugin-runner_versions.json

website/i18n/zh/docusaurus-plugin-content-docs-docs-apisix/**
/doc/i18n/zh/docusaurus-plugin-content-docs-docs-*/**
scripts/temp/**
website/config/repos-info.json
/config/repos-info.json
4 changes: 2 additions & 2 deletions blog/en/docusaurus.config.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
const { ssrTemplate } = require('../../website/config/ssrTemplate');
const { ssrTemplate } = require('../../config/ssrTemplate');

module.exports = {
title: 'Apache APISIX® -- Cloud-Native API Gateway',
Expand Down Expand Up @@ -52,7 +52,7 @@ module.exports = {
logo: {
src: 'img/logo2.svg',
},
items: require('../../website/config/navbar.js'),
items: require('../../config/navbar.js'),
},
hideableSidebar: true,
announcementBar: {
Expand Down
7 changes: 6 additions & 1 deletion blog/src/theme/BlogPostPage/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -18,10 +18,15 @@ import type { ImageProps } from 'rc-image';
import Image from 'rc-image';
// eslint-disable-next-line import/no-extraneous-dependencies
import { MDXProvider } from '@mdx-js/react';
import { LazyLoadComponent } from 'react-lazy-load-image-component';

const components = {
...MDXComponents,
img: (props: ImageProps) => <Image {...props} preview={{ mask: 'Click to Preview' }} />,
img: (props: ImageProps) => (
<LazyLoadComponent>
<Image {...props} preview={{ mask: 'Click to Preview' }} />
</LazyLoadComponent>
),
};

const BlogPostPage = (props: Props): JSX.Element => {
Expand Down
5 changes: 0 additions & 5 deletions blog/static/robots.txt

This file was deleted.

4 changes: 2 additions & 2 deletions blog/zh/docusaurus.config.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
const { ssrTemplate } = require('../../website/config/ssrTemplate');
const { ssrTemplate } = require('../../config/ssrTemplate');

module.exports = {
title: 'Apache APISIX® -- Cloud-Native API Gateway',
Expand Down Expand Up @@ -52,7 +52,7 @@ module.exports = {
logo: {
src: 'img/logo2.svg',
},
items: require('../../website/config/navbar.js'),
items: require('../../config/navbar.js'),
},
hideableSidebar: true,
announcementBar: {
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Loading

0 comments on commit 470f49c

Please sign in to comment.