@geowiki/cms
v0.16.0-dev.5
Published
CMS page sections and widget components for rendering dynamic content from the GeoWiki content management system.
Readme
@geowiki/cms
CMS page sections and widget components for rendering dynamic content from the GeoWiki content management system.
Installation
npm install @geowiki/cms
# or
pnpm add @geowiki/cmsPeer Dependencies
npm install react react-dom next next-auth react-hook-form react-leaflet @react-leaflet/core leaflet classnames react-toastify zod @hookform/resolversCSS 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 --
Sectionscomponent 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 --
useMenuItemsfor CMS-driven navigation
Dependencies
This package depends on @geowiki/api-proxy, @geowiki/cms-proxy, @geowiki/core, @geowiki/recodo, and @geowiki/ui.
License
MIT
