@geowiki/cms
CMS page sections and widget components for rendering dynamic content from the GeoWiki content management system.
Installation
npm install @geowiki/cms
pnpm add @geowiki/cms
Peer Dependencies
npm install react react-dom next next-auth react-hook-form react-leaflet @react-leaflet/core leaflet classnames react-toastify zod @hookform/resolvers
CSS Setup
Import the pre-built Tailwind CSS file in your app entry point:
import "@geowiki/cms/styles.css";
Usage
import { Sections, useMenuItems } from "@geowiki/cms";
function Page({ sections }) {
return <Sections sections={sections} />;
}
function Navigation() {
const menuItems = useMenuItems();
return <nav>{/* render menu */}</nav>;
}
What's Included
- Section renderer --
Sections component that dynamically renders CMS widget arrays
- Widget components -- HeaderWidget, CardGridWidget, GalleryWidget, HeroWidget, NewsLetterWidget, TestimonialListWidget, FAQWidget, VideoWidget, and 30+ more
- Recodo-specific widgets -- FarmerClusterFinderWidget, UserInfoWidget, ClusterNewsStories, ContactCardsWidget
- Hooks --
useMenuItems for CMS-driven navigation
Dependencies
This package depends on @geowiki/api-proxy, @geowiki/cms-proxy, @geowiki/core, @geowiki/recodo, and @geowiki/ui.
License
MIT