mirror of
https://github.com/facebook/docusaurus.git
synced 2025-04-29 10:17:55 +02:00
feat(v2): add version to page's generated meta tags (#2438)
This commit is contained in:
parent
b3d14816bb
commit
93da7fe576
2 changed files with 3 additions and 1 deletions
|
@ -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,
|
||||
|
|
|
@ -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 %>
|
||||
|
|
Loading…
Add table
Reference in a new issue