
Product
Announcing Precomputed Reachability Analysis in Socket
Socket’s precomputed reachability slashes false positives by flagging up to 80% of vulnerabilities as irrelevant, with no setup and instant results.
gatsby-plugin-canonical-urls
Advanced tools
Add canonical links to HTML pages Gatsby generates.
This implementation is primarily helpful for distinguishing between https/http, www/no-www but could possibly be extended to help with when sites add multiple paths to the same page.
npm install gatsby-plugin-canonical-urls
// In your gatsby-config.js
plugins: [
{
resolve: `gatsby-plugin-canonical-urls`,
options: {
siteUrl: `https://www.example.com`,
},
},
]
With the above configuration, the plugin will add to the head of every HTML page
a rel=canonical
e.g.
<link rel="canonical" href="https://www.example.com/about-us/" />
URL search parameters are included in the canonical URL by default. If you worry about duplicate content because for example /blog
and /blog?tag=foobar
will be indexed separately, you should set the option stripQueryString
to true
. The latter will then be changed to /blog
.
module.exports = {
plugins: [
{
resolve: `gatsby-plugin-canonical-urls`,
options: {
siteUrl: `https://www.example.com`,
stripQueryString: true,
},
},
],
}
FAQs
Add canonical links to HTML pages Gatsby generates.
The npm package gatsby-plugin-canonical-urls receives a total of 15,879 weekly downloads. As such, gatsby-plugin-canonical-urls popularity was classified as popular.
We found that gatsby-plugin-canonical-urls demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 7 open source maintainers 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.
Product
Socket’s precomputed reachability slashes false positives by flagging up to 80% of vulnerabilities as irrelevant, with no setup and instant results.
Product
Socket is launching experimental protection for Chrome extensions, scanning for malware and risky permissions to prevent silent supply chain attacks.
Product
Add secure dependency scanning to Claude Desktop with Socket MCP, a one-click extension that keeps your coding conversations safe from malicious packages.