Socket
Socket
Sign inDemoInstall

@dotcms/nextjs

Package Overview
Dependencies
0
Maintainers
1
Versions
9
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    @dotcms/nextjs

Official NextJS library to render a dotCMS page.


Version published
Maintainers
1
Created

Readme

Source

@dotcms/nextjs

@dotcms/nextjs is the official Next.js library designed to work seamlessly with DotCMS and React, providing a set of components and utilities optimized for Next.js applications.

Installation

Install the package via npm:

npm install @dotcms/nextjs

Or using Yarn:

yarn add @dotcms/nextjs

Components

DotcmsLayout

A functional component that renders a layout for a DotCMS page using Next.js navigation and the @dotcms/react package. This component should be used as a client component because it utilizes hooks from @dotcms/react.

Props
  • props: DotcmsPageProps - The properties for the DotCMS page.
Usage

This component needs to be used as a client component due to its reliance on Next.js and @dotcms/react hooks.

'use client';

import { DotcmsLayout } from '@dotcms/nextjs';
import { Header, Footer, Navigation } from '../components';

export function MyPage({ data, nav }) {
    return (
        <div className="flex flex-col min-h-screen gap-6">
            {data.layout.header && (
                <Header>
                    <Navigation items={nav} />
                </Header>
            )}
            <main className="container flex flex-col gap-8 m-auto">
                <DotcmsLayout
                    entity={{
                        components: {
                            webPageContent: WebPageContent,
                            Banner: Banner,
                            Activity: Activity,
                            Product: Product,
                            Image: ImageComponent
                        },
                        ...data
                    }}
                />
            </main>
            {data.layout.footer && <Footer />}
        </div>
    );
}

Contributing

GitHub pull requests are the preferred method to contribute code to dotCMS. Before any pull requests can be accepted, an automated tool will ask you to agree to the dotCMS Contributor's Agreement.

Licensing

dotCMS comes in multiple editions and as such is dual licensed. The dotCMS Community Edition is licensed under the GPL 3.0 and is freely available for download, customization and deployment for use within organizations of all stripes. dotCMS Enterprise Editions (EE) adds a number of enterprise features and is available via a supported, indemnified commercial license from dotCMS. For the differences between the editions, see the feature page.

Support

If you need help or have any questions, please open an issue in the GitHub repository.

Documentation

Always refer to the official DotCMS documentation for comprehensive guides and API references.

Getting Help

SourceLocation
InstallationInstallation
DocumentationDocumentation
VideosHelpful Videos
Code ExamplesCodeshare
Forums/Listservvia Google Groups
Twitter@dotCMS
Main SitedotCMS.com

Keywords

FAQs

Last updated on 04 Mar 2024

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.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc