mirror of
https://github.com/tenrok/vue-meta.git
synced 2026-06-18 19:00:34 +03:00
fix: meta content templates (#429)
* examples: add content templates to ssr example * fix: improve meta content templates * chore: cleanup debug helper * refactor: split long if into variables
This commit is contained in:
+3
-2
@@ -32,11 +32,12 @@ app.use(express.static(__dirname))
|
||||
|
||||
app.use(async (req, res, next) => {
|
||||
if (!req.url.startsWith('/ssr')) {
|
||||
next()
|
||||
return next()
|
||||
}
|
||||
|
||||
try {
|
||||
const html = await renderPage()
|
||||
const context = { url: req.url }
|
||||
const html = await renderPage(context)
|
||||
res.send(html)
|
||||
} catch (e) {
|
||||
consola.error('SSR Oops:', e)
|
||||
|
||||
Reference in New Issue
Block a user