Gridsome source plugin to add build information to the global metadata schema.
yarn add @flexicon/gridsome-source-build-meta
npm install @flexicon/gridsome-source-build-meta
module.exports = {
plugins: [
{
use: '@flexicon/gridsome-source-build-meta',
options: {
formatLocale: 'en-US',
},
},
],
}
- Type:
string
optional
What locale to use with Intl.DateTimeFormat
Default: en-GB
- Type
object
optional
DateTime formatting options
Default:
const formatOptions = {
year: 'numeric',
month: 'numeric',
day: 'numeric',
hour: 'numeric',
minute: 'numeric',
second: 'numeric',
}
buildInfo
buildTime
-string
- Date time string formatted based on the options and generated at build timebuildTimestamp
-number
- UNIX timestamp at which the current build was triggered
<static-query>
metadata {
buildInfo {
buildTime
buildTimestamp
}
}
</static query>