From 222c9cee1d6fed0bebe0b69f89f5176a1615f464 Mon Sep 17 00:00:00 2001 From: Dessalines Date: Tue, 15 Dec 2020 18:21:08 -0600 Subject: [PATCH] Converting html tags description field from md to html. Fixes #110 --- src/shared/components/html-tags.tsx | 36 ++++++++++++++++------------- 1 file changed, 20 insertions(+), 16 deletions(-) diff --git a/src/shared/components/html-tags.tsx b/src/shared/components/html-tags.tsx index 06fd687..ff30fb3 100644 --- a/src/shared/components/html-tags.tsx +++ b/src/shared/components/html-tags.tsx @@ -1,6 +1,7 @@ import { Component } from 'inferno'; import { Helmet } from 'inferno-helmet'; import { httpExternalPath } from '../env'; +import { md } from '../utils'; interface HtmlTagsProps { title: string; @@ -18,34 +19,37 @@ export class HtmlTags extends Component { {/* Primary Meta Tags */} - {this.props.description && ( - - )} {/* Open Graph / Facebook */} - {this.props.description && ( - - )} - {this.props.image && ( - - )} {/* Twitter */} - {this.props.description && ( + + {/* Optional desc and images */} + {this.props.description && [ + , + , - )} - {this.props.image && ( - - )} + content={md.renderInline(this.props.description)} + />, + ]} + + {this.props.image && [ + , + , + ]} ); } -- 2.44.1