
Security News
Package Maintainers Call for Improvements to GitHub’s New npm Security Plan
Maintainers back GitHub’s npm security overhaul but raise concerns about CI/CD workflows, enterprise support, and token management.
@stnew/prismic-nextjs
Advanced tools
@stnew/prismic-nextjs
has peerDepenendencies of react
, react-dom
, and next
. This package assumes you have a basic Next.js app running and have integrated the Prismic client.
This package exports:
PrismicLink
- A wrapper for next/link
that handles link resolution.urlResolver
from @stnew/prismic (npm)PrismicContext, PrismicProvider, SliceZone, usePrismic, useHtmlSerializer, serializeElements
from @stnew/prismic-react (npm)The PrismicLink
component will take a Prismic link fragment and generate an anchor tag. It's using linkResolver
and hrefResolver
under the hood, so if you links are not working make sure that you have those set up correctly.
import { PrismicLink } from '@stnew/prismic-nextjs'
function NavItem({ link, label }) {
return (
<li>
<PrismicLink link={link}>{label}</PrismicLink>
</li>
)
}
Prop | Required | Type | Description |
---|---|---|---|
link | Yes | PrismicDoc fragment | Resolves urls for Prismic "Link" fields |
as | No | React Component or string | Renders the a tag as another React component, useful for libraries like styled-components |
urlObject | No | UrlObject | Transforms URL object and appends it to the URL, useful for things like query strings. This won't work on external links. |
If you're using a css-in-js library like styled-components
, you might be wondering how you can style a PrismicLink
.
There are a few ways which we've outlined in this doc, for brevity.
FAQs
Prismic components and utilities for Next.js
We found that @stnew/prismic-nextjs demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 4 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
Maintainers back GitHub’s npm security overhaul but raise concerns about CI/CD workflows, enterprise support, and token management.
Product
Socket Firewall is a free tool that blocks malicious packages at install time, giving developers proactive protection against rising supply chain attacks.
Research
Socket uncovers malicious Rust crates impersonating fast_log to steal Solana and Ethereum wallet keys from source code.