mirror of
https://github.com/facebook/docusaurus.git
synced 2025-08-02 00:09:48 +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()} 🚧`,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue