Security News
Research
Data Theft Repackaged: A Case Study in Malicious Wrapper Packages on npm
The Socket Research Team breaks down a malicious wrapper package that uses obfuscation to harvest credentials and exfiltrate sensitive data.
gatsby-plugin-react-helmet
Advanced tools
Stub description for gatsby-plugin-react-helmet
The gatsby-plugin-react-helmet package is a Gatsby plugin that integrates React Helmet into your Gatsby site. React Helmet is a library that allows you to manage changes to the document head, such as the title, meta tags, and other elements, from within your React components.
Setting the Page Title
This feature allows you to set the title of the page dynamically from within a React component. The title tag is updated in the document head when the component is rendered.
import React from 'react';
import { Helmet } from 'react-helmet';
const MyComponent = () => (
<div>
<Helmet>
<title>My Page Title</title>
</Helmet>
<h1>Hello, world!</h1>
</div>
);
export default MyComponent;
Adding Meta Tags
This feature allows you to add meta tags to the document head. You can specify various meta tags such as charset, description, keywords, etc., directly within your React components.
import React from 'react';
import { Helmet } from 'react-helmet';
const MyComponent = () => (
<div>
<Helmet>
<meta charSet="utf-8" />
<meta name="description" content="This is a description of my page" />
</Helmet>
<h1>Hello, world!</h1>
</div>
);
export default MyComponent;
Link Tags
This feature allows you to add link tags to the document head. This is useful for things like setting the canonical URL of the page, adding stylesheets, or preloading resources.
import React from 'react';
import { Helmet } from 'react-helmet';
const MyComponent = () => (
<div>
<Helmet>
<link rel="canonical" href="https://www.example.com/my-page" />
</Helmet>
<h1>Hello, world!</h1>
</div>
);
export default MyComponent;
React Helmet is the core library that gatsby-plugin-react-helmet integrates with. It provides the same functionality for managing changes to the document head in any React application, not just Gatsby.
React Meta Tags is another library for managing the document head in React applications. It offers similar functionality to React Helmet but with a different API and some additional features like support for nested tags.
Stub README
FAQs
Manage document head data with react-helmet. Provides drop-in server rendering support for Gatsby.
The npm package gatsby-plugin-react-helmet receives a total of 102,363 weekly downloads. As such, gatsby-plugin-react-helmet popularity was classified as popular.
We found that gatsby-plugin-react-helmet 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.
Security News
Research
The Socket Research Team breaks down a malicious wrapper package that uses obfuscation to harvest credentials and exfiltrate sensitive data.
Research
Security News
Attackers used a malicious npm package typosquatting a popular ESLint plugin to steal sensitive data, execute commands, and exploit developer systems.
Security News
The Ultralytics' PyPI Package was compromised four times in one weekend through GitHub Actions cache poisoning and failure to rotate previously compromised API tokens.