mirror of
https://github.com/ChenQihan666/MyBlog-Next.git
synced 2026-08-14 11:29:33 +08:00
chore: format files with prettier
This commit is contained in:
@@ -48,7 +48,7 @@ const sortedPosts = getSortedPosts(posts);
|
||||
</p>
|
||||
<div class="social-wrapper">
|
||||
<div class="social-links">Social Links:</div>
|
||||
<Socials />
|
||||
<Socials />
|
||||
</div>
|
||||
</section>
|
||||
|
||||
|
||||
@@ -30,7 +30,7 @@ type PagePaths = {
|
||||
export async function getStaticPaths() {
|
||||
const posts = await Astro.glob<Frontmatter>("../../contents/**/*.md");
|
||||
|
||||
let postResult: PostResult = posts.map((post) => {
|
||||
let postResult: PostResult = posts.map(post => {
|
||||
return {
|
||||
params: {
|
||||
slug: slugify(post.frontmatter),
|
||||
@@ -41,7 +41,7 @@ export async function getStaticPaths() {
|
||||
};
|
||||
});
|
||||
|
||||
const pagePaths: PagePaths = getPageNumbers(posts.length).map((pageNum) => ({
|
||||
const pagePaths: PagePaths = getPageNumbers(posts.length).map(pageNum => ({
|
||||
params: { slug: String(pageNum) },
|
||||
}));
|
||||
|
||||
|
||||
@@ -13,10 +13,10 @@ const posts = await Astro.glob<Frontmatter>("../contents/**/*.md");
|
||||
// List of items to search in
|
||||
const searchList = posts
|
||||
.filter(({ frontmatter }) => !frontmatter.draft)
|
||||
.map((post) => ({
|
||||
.map(post => ({
|
||||
title: post.frontmatter.title,
|
||||
description: post.frontmatter.description,
|
||||
headings: post.getHeadings().map((h) => h.text),
|
||||
headings: post.getHeadings().map(h => h.text),
|
||||
frontmatter: post.frontmatter,
|
||||
}));
|
||||
---
|
||||
|
||||
@@ -23,7 +23,7 @@ export async function getStaticPaths() {
|
||||
|
||||
const tags = getUniqueTags(posts);
|
||||
|
||||
return tags.map((tag) => {
|
||||
return tags.map(tag => {
|
||||
return {
|
||||
params: {
|
||||
tag,
|
||||
|
||||
@@ -17,7 +17,7 @@ let tags = getUniqueTags(posts);
|
||||
<Header activeNav="tags" />
|
||||
<Main pageTitle="Tags" pageDesc="All the tags used in posts.">
|
||||
<ul>
|
||||
{tags.map((tag) => <Tag name={tag} size="lg" />)}
|
||||
{tags.map(tag => <Tag name={tag} size="lg" />)}
|
||||
</ul>
|
||||
</Main>
|
||||
<Footer />
|
||||
|
||||
Reference in New Issue
Block a user