Update dependencies and components to astro remote

This commit is contained in:
Adam Matthiesen 2024-03-07 22:53:20 -08:00
parent 4e68d96bf5
commit d2fd139f30
6 changed files with 27 additions and 19 deletions

View File

@ -0,0 +1,5 @@
---
"@matthiesenxyz/astro-ghostcms-brutalbyelian": patch
---
Migrate from `astro-ghostcms-rendercontent` to `astro-remote` for internal processing of GhostCMS HTML. no user changes required.

View File

@ -42,7 +42,8 @@
},
"scripts": {},
"peerDependencies": {
"astro": "^4.2.0"
"@matthiesenxyz/astro-ghostcms": ">=3.3.1",
"astro": ">=4.4.1"
},
"devDependencies": {
"@typescript-eslint/parser": "^7.1.1",
@ -50,21 +51,18 @@
"eslint-plugin-astro": "^0.31.4",
"eslint-plugin-jsx-a11y": "^6.8.0",
"prettier-plugin-astro": "^0.13.0",
"prettier": "^3.2.5",
"@matthiesenxyz/astro-ghostcms": "workspace:*",
"@matthiesenxyz/astro-ghostcms-rendercontent": "workspace:*"
"prettier": "^3.2.5"
},
"dependencies": {
"@eliancodes/brutal-ui": "^0.2.6",
"@iconify-json/logos": "^1.1.41",
"@iconify-json/uil": "^1.1.8",
"@matthiesenxyz/astro-ghostcms": "^3.3.1",
"@matthiesenxyz/astro-ghostcms-rendercontent": "^0.0.8",
"@unocss/astro": "^0.58.5",
"@unocss/reset": "^0.58.5",
"unocss": "^0.58.5",
"@eliancodes/brutal-ui": "^0.2.6",
"astro-font": "^0.0.77",
"astro-remote": "0.3.2",
"typescript": "^5.4.2",
"ultrahtml": "^1.5.3"
"ultrahtml": "^1.5.3",
"unocss": "^0.58.5"
}
}

View File

@ -1,6 +1,7 @@
---
import { getGhostImgPath } from "../../utils";
import type { Settings } from "@matthiesenxyz/astro-ghostcms/api";
import { Markup } from 'astro-remote';
export type Props = {
image: string;
alt?: string;
@ -22,5 +23,5 @@ const { image, alt, caption = "", settings, transitionName } = Astro.props as Pr
alt={alt}
transition:name={transitionName}
/>
{caption && <figcaption class="text-ctp-overlay2"><Fragment set:html={caption}></figcaption>}
{caption && <figcaption class="text-ctp-overlay2"><Markup content={caption} /></figcaption>}
</figure>

View File

@ -4,7 +4,7 @@ import { getAllPosts, getAllPages, getSettings, invariant } from "@matthiesenxyz
import type { InferGetStaticPropsType } from "astro";
import RecentBlogPosts from "../components/generic/RecentBlogPosts.astro";
import BlogPostHeader from "../components/blog/BlogPostHeader.astro";
import { GhostRender } from "@matthiesenxyz/astro-ghostcms-rendercontent";
import { Markup } from 'astro-remote';
import * as C from "../components/ghostrender";
import { Card } from "@eliancodes/brutal-ui";
@ -30,8 +30,12 @@ invariant(settings, "Settings are required");
<div class="my-5"/>
<div id="ghost">
<GhostRender
<Markup
content={post.html}
sanitize={{
allowComponents: true,
allowElements: ['a', 'p', 'h1', 'h2', 'h3', 'h4', 'h5', 'h6', 'img', 'figure', 'figcaption', 'ul', 'ol', 'li', 'blockquote', 'pre', 'code', 'em', 'strong', 'del', 'hr', 'br', 'table', 'thead', 'tbody', 'tr', 'th', 'td', 'caption', 'div', 'span', 'script', 'astrocard'],
}}
components={{
h1: C.H1,
h2: C.H2,

View File

@ -49,7 +49,7 @@ const pageProps = getPageProps(post.title)
content={post.html}
sanitize={{
allowComponents: true,
allowElements: ['a', 'p', 'h1', 'h2', 'h3', 'h4', 'h5', 'h6', 'img', 'figure', 'figcaption', 'ul', 'ol', 'li', 'blockquote', 'pre', 'code', 'em', 'strong', 'del', 'hr', 'br', 'table', 'thead', 'tbody', 'tr', 'th', 'td', 'caption', 'div', 'span', 'script'],
allowElements: ['a', 'p', 'h1', 'h2', 'h3', 'h4', 'h5', 'h6', 'img', 'figure', 'figcaption', 'ul', 'ol', 'li', 'blockquote', 'pre', 'code', 'em', 'strong', 'del', 'hr', 'br', 'table', 'thead', 'tbody', 'tr', 'th', 'td', 'caption', 'div', 'span', 'script', 'getgist', 'getgistgroup'],
}}
components={{
pre: render.CodeSlot,

View File

@ -97,11 +97,8 @@ importers:
specifier: ^1.1.8
version: 1.1.8
'@matthiesenxyz/astro-ghostcms':
specifier: ^3.3.1
specifier: '>=3.3.1'
version: link:../astro-ghostcms
'@matthiesenxyz/astro-ghostcms-rendercontent':
specifier: ^0.0.8
version: link:../astro-ghostcms-rendercontent
'@unocss/astro':
specifier: ^0.58.5
version: 0.58.5(vite@5.1.5)
@ -109,11 +106,14 @@ importers:
specifier: ^0.58.5
version: 0.58.5
astro:
specifier: ^4.2.0
version: 4.3.7(sass@1.71.1)(typescript@5.4.2)
specifier: '>=4.4.1'
version: 4.4.13(typescript@5.4.2)
astro-font:
specifier: ^0.0.77
version: 0.0.77
astro-remote:
specifier: 0.3.2
version: 0.3.2
typescript:
specifier: ^5.4.2
version: 5.4.2