mirror of
https://github.com/NodeBB/NodeBB.git
synced 2025-12-16 05:20:24 +01:00
feat: add hreflang to buildLinkTag
This commit is contained in:
@@ -77,10 +77,12 @@ module.exports = function (utils, Benchpress, relative_path) {
|
||||
}
|
||||
|
||||
function buildLinkTag(tag) {
|
||||
const attributes = ['link', 'rel', 'as', 'type', 'href', 'sizes', 'title', 'crossorigin'];
|
||||
const [link, rel, as, type, href, sizes, title, crossorigin] = attributes.map(attr => (tag[attr] ? `${attr}="${tag[attr]}" ` : ''));
|
||||
const attributes = [
|
||||
'link', 'rel', 'as', 'type', 'href', 'hreflang', 'sizes', 'title', 'crossorigin'
|
||||
];
|
||||
const [link, rel, as, type, href, hreflang, sizes, title, crossorigin] = attributes.map(attr => (tag[attr] ? `${attr}="${tag[attr]}" ` : ''));
|
||||
|
||||
return '<link ' + link + rel + as + type + sizes + title + href + crossorigin + '/>\n\t';
|
||||
return '<link ' + link + rel + as + type + sizes + title + href + hreflang + crossorigin + '/>\n\t';
|
||||
}
|
||||
|
||||
function stringify(obj) {
|
||||
|
||||
Reference in New Issue
Block a user