Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: add generator meta tag for gatsby version #8221

Merged
merged 10 commits into from
Sep 17, 2018
5 changes: 4 additions & 1 deletion packages/gatsby/cache-dir/static-entry.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ const { get, merge, isObject, flatten, uniqBy } = require(`lodash`)
const apiRunner = require(`./api-runner-ssr`)
const syncRequires = require(`./sync-requires`)
const { dataPaths, pages } = require(`./data.json`)
const { version: gatsbyVersion } = require(`gatsby/package.json`)

// Speed up looking up pages.
const pagesObjectMap = new Map()
Expand Down Expand Up @@ -50,7 +51,9 @@ const createElement = React.createElement

export default (pagePath, callback) => {
let bodyHtml = ``
let headComponents = []
let headComponents = [
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think this is OK?

This ends up putting it after some things like style elements and stuff in the head tags, which is probably fine.

i.e.

<style>
/* snipped */
</style>
<meta name="generator" content="Gatsby 2.0.0-rc.26"/>
<title data-react-helmet="true">Reproduction of #7590</title>
<meta data-react-helmet="true" name="description" content="Sample"/>
<meta data-react-helmet="true" name="keywords" content="sample, something"/>
<style type="text/css"></style>

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yeah, the order doesn't matter

<meta name="generator" content={`Gatsby ${gatsbyVersion}`} />
]
let htmlAttributes = {}
let bodyAttributes = {}
let preBodyComponents = []
Expand Down