feat: enhance layout of search
This commit is contained in:
@ -6,6 +6,7 @@ import { KMenu } from "@islands/KMenu.tsx";
|
||||
import { YoutubePlayer } from "@components/Youtube.tsx";
|
||||
import { HashTags } from "@components/HashTags.tsx";
|
||||
import { isYoutubeLink } from "@lib/string.ts";
|
||||
import { renderMarkdown } from "@lib/documents.ts";
|
||||
|
||||
export const handler: Handlers<Article | null> = {
|
||||
async GET(_, ctx) {
|
||||
@ -19,6 +20,8 @@ export default function Greet(props: PageProps<Article>) {
|
||||
|
||||
const { author = "", date = "" } = article.meta;
|
||||
|
||||
const content = renderMarkdown(article.content);
|
||||
|
||||
return (
|
||||
<MainLayout url={props.url} title={`Article > ${article.name}`}>
|
||||
<RecipeHero
|
||||
@ -43,9 +46,9 @@ export default function Greet(props: PageProps<Article>) {
|
||||
class="whitespace-break-spaces markdown-body"
|
||||
data-color-mode="dark"
|
||||
data-dark-theme="dark"
|
||||
dangerouslySetInnerHTML={{ __html: article.content || "" }}
|
||||
dangerouslySetInnerHTML={{ __html: content || "" }}
|
||||
>
|
||||
{article.content||""}
|
||||
{content||""}
|
||||
</pre>
|
||||
</div>
|
||||
</MainLayout>
|
||||
|
Reference in New Issue
Block a user