astro-ghostcms/packages/astro-ghostcms-rendercontent
dependabot[bot] 9d16a7d0ba
Bump astro from 4.0.0 to 4.3.7
Bumps [astro](https://github.com/withastro/astro/tree/HEAD/packages/astro) from 4.0.0 to 4.3.7.
- [Release notes](https://github.com/withastro/astro/releases)
- [Changelog](https://github.com/withastro/astro/blob/main/packages/astro/CHANGELOG.md)
- [Commits](https://github.com/withastro/astro/commits/astro@4.3.7/packages/astro)

---
updated-dependencies:
- dependency-name: astro
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-02-14 13:32:56 +00:00
..
examples update 2024-02-13 08:54:55 -08:00
lib update 2024-02-13 08:54:55 -08:00
CHANGELOG.md update 2024-02-14 05:20:54 -08:00
LICENSE Massive Repo Cleanup and organization 2024-02-14 05:17:01 -08:00
README.md update render util readme 2024-02-13 02:41:27 -08:00
index.ts New Package for HTML Content Rendering, and it works! 2024-02-13 02:20:31 -08:00
package.json Bump astro from 4.0.0 to 4.3.7 2024-02-14 13:32:56 +00:00

README.md

Astro GhostCMS Content API HTML Processor

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