mirror of
https://github.com/facebook/docusaurus.git
synced 2025-08-03 16:59:06 +02:00
fix(live-codeblock): render static codeblock server-side (#5754)
Co-authored-by: slorber <lorber.sebastien@gmail.com>
This commit is contained in:
parent
9ad6de2b85
commit
1c8b8362f7
5 changed files with 49 additions and 13 deletions
|
@ -38,6 +38,9 @@ const isDev = process.env.NODE_ENV === 'development';
|
|||
const isDeployPreview =
|
||||
process.env.NETLIFY && process.env.CONTEXT === 'deploy-preview';
|
||||
|
||||
// Used to debug production build issues faster
|
||||
const isBuildFast = !!process.env.BUILD_FAST;
|
||||
|
||||
const baseUrl = process.env.BASE_URL || '/';
|
||||
|
||||
// Special deployment for staging locales until they get enough translations
|
||||
|
@ -252,10 +255,11 @@ const config = {
|
|||
rehypePlugins: [katex],
|
||||
disableVersioning: isVersioningDisabled,
|
||||
lastVersion: isDev ? 'current' : undefined,
|
||||
onlyIncludeVersions:
|
||||
!isVersioningDisabled && (isDev || isDeployPreview)
|
||||
? ['current', ...versions.slice(0, 2)]
|
||||
: undefined,
|
||||
onlyIncludeVersions: isBuildFast
|
||||
? ['current']
|
||||
: !isVersioningDisabled && (isDev || isDeployPreview)
|
||||
? ['current', ...versions.slice(0, 2)]
|
||||
: undefined,
|
||||
versions: {
|
||||
current: {
|
||||
label: `${getNextBetaVersionName()} 🚧`,
|
||||
|
|
|
@ -16,6 +16,7 @@
|
|||
"build:baseUrl": "cross-env BASE_URL='/build/' yarn build",
|
||||
"start:blogOnly": "cross-env yarn start --config=docusaurus.config-blog-only.js",
|
||||
"build:blogOnly": "cross-env yarn build --config=docusaurus.config-blog-only.js",
|
||||
"build:fast": "cross-env BUILD_FAST=true yarn build --locale en",
|
||||
"netlify:build:production": "yarn docusaurus write-translations && yarn netlify:crowdin:delay && yarn netlify:crowdin:uploadSources && yarn netlify:crowdin:downloadTranslations && yarn build",
|
||||
"netlify:build:deployPreview": "yarn docusaurus write-translations --locale fr --messagePrefix '(fr) ' && yarn build",
|
||||
"netlify:crowdin:delay": "node delayCrowdin.js",
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue