From 35d4bb112bd342559fb9a3188f058b89f0d658a9 Mon Sep 17 00:00:00 2001 From: geekguy Date: Wed, 8 Nov 2017 01:44:53 +0530 Subject: [PATCH] update readme as per https://github.com/declandewet/vue-meta/issues/114 --- README.md | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 8a076d1..a54aa81 100644 --- a/README.md +++ b/README.md @@ -220,6 +220,17 @@ app.get('*', (req, res) => { }) ``` +If you are using a separate template file, edit your head tag with + +```html + + {{{ meta.inject().title.text() }}} + {{{ meta.inject().meta.text() }}} + +``` + +Notice the use of `{{{` to avoid double escaping. Be extremely cautious when you use `{{{` with `__dangerouslyDisableSanitizers`. + #### Streaming Rendering with `renderToStream()` A little more complex, but well worth it, is to instead stream your response. `vue-meta` supports streaming with no effort (on it's part :stuck_out_tongue_winking_eye:) thanks to Vue's clever `bundleRenderer` context injection: @@ -677,7 +688,7 @@ Easy. Instead of defining `metaInfo` as an object, define it as a function and a ```html