chore: remove junk
This commit is contained in:
parent
8f6872f739
commit
5d9940eddf
16 changed files with 15 additions and 118 deletions
|
@ -2,11 +2,10 @@
|
|||
import { getCollection } from 'astro:content'
|
||||
import Layout from '@layouts/Layout.astro'
|
||||
import Container from '@components/Container.astro'
|
||||
import { ABOUT } from '@consts'
|
||||
import { Image } from 'astro:assets'
|
||||
---
|
||||
|
||||
<Layout title={ABOUT.TITLE} description={ABOUT.DESCRIPTION}>
|
||||
<Layout title="About" description="About">
|
||||
<Container>
|
||||
<aside data-pagefind-ignore>
|
||||
<div class="space-y-10">
|
||||
|
|
|
@ -7,7 +7,6 @@ import { readingTime } from '@lib/utils'
|
|||
import BackToPrevious from '@components/BackToPrevious.astro'
|
||||
import PostNavigation from '@components/PostNavigation.astro'
|
||||
import TableOfContents from '@components/TableOfContents.astro'
|
||||
import Giscus from '@components/Giscus.astro'
|
||||
|
||||
export async function getStaticPaths() {
|
||||
const posts = (await getCollection('blog'))
|
||||
|
@ -91,9 +90,6 @@ const { Content, headings } = await post.render()
|
|||
<div class="mt-24">
|
||||
<PostNavigation prevPost={prevPost} nextPost={nextPost} />
|
||||
</div>
|
||||
<div class="mt-24">
|
||||
<Giscus />
|
||||
</div>
|
||||
</article>
|
||||
</Container>
|
||||
</Layout>
|
||||
|
|
|
@ -3,7 +3,6 @@ import { type CollectionEntry, getCollection } from 'astro:content'
|
|||
import Layout from '@layouts/Layout.astro'
|
||||
import Container from '@components/Container.astro'
|
||||
import ArrowCard from '@components/ArrowCard.astro'
|
||||
import { BLOG } from '@consts'
|
||||
|
||||
const data = (await getCollection('blog'))
|
||||
.filter((post) => !post.data.draft)
|
||||
|
@ -25,7 +24,7 @@ const posts = data.reduce((acc: Acc, post) => {
|
|||
const years = Object.keys(posts).sort((a, b) => parseInt(b) - parseInt(a))
|
||||
---
|
||||
|
||||
<Layout title={BLOG.TITLE} description={BLOG.DESCRIPTION}>
|
||||
<Layout title="Blog" description="Blog">
|
||||
<Container>
|
||||
<aside data-pagefind-ignore>
|
||||
<div class="space-y-10">
|
||||
|
|
|
@ -2,7 +2,6 @@
|
|||
import { getCollection } from 'astro:content'
|
||||
import Layout from '@layouts/Layout.astro'
|
||||
import Container from '@components/Container.astro'
|
||||
import { CV } from '@consts'
|
||||
import CVCard from '@components/CVCard.astro'
|
||||
|
||||
// TO Modify
|
||||
|
@ -33,7 +32,7 @@ const educations = [
|
|||
]
|
||||
---
|
||||
|
||||
<Layout title={CV.TITLE} description={CV.DESCRIPTION}>
|
||||
<Layout title="CV" description="CV">
|
||||
<Container>
|
||||
<aside data-pagefind-ignore>
|
||||
<div class="space-y-2 md:space-y-10">
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
---
|
||||
import Layout from '@layouts/Layout.astro'
|
||||
import Container from '@components/Container.astro'
|
||||
import { SITE, HOME } from '@consts'
|
||||
import { SITE } from '@consts'
|
||||
import ArrowCard from '@components/ArrowCard.astro'
|
||||
import Link from '@components/Link.astro'
|
||||
import { getCollection } from 'astro:content'
|
||||
|
@ -21,7 +21,7 @@ const publications: CollectionEntry<'publications'>[] = (
|
|||
.slice(0, SITE.NUM_PUBLICATIONS_ON_HOMEPAGE)
|
||||
---
|
||||
|
||||
<Layout title={HOME.TITLE} description={HOME.DESCRIPTION}>
|
||||
<Layout title="Home" description="Home">
|
||||
<Container>
|
||||
<aside data-pagefind-ignore>
|
||||
<h1 class="animate font-semibold text-black dark:text-white">
|
||||
|
|
|
@ -2,7 +2,6 @@
|
|||
import { getCollection } from 'astro:content'
|
||||
import Layout from '@layouts/Layout.astro'
|
||||
import Container from '@components/Container.astro'
|
||||
import { RESEARCH } from '@consts'
|
||||
import PublicationCard from '@components/PublicationCard.astro'
|
||||
// import PublicationCard from "@components/PublicationCard";
|
||||
|
||||
|
@ -11,7 +10,7 @@ const publications = (await getCollection('publications')).sort(
|
|||
)
|
||||
---
|
||||
|
||||
<Layout title={RESEARCH.TITLE} description={RESEARCH.DESCRIPTION}>
|
||||
<Layout title="Research" description="Research">
|
||||
<Container>
|
||||
<aside data-pagefind-ignore>
|
||||
<div class="space-y-10">
|
||||
|
|
|
@ -1,36 +1,30 @@
|
|||
import rss from '@astrojs/rss'
|
||||
import { SITE } from '@consts'
|
||||
import { getCollection } from 'astro:content'
|
||||
import type { APIContext } from 'astro'
|
||||
|
||||
export async function GET(context) {
|
||||
// const publications = (await getCollection("publications")).filter(
|
||||
// (publication) => !publication.data.draft,
|
||||
// );
|
||||
|
||||
// const items = [...blog, ...publications].sort(
|
||||
// (a, b) => new Date(b.data.date).valueOf() - new Date(a.data.date).valueOf(),
|
||||
// );
|
||||
export async function GET(context: APIContext) {
|
||||
try {
|
||||
const blog = (await getCollection('blog')).filter(
|
||||
(post) => !post.data.draft,
|
||||
(post) => !post.data.draft
|
||||
)
|
||||
|
||||
// Filter posts by tag 'rss-feed'
|
||||
const filteredBlogs = blog.filter(
|
||||
(post) => post.data.tags && post.data.tags.includes('rss-feed'),
|
||||
(post) => post.data.tags && post.data.tags.includes('rss-feed')
|
||||
)
|
||||
|
||||
// Sort posts by date
|
||||
const items = [...filteredBlogs].sort(
|
||||
(a, b) =>
|
||||
new Date(b.data.date).valueOf() - new Date(a.data.date).valueOf(),
|
||||
new Date(b.data.date).valueOf() - new Date(a.data.date).valueOf()
|
||||
)
|
||||
|
||||
// Return RSS feed
|
||||
return rss({
|
||||
title: SITE.TITLE,
|
||||
description: SITE.DESCRIPTION,
|
||||
site: context.site,
|
||||
site: context.site ?? SITE.SITEURL,
|
||||
items: items.map((item) => ({
|
||||
title: item.data.title,
|
||||
description: item.data.description,
|
|
@ -3,7 +3,6 @@ import { type CollectionEntry, getCollection } from 'astro:content'
|
|||
import Layout from '@layouts/Layout.astro'
|
||||
import Container from '@components/Container.astro'
|
||||
import ArrowCard from '@components/ArrowCard.astro'
|
||||
import { TAGS } from '@consts'
|
||||
|
||||
type BlogPost = CollectionEntry<'blog'>
|
||||
|
||||
|
|
|
@ -2,7 +2,6 @@
|
|||
import { getCollection } from 'astro:content'
|
||||
import Layout from '@layouts/Layout.astro'
|
||||
import Container from '@components/Container.astro'
|
||||
import { TAGS } from '@consts'
|
||||
import Image from 'astro/components/Image.astro'
|
||||
|
||||
const blog = (await getCollection('blog')).filter((post) => !post.data.draft)
|
||||
|
@ -12,7 +11,7 @@ const tags = blog
|
|||
.filter((tag, index, self) => self.indexOf(tag) === index)
|
||||
---
|
||||
|
||||
<Layout title={TAGS.TITLE} description={TAGS.DESCRIPTION}>
|
||||
<Layout title="Tags" description="Tags">
|
||||
<Container>
|
||||
<aside data-pagefind-ignore>
|
||||
<div class="space-y-10">
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue