Security News
Fluent Assertions Faces Backlash After Abandoning Open Source Licensing
Fluent Assertions is facing backlash after dropping the Apache license for a commercial model, leaving users blindsided and questioning contributor rights.
express-metatag
Advanced tools
ExpressJS metatag injection middleware
Middleware that injects metatags into your document
##Installation
npm install --save express-metatag
#Usage
var Meta = require('express-metatag');
var middleware = Meta(name, ignorePrefix)({
tag: 'a'
});
app.use(middleware);
/*
You can also use with an array
middleware = Meta(name, ignorePrefix)([{
tag: 'a'
}, {
othertag: 'b'
}]);
or with a function
middleware = Meta(name, ignorePrefix)(function(req, res, next){
return {
tag: req.params.myparam
}
});
*/
##Examples
###Inject Facebook opengraph tags:
var OG = require('express-metatag')('og')
app.use(OG([{
title: 'Hello World',
description: 'Amazing module'
}]));
Result:
<head>
...
<meta property="og:title" content="Hello World">
<meta property="og:decription" content="Amazing module">
</head>
###Inject other tags:
var ML = require('express-metatag')('tags', true)
app.use(ML([{
'twitter:title': 'Hello World',
'twitter:description': 'Amazing module'
}, {
'og:title': 'Hello World',
'og:description' : 'Amazing module'
}]));
Result:
<head>
<meta property="twitter:title" content="Hello World">
<meta property="twitter:description" content="Amazing module">
<meta property="og:title" content="Hello World">
<meta property="og:description" content="Amazing module">
</head>
FAQs
ExpressJS meta tags injection middleware
We found that express-metatag demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Fluent Assertions is facing backlash after dropping the Apache license for a commercial model, leaving users blindsided and questioning contributor rights.
Research
Security News
Socket researchers uncover the risks of a malicious Python package targeting Discord developers.
Security News
The UK is proposing a bold ban on ransomware payments by public entities to disrupt cybercrime, protect critical services, and lead global cybersecurity efforts.