mirror of
https://github.com/10h30/astroplate.git
synced 2026-06-05 15:08:00 +09:00
fixed search results url
This commit is contained in:
+2
-2
@@ -16,13 +16,13 @@
|
||||
"@astrojs/mdx": "^0.19.1",
|
||||
"@astrojs/react": "^2.1.3",
|
||||
"@astrojs/rss": "^2.4.1",
|
||||
"@astrojs/sitemap": "^1.3.0",
|
||||
"@astrojs/sitemap": "^1.3.1",
|
||||
"@astrojs/tailwind": "^3.1.2",
|
||||
"@tailwindcss/forms": "^0.5.3",
|
||||
"@tailwindcss/typography": "^0.5.9",
|
||||
"@types/marked": "^4.3.0",
|
||||
"@types/react": "^18.2.6",
|
||||
"astro": "^2.4.3",
|
||||
"astro": "^2.4.4",
|
||||
"astro-auto-import": "^0.3.0",
|
||||
"date-fns": "^2.30.0",
|
||||
"date-fns-tz": "^2.0.0",
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
import config from "@/config/config.json";
|
||||
import { humanize, plainify, slugify } from "@/lib/utils/textConverter";
|
||||
import Fuse from "fuse.js";
|
||||
import { useEffect, useRef, useState } from "react";
|
||||
import React, { useEffect, useRef, useState } from "react";
|
||||
import {
|
||||
FaRegFolder,
|
||||
FaRegUserCircle,
|
||||
@@ -131,7 +131,7 @@ const Search = ({ searchList }: Props) => {
|
||||
/>
|
||||
)}
|
||||
<h4 className="mb-3">
|
||||
<a href={`/${blog_folder}/${item.data.slug}`}>
|
||||
<a href={`/${blog_folder}/${item.slug}`}>
|
||||
{item.data.title}
|
||||
</a>
|
||||
</h4>
|
||||
@@ -164,7 +164,7 @@ const Search = ({ searchList }: Props) => {
|
||||
</p>
|
||||
<a
|
||||
className="btn btn-outline-primary btn-sm"
|
||||
href={`/${blog_folder}/${item.data.slug}`}
|
||||
href={`/${blog_folder}/${item.slug}`}
|
||||
>
|
||||
read more
|
||||
</a>
|
||||
|
||||
@@ -14,10 +14,10 @@ export const slugify = (content: string) => {
|
||||
};
|
||||
|
||||
// markdownify
|
||||
export const markdownify = (content: string) => {
|
||||
export const markdownify = (content: string, div?:boolean) => {
|
||||
if (!content) return null;
|
||||
|
||||
return marked.parseInline(content);
|
||||
return div? marked.parse(content) : marked.parseInline(content);
|
||||
};
|
||||
|
||||
// humanize
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
{
|
||||
"extends": "astro/tsconfigs/strict",
|
||||
"compilerOptions": {
|
||||
"jsx": "react",
|
||||
"baseUrl": ".",
|
||||
"resolveJsonModule": true,
|
||||
"allowSyntheticDefaultImports": true,
|
||||
|
||||
Reference in New Issue
Block a user