Skip to content
This repository has been archived by the owner on Mar 11, 2019. It is now read-only.

exportarts/prismic-span-renderer

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

42 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

THIS PACKAGE IS DEPRECATED

This package has been deprecated in favor of ngx-prismic.

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.

About

Transform prismic.io styling to HTML. Made for Angular (Universal) apps.

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published