diff --git a/packages/docusaurus/src/client/serverEntry.js b/packages/docusaurus/src/client/serverEntry.js index 7e7ff8782d5e..268992830ecc 100644 --- a/packages/docusaurus/src/client/serverEntry.js +++ b/packages/docusaurus/src/client/serverEntry.js @@ -17,6 +17,7 @@ import {minify} from 'html-minifier-terser'; import path from 'path'; import fs from 'fs-extra'; import routes from '@generated/routes'; +import packageJson from '../../package.json'; import preload from './preload'; import App from './App'; import ssrTemplate from './templates/ssr.html.template'; @@ -71,6 +72,7 @@ export default async function render(locals) { metaAttributes, scripts, stylesheets, + version: packageJson.version, }, { rmWhitespace: true, diff --git a/packages/docusaurus/src/client/templates/ssr.html.template.js b/packages/docusaurus/src/client/templates/ssr.html.template.js index f7e70829b63d..f3c9db7a13b7 100644 --- a/packages/docusaurus/src/client/templates/ssr.html.template.js +++ b/packages/docusaurus/src/client/templates/ssr.html.template.js @@ -11,7 +11,7 @@ module.exports = ` - + <%- headTags %> <% metaAttributes.forEach((metaAttribute) => { %> <%- metaAttribute %>