docs: add advanced guides (#6296)

* docs: add advanced guides

* complete

* fix link

* Create architecture

* use png

* explanations

* more text

* process.env.NODE_ENV

* typo

* Add image zoom

* nit

* nit

* reorganize

* fix links

* fix links

* reorganize

* elaborate on presets

* fix

* routing docs

* ssr section

* more content

* complete SSR guide

* pathname://

* improvements

* document executionenvironment

* reformat

* final tweaks!

* avoid slug

* oops
This commit is contained in:
Joshua Chen 2022-01-25 11:29:18 +08:00 committed by GitHub
parent e3be77081c
commit 59022c5eea
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
30 changed files with 1341 additions and 535 deletions

View file

@ -0,0 +1,17 @@
# Routing
This page is only accessible through version-switching. It shows how a versioned doc file becomes a webpage.
```mdx-code-block
import {useLatestVersion, useActiveDocContext} from '@docusaurus/plugin-content-docs/client';
import {useLocation} from '@docusaurus/router';
export const URLPath = () => <code>{useLocation().pathname}</code>;
export const FilePath = () => {
const currentVersion = useActiveDocContext('default').activeVersion.name;
return <code>{currentVersion === 'current' ? './docs/' : `./versioned_docs/version-${currentVersion}/`}advanced/routing.md</code>;
}
```
This page, <URLPath />, is generated from the file at <FilePath />. The component used is `@theme/DocItem`.