From 53d6f820aa24a1b738147ef8d0e3e6e01d66e010 Mon Sep 17 00:00:00 2001 From: Ricardo Gobbo de Souza Date: Wed, 12 Dec 2018 09:58:16 -0200 Subject: [PATCH] Update README.md --- README.md | 27 +++++++++++++++++++++++---- 1 file changed, 23 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index 66b607f..4d64b52 100644 --- a/README.md +++ b/README.md @@ -59,6 +59,7 @@ - [`title` (String)](#title-string) - [`titleTemplate` (String | Function)](#titletemplate-string--function) - [`htmlAttrs` (Object)](#htmlattrs-object) + - [`headAttrs` (Object)](#headattrs-object) - [`bodyAttrs` (Object)](#bodyattrs-object) - [`base` (Object)](#base-object) - [`meta` ([Object])](#meta-object) @@ -190,12 +191,12 @@ app.get('*', (req, res) => { if (error) return res.send(error.stack) const bodyOpt = { body: true } const { - title, htmlAttrs, bodyAttrs, link, style, script, noscript, meta + title, htmlAttrs, headAttrs, bodyAttrs, link, style, script, noscript, meta } = context.meta.inject() return res.send(` - + ${meta.text()} ${title.text()} ${link.text()} @@ -238,12 +239,12 @@ app.get('*', (req, res) => { renderStream.once('data', () => { const bodyOpt = { body: true } const { - title, htmlAttrs, bodyAttrs, link, style, script, noscript, meta + title, htmlAttrs, headAttrs, bodyAttrs, link, style, script, noscript, meta } = context.meta.inject() res.write(` - + ${meta.text()} ${title.text()} ${link.text()} @@ -397,6 +398,24 @@ Each **key:value** maps to the equivalent **attribute:value** of the `` el ``` +#### `headAttrs` (Object) + +Each **key:value** maps to the equivalent **attribute:value** of the `` element. + +```js +{ + metaInfo: { + headAttrs: { + foo: 'bar' + } + } +} +``` + +```html + +``` + #### `bodyAttrs` (Object) Each **key:value** maps to the equivalent **attribute:value** of the `` element.