Skip to content

Commit a443b10

Browse files
committed
Remove blog/
1 parent 982a2c6 commit a443b10

File tree

7 files changed

+16
-16
lines changed

7 files changed

+16
-16
lines changed

src/pages/blog/[...year].astro renamed to src/pages/[...year].astro

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
11
---
22
import type { CollectionEntry } from 'astro:content'
3-
import { getPosts } from '../../common/config'
4-
import Base from '../../common/base.astro'
5-
import PageHero from '../../common/pagehero.astro'
6-
import BlogRoll from '../../common/blogroll.astro'
7-
import Years from '../../common/years.astro'
8-
import coverImage from '../../images/svg/undraw/my_feed.svg'
9-
import socialImage from '../../images/undraw/my_feed.png'
3+
import { getPosts } from '../common/config'
4+
import Base from '../common/base.astro'
5+
import PageHero from '../common/pagehero.astro'
6+
import BlogRoll from '../common/blogroll.astro'
7+
import Years from '../common/years.astro'
8+
import coverImage from '../images/svg/undraw/my_feed.svg'
9+
import socialImage from '../images/undraw/my_feed.png'
1010
1111
export interface Props {
1212
year: number

src/pages/blog/[year]/[id].astro renamed to src/pages/[year]/[id].astro

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
---
22
import type { CollectionEntry } from 'astro:content'
33
import { render } from 'astro:content'
4-
import Layout from '../../../common/blog.astro'
5-
import { getPosts } from '../../../common/config'
4+
import Layout from '../../common/blog.astro'
5+
import { getPosts } from '../../common/config'
66
77
// 1. Generate a new path for every collection entry
88
export async function getStaticPaths() {

src/pages/blog/index.astro renamed to src/pages/blog.astro

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
---
2-
import { getPosts } from '../../common/config'
2+
import { getPosts } from '../common/config'
33
44
const posts = await getPosts()
55
---
@@ -9,7 +9,7 @@ const posts = await getPosts()
99
<head>
1010
<meta
1111
http-equiv='refresh'
12-
content={`0; url=${import.meta.env.BASE_URL + 'blog/' + posts[0].data.pubDate!.getFullYear()}`}
12+
content={`0; url=${import.meta.env.BASE_URL + posts[0].data.pubDate!.getFullYear()}`}
1313
/>
1414
</head>
1515
<body> </body>

src/pages/index.astro

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ const categories = await getCollection('category')
5252
</div>
5353
<div class='mt-3 sm:mt-0 sm:ml-3'>
5454
<a
55-
href={import.meta.env.BASE_URL + 'blog/' + posts[0].data.pubDate!.getFullYear()}
55+
href={import.meta.env.BASE_URL + posts[0].data.pubDate!.getFullYear()}
5656
class='bg-roselya text-rosely0 hover:bg-rosely5 dark:bg-rosely1 dark:text-roselyb dark:hover:bg-rosely8 flex w-full items-center justify-center rounded-md border border-transparent px-8 py-2 text-base font-medium md:px-10 md:py-3 md:text-lg'
5757
rel='noopener noreferrer'
5858
target='_blank'
@@ -85,7 +85,7 @@ const categories = await getCollection('category')
8585
My Latest Articles
8686
</h2>
8787
<a
88-
href={import.meta.env.BASE_URL + 'blog/' + posts[0].data.pubDate!.getFullYear()}
88+
href={import.meta.env.BASE_URL + posts[0].data.pubDate!.getFullYear()}
8989
class='dark:hover:brosely5 bg-rosely9 hover:bg-roselyc dark:bg-roselyb dark:text-rosely0 mt-2 ml-4 inline-block rounded-md px-2 py-2 text-base font-semibold text-white md:text-lg'
9090
>
9191
All Articles

src/pages/search-docs.json.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ const posts = await getCollection('blog', (p) => {
1010
let documents = await Promise.all(
1111
posts.map(async (post) => {
1212
return {
13-
url: import.meta.env.BASE_URL + 'blog/' + post.id,
13+
url: import.meta.env.BASE_URL + post.id,
1414
title: post.data.title,
1515
description: post.data.description,
1616
publishDate: post.data.publishDate,

src/pages/search-index.json.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ const posts = await getCollection('blog', (p) => {
1010
let documents = await Promise.all(
1111
posts.map(async (post) => {
1212
return {
13-
url: import.meta.env.BASE_URL + 'blog/' + post.id,
13+
url: import.meta.env.BASE_URL + post.id,
1414
title: post.data.title,
1515
description: post.data.description,
1616
categories: post.data.categories,

0 commit comments

Comments
 (0)