updated to astro v3.6

This commit is contained in:
somrat sorkar
2023-12-03 15:28:12 +06:00
parent 34e3ac525f
commit afb57b5825
22 changed files with 151 additions and 121 deletions
+9 -6
View File
@@ -1,23 +1,26 @@
---
import BlogCard from "@/components/BlogCard.astro";
import Share from "@/components/Share.astro";
import config from "@/config/config.json";
import Disqus from "@/helpers/Disqus";
import { getSinglePage } from "@/lib/contentParser.astro";
import dateFormat from "@/lib/utils/dateFormat";
import similerItems from "@/lib/utils/similarItems";
import similarItems from "@/lib/utils/similarItems";
import { humanize, markdownify, slugify } from "@/lib/utils/textConverter";
import { Image } from "astro:assets";
import { getCollection } from "astro:content";
import {
FaRegClock,
FaRegFolder,
FaRegUserCircle,
} from "react-icons/fa/index.js";
const { blog_folder } = config.settings;
const posts = await getSinglePage(blog_folder);
const COLLECTION_FOLDER = "blog";
const { post } = Astro.props;
const similarPosts = similerItems(post, posts, post.slug);
const posts = await getCollection(
COLLECTION_FOLDER,
({ data, slug }) => !data.draft && slug !== "-index",
);
const similarPosts = similarItems(post, posts);
const { Content } = await post.render();
const { title, description, author, categories, image, date, tags } = post.data;
---
+2 -2
View File
@@ -25,7 +25,7 @@ interface SearchResult {
refIndex: number;
}
const Search = ({ searchList }: Props) => {
const SearchLayout = ({ searchList }: Props) => {
const inputRef = useRef<HTMLInputElement>(null);
const [inputVal, setInputVal] = useState("");
const [searchResults, setSearchResults] = useState<SearchResult[]>([]);
@@ -178,4 +178,4 @@ const Search = ({ searchList }: Props) => {
);
};
export default Search;
export default SearchLayout;
+1 -1
View File
@@ -20,7 +20,7 @@ export interface ISocial {
rel="noopener noreferrer nofollow"
>
<span class="sr-only">{social.name}</span>
<DynamicIcon class="inline-block" icon={social.icon} />
<DynamicIcon className="inline-block" icon={social.icon} />
</a>
</li>
))
+1 -1
View File
@@ -1,4 +1,4 @@
import React, { FC } from "react";
import React, { type FC } from "react";
import type { IconType } from "react-icons";
import * as FaIcons from "react-icons/fa6/index.js";
// import * as AiIcons from "react-icons/ai/index.js";