Skip to content

Commit

Permalink
feat(v2): add version to page's generated meta tags (#2438)
Browse files Browse the repository at this point in the history
  • Loading branch information
lex111 committed Mar 22, 2020
1 parent b3d1481 commit 93da7fe
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
2 changes: 2 additions & 0 deletions packages/docusaurus/src/client/serverEntry.js
Original file line number Diff line number Diff line change
Expand Up @@ -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';
Expand Down Expand Up @@ -71,6 +72,7 @@ export default async function render(locals) {
metaAttributes,
scripts,
stylesheets,
version: packageJson.version,
},
{
rmWhitespace: true,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ module.exports = `
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width">
<meta name="generator" content="Docusaurus">
<meta name="generator" content="Docusaurus v<%= version %>">
<%- headTags %>
<% metaAttributes.forEach((metaAttribute) => { %>
<%- metaAttribute %>
Expand Down

0 comments on commit 93da7fe

Please sign in to comment.