@exportarts/prismic-span-renderer
TypeScript icon, indicating that this package has built-in type declarations

0.7.1 • Public • Published

prismic-span-renderer

npm

This library contains methods to transform CMS content from prismic.io to HTML which can be used in websites. It also provides models for common objects which appear in the Prismic ecosystem, such as API-responses or images.

This library targets Prismic's API v2.

Get started

yarn add -E @exportarts/prismic-span-renderer

Usage

Use the interfaces found in src/models/ to interact with the Prismic-API's response object. Extend them with your custom types.

Use the methods available in src/renderer/ to transform the objects from Prismic's API response to standard html.

More information about the motivation and how to use this library can be found in the docs/-folder.

Background and Vision

This library started in several webpage-projects in which we use the prismic CMS. Since we began copying more and more between projects and bug-fixes/enhancements got more time consuming with every copy, we decided to create a library which can be easily consumed in the main projects.

The goal is to cover more and more of the Prismic workflow in one library so that the consuming main projects only have to provide their custom data models.

Please note

This package is currently using ng-packagr which made it easy to handle npm packaging for now, since we use this lib solely in Angular applications anyway.

Feel free to contribute and make it usable in more projects.

Readme

Keywords

none

Package Sidebar

Install

npm i @exportarts/prismic-span-renderer

Weekly Downloads

16

Version

0.7.1

License

MIT

Unpacked Size

89.3 kB

Total Files

42

Last publish

Collaborators

  • exportarts_christoph
  • exportarts_developer
  • exportarts_enzo