You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The use of the Prose component to render HTML generated from markdown makes creating an integration for CMS content messy. For example, Prismic uses the formatted text field which is rendered through a react component so I had to edit the Prose component to check the type. This problem duplicates itself in the PDF rendering as well, requiring a similar PdfProse. Perhaps it would have been helpful to make the function that converts the property to content be configurable. For links, you can't store icons in a CMS, so it would have been better to use a iconName as is stated falsely in the readme but instead, the fa* icons are on the icon property. I regret this project is not more backward-compatible but there are some great improvements so I feel it's worth the effort.
The text was updated successfully, but these errors were encountered:
I realized that it would be more sensible to just convert Prismic RichText to html strings in the CMS integration using ReactDOMServer.renderToStaticMarkup but unfortunately next.js won't let you do that in a server component. Since the PDF renderer also depends on rendering HTML strings, the integration of Prismic seems to be impossible.
The other issue I encountered with using Prismic is that the PrismicRichText seems to require the use of a context which is unavailable in server components so I had to downgrade to the old prismic packages used in a previous iteration of this project.
I would suggest the readme discourage the use of third-party CMSes for this reason.
The use of the
Prose
component to render HTML generated from markdown makes creating an integration for CMS content messy. For example, Prismic uses the formatted text field which is rendered through a react component so I had to edit theProse
component to check the type. This problem duplicates itself in the PDF rendering as well, requiring a similarPdfProse
. Perhaps it would have been helpful to make the function that converts the property to content be configurable. For links, you can't store icons in a CMS, so it would have been better to use aiconName
as is stated falsely in the readme but instead, thefa*
icons are on theicon
property. I regret this project is not more backward-compatible but there are some great improvements so I feel it's worth the effort.The text was updated successfully, but these errors were encountered: