mirror of
https://github.com/NodeBB/NodeBB.git
synced 2025-10-30 18:46:01 +01:00
feat: use auto-generated meta and link tags in ACP, closes #9991
This commit is contained in:
@@ -40,6 +40,7 @@ middleware.renderHeader = async (req, res, data) => {
|
||||
configs: meta.configs.list(),
|
||||
latestVersion: getLatestVersion(),
|
||||
privileges: privileges.admin.get(req.uid),
|
||||
tags: meta.tags.parse(req, {}, [], []),
|
||||
});
|
||||
|
||||
const { userData } = results;
|
||||
@@ -61,6 +62,8 @@ middleware.renderHeader = async (req, res, data) => {
|
||||
configJSON: jsesc(JSON.stringify(res.locals.config), { isScriptContext: true }),
|
||||
relative_path: res.locals.config.relative_path,
|
||||
adminConfigJSON: encodeURIComponent(JSON.stringify(results.configs)),
|
||||
metaTags: results.tags.meta,
|
||||
linkTags: results.tags.link,
|
||||
user: userData,
|
||||
userJSON: jsesc(JSON.stringify(userData), { isScriptContext: true }),
|
||||
plugins: results.custom_header.plugins,
|
||||
|
||||
@@ -2,8 +2,9 @@
|
||||
<html>
|
||||
<head>
|
||||
<title>{title}</title>
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
|
||||
{{{each metaTags}}}{function.buildMetaTag}{{{end}}}
|
||||
{{{each linkTags}}}{function.buildLinkTag}{{{end}}}
|
||||
<link rel="stylesheet" type="text/css" href="{relative_path}/assets/admin.css?{cache-buster}" />
|
||||
<link rel="stylesheet" href="https://fonts.googleapis.com/icon?family=Material+Icons">
|
||||
|
||||
|
||||
Reference in New Issue
Block a user