Closed g1eny0ung closed 2 years ago
❌ Deploy Preview for tidb-5-3-docs-zh failed.
🔨 Explore the source changes: 37a14771708b5cb47e22acf4846137f61de67585
🔍 Inspect the deploy log: https://app.netlify.com/sites/tidb-5-3-docs-zh/deploys/618fad62d83dbf00089f6084
✔️ Deploy Preview for quirky-swirles-2928a8 ready!
🔨 Explore the source changes: 1a410c416482bade51a30cc54933b748aa4efaa1
🔍 Inspect the deploy log: https://app.netlify.com/sites/quirky-swirles-2928a8/deploys/61888786bb060c0008a04c3d
😎 Browse the preview: https://deploy-preview-179--quirky-swirles-2928a8.netlify.app
I will now merge this PR.
This PR mainly refactors the whole website by extracting markdown processing-related logic into
packages
and upgrading Gatsby tov4
.Also, many major logical changes were made during the upgrade. In general, they can be grouped into the following sections:
Packages Related
packages/download
.packages/content
.docs.json
to handle all docs' info. This allows us to unify all behavior related to version processing and so on.Gatsby Related
Layout
components to all pages and templates automatically.[x] Use gatsby-plugin-react-intl to replace the manually wrapped
react-intl
.However, there is a special situation here for our site that needs to be handled. Since most of our pages are created manually, we need to add this plugin-related param in the context. Below is the real code:
en
andzh
pages into onegatsby-source-filesystem
. There is no need to split them.gatsby-transformer-remark
. Since we use MDX to parse the markdown docs. Its no need to introduce an additional parser.Components Related
@seagreenio/react-bulma
to enhance the componentization.Dev Related
gatsby-plugin-root-import
to simplify all imports.@ti-fe/cli
and@ti-fe/prettier-config
to provide uniform behavior.CI Related
consolidate-duplicate-urls.sh
, writecanonical
url to the doc template directly.