Renamed inlineComponents to richTextComponents as this is closer to what they are #16
@@ -6,7 +6,7 @@ import type { Template } from "tinacms";
|
|||||||
import { PageBlocksContent } from "../../tina/__generated__/types";
|
import { PageBlocksContent } from "../../tina/__generated__/types";
|
||||||
import { tinaField } from "tinacms/dist/react";
|
import { tinaField } from "tinacms/dist/react";
|
||||||
import { PageBlockFunction } from "../blocks-renderer";
|
import { PageBlockFunction } from "../blocks-renderer";
|
||||||
import inlineComponents, { richTextTemplates } from "../inline/inline-definitions";
|
import richTextComponents, { richTextTemplates } from "../rich-text/rich-text-definitions";
|
||||||
|
|
||||||
export const Content: PageBlockFunction<PageBlocksContent> = ({ data }) => {
|
export const Content: PageBlockFunction<PageBlocksContent> = ({ data }) => {
|
||||||
return (
|
return (
|
||||||
@@ -17,7 +17,7 @@ export const Content: PageBlockFunction<PageBlocksContent> = ({ data }) => {
|
|||||||
size="custom"
|
size="custom"
|
||||||
width="large"
|
width="large"
|
||||||
>
|
>
|
||||||
<TinaMarkdown components={ inlineComponents } content={ data.body } />
|
<TinaMarkdown components={ richTextComponents } content={ data.body } />
|
||||||
</Container>
|
</Container>
|
||||||
</Section>
|
</Section>
|
||||||
);
|
);
|
||||||
|
|||||||
@@ -18,7 +18,7 @@ import format from "date-fns/format";
|
|||||||
import { TinaMarkdown } from "tinacms/dist/rich-text";
|
import { TinaMarkdown } from "tinacms/dist/rich-text";
|
||||||
import { PostType } from "../../pages/posts/[filename]";
|
import { PostType } from "../../pages/posts/[filename]";
|
||||||
import { tinaField } from "tinacms/dist/react";
|
import { tinaField } from "tinacms/dist/react";
|
||||||
import inlineComponents from "../inline/inline-definitions";
|
import richTextComponents from "../rich-text/rich-text-definitions";
|
||||||
|
|
||||||
export const Post = (props: PostType) => {
|
export const Post = (props: PostType) => {
|
||||||
const date = new Date(props.date);
|
const date = new Date(props.date);
|
||||||
@@ -97,7 +97,7 @@ export const Post = (props: PostType) => {
|
|||||||
data-tina-field={ tinaField(props, "_body") }
|
data-tina-field={ tinaField(props, "_body") }
|
||||||
className="prose dark:prose-dark w-full max-w-none"
|
className="prose dark:prose-dark w-full max-w-none"
|
||||||
>
|
>
|
||||||
<TinaMarkdown components={ inlineComponents } content={ props._body } />
|
<TinaMarkdown components={ richTextComponents } content={ props._body } />
|
||||||
</div>
|
</div>
|
||||||
</Container>
|
</Container>
|
||||||
</Section>
|
</Section>
|
||||||
|
|||||||
@@ -19,7 +19,7 @@ const HTMLInline = (props: { value: string }) => {
|
|||||||
return <span dangerouslySetInnerHTML={ createSanitizedMarkup(props.value) } />;
|
return <span dangerouslySetInnerHTML={ createSanitizedMarkup(props.value) } />;
|
||||||
};
|
};
|
||||||
|
|
||||||
const inlineComponents: Components<{
|
const richTextComponents: Components<{
|
||||||
BlockQuote: BlockQuoteProps;
|
BlockQuote: BlockQuoteProps;
|
||||||
DateTime: DateTimeProps;
|
DateTime: DateTimeProps;
|
||||||
Image: ImageProps;
|
Image: ImageProps;
|
||||||
@@ -45,4 +45,4 @@ export const richTextTemplates: RichTextTemplate[] = [
|
|||||||
imageSchema
|
imageSchema
|
||||||
];
|
];
|
||||||
|
|
||||||
export default inlineComponents;
|
export default richTextComponents;
|
||||||
@@ -39,7 +39,7 @@
|
|||||||
},
|
},
|
||||||
"copyright": {
|
"copyright": {
|
||||||
"year": "2023",
|
"year": "2023",
|
||||||
"subtext": "Fait avec amour par [Nolwenn Meyer](https://www.linkedin.com/in/nolwenn-meyer/ \"Nolwenn Meyer\")\n"
|
"subtext": "Fait avec amour par [Nolwenn Meyer](https://www.linkedin.com/in/nolwenn-meyer/ \"Nolwenn Meyer\")"
|
||||||
},
|
},
|
||||||
"social": {
|
"social": {
|
||||||
"facebook": "https://www.facebook.com/psychartherapie.gard",
|
"facebook": "https://www.facebook.com/psychartherapie.gard",
|
||||||
|
|||||||
@@ -6,7 +6,7 @@ import { testimonialBlockSchema } from "../components/blocks/testimonial";
|
|||||||
import { carouselBlockSchema } from "../components/blocks/carousel";
|
import { carouselBlockSchema } from "../components/blocks/carousel";
|
||||||
import { headerSchema } from "../components/layout/header";
|
import { headerSchema } from "../components/layout/header";
|
||||||
import { footerSchema } from "../components/layout/footer";
|
import { footerSchema } from "../components/layout/footer";
|
||||||
import { richTextTemplates } from "../components/inline/inline-definitions";
|
import { richTextTemplates } from "../components/rich-text/inline-definitions";
|
||||||
import { titleBlockSchema } from "../components/blocks/title";
|
import { titleBlockSchema } from "../components/blocks/title";
|
||||||
import { facebookPageTimelineBlockSchema } from "../components/blocks/facebook-page-timeline";
|
import { facebookPageTimelineBlockSchema } from "../components/blocks/facebook-page-timeline";
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user