This package has been deprecated

Author message:

Package no longer supported. Contact Support at https://www.npmjs.com/support for more info.

@matthiesenxyz/astro-ghostcms-rendercontent
TypeScript icon, indicating that this package has built-in type declarations

0.0.9 • Public • Published

Astro GhostCMS Content API HTML Processor

NOTE: This package is no longer in use - Please switch to astro-remote

Render remote GhostCMS HTML in Astro with full control over the output.

Powered by ultrahtml.

Rendering Remote Content

The most basic function of astro-ghostcms-rendercontent is to convert a string of HTML to Astro friendly HTML. Use the GhostRender component.

---
import { GhostRender } from "@matthiesenxyz/astro-ghostcms-rendercontent";
---

<GhostRender content={post.html} />

Customization

GhostRender allows full control over the rendering of output. The components option allows you to replace a standard HTML element with a custom component.

---
import { GhostRender } from "@matthiesenxyz/astro-ghostcms-rendercontent";
import Title from '../components/Title.astro';
---

<!-- Render <h1> as custom <Title> component -->
<GhostRender content={post.html} components={{ h1: Title }} />

For examples on how to setup custom components check examples

Readme

Keywords

Package Sidebar

Install

npm i @matthiesenxyz/astro-ghostcms-rendercontent

Weekly Downloads

10

Version

0.0.9

License

MIT

Unpacked Size

7.77 kB

Total Files

17

Last publish

Collaborators

  • adammatthiesen