Built with React, TypeScript and our Delivery API
Leif is our demo project, built with Contensis.
Contensis provides a single place to create, maintain and deliver your content. Its content modelling, authoring, and governance features help your teams to create and keep on top of well-structured content. A flexible set of APIs make it easy to use your content in any way you like.
- Node
- Git
Your CMS environment has already been defined to use our public Leif cms, to update this please edit the .env
file.
- Develop your components inside the
/src/app/components/
folder, create a new folder for each new component - Create pages in the
/src/app/pages/
folder to set your page layouts and load your components - Define routes in your application, there are 'Static routes' and 'Content type mappings' which tell the application what pages are to be loaded and when certain routes / content type entries are loaded
- Import components using the import aliases e.g.
~/myComponent/MyComponent
avoid importing components like/src/app/myComponent/MyComponent
or../../../myComponent/MyComponent
git clone [email protected]:contensis/leif.git
cd leif
yarn
yarn start
Open http://localhost:3000 and take a look around.
This project uses yarn
yarn
- install dependencies so we can use the applicationyarn start
- start the application in development modeyarn storybook
- start storybook in development modeyarn build
- build the application into production-ready client and server-side bundlesyarn server
- start the application server same as we would as if it were deployed in productionyarn build:server
- build the application and start the server-side application from source code (allowing us to connect a debugger and stop on code that is executed server-side)
Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.