Skip to content

Commit e05706c

Browse files
committed
v4.0..0
1 parent c7dce64 commit e05706c

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

53 files changed

+269
-240
lines changed

README.md

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -231,6 +231,11 @@ All commands are run from the root of the project, from a terminal:
231231
- Make BlogHero accept post as props rather than frontmatter
232232
- Moved Markdown pages to content collection
233233
- Eliminated Frontmatter type
234-
- 3.4.1: Maintenance:
234+
- 4.0.0: Major changes:
235235
- Updated packages
236-
- Removed @types/photoswipe and photoswipe tsconfig
236+
- Removed @types/photoswipe and photoswipe tsconfig
237+
- Moved to RSS schema
238+
- getPosts() function
239+
- schema tags
240+
- automatically generated sidebar links
241+
- improved RSS and search metadata

package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"name": "hello-astro",
33
"description": "Hello Astro is a full featured Astro corporate/marketing/blog starter theme written in Typescript and TailwindCSS. It supports Markdown and MDX based pages and blog posts.",
4-
"version": "3.4.1",
4+
"version": "4.0.0",
55
"scripts": {
66
"dev": "astro dev",
77
"clean": "rm -rf node_modules .astro dist",
@@ -50,7 +50,7 @@
5050
"tailwindcss": "^3.4.3",
5151
"typescript": "~5.4.3",
5252
"unist-util-visit": "^5.0.0",
53-
"vite": "^5.2.6"
53+
"vite": "^5.2.7"
5454
},
5555
"dependencies": {
5656
"@astrojs/check": "^0.5.10",

pnpm-lock.yaml

Lines changed: 29 additions & 29 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/components/blogcard.astro

Lines changed: 25 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -38,43 +38,51 @@ if (post.data.author) {
3838
alt={post.data.title + ' featured image'}
3939
class='relative h-64 w-full overflow-hidden rounded-lg bg-purple-100 object-cover object-center group-hover:opacity-75 dark:bg-purple-800'
4040
/>
41-
<p class='sr-only'>{post.data.title}</p>
41+
<p itemprop='name' class='sr-only'>{post.data.title}</p>
4242
</a>
4343
<div class='p-6'>
4444
{post.data.categories && <Categories categories={post.data.categories} />}
45-
<a href={import.meta.env.BASE_URL + 'blog/' + post.slug}>
45+
<a itemprop='url' href={import.meta.env.BASE_URL + 'blog/' + post.slug}>
4646
<h1
47+
itemprop='name'
4748
class='title-font mt-2 text-xl font-bold text-purple-600 hover:text-pink-600 dark:text-purple-300 dark:hover:text-pink-300'
4849
>
4950
{post.data.title}
5051
</h1>
5152
</a>
5253
<div class='flex flex-wrap items-center'>
53-
<span
54-
class='mr-3 inline-flex items-center border-r-2 border-purple-200 py-1 pr-3 text-xs leading-none text-gray-500 dark:border-purple-600 dark:text-gray-400'
55-
>
56-
<Icon class='mr-1 h-4 w-4' name='heroicons:calendar-days' />
57-
{post.data.publishDate.toDateString()}
58-
</span>
5954
{
60-
post.data.minutesRead && (
61-
<span class='mr-3 inline-flex items-center border-r-2 border-purple-200 py-1 pr-3 text-xs leading-none text-gray-500 dark:border-purple-600 dark:text-gray-400'>
62-
<Icon class='mr-1 h-4 w-4' name='heroicons:clock' />
63-
{post.data.minutesRead}
55+
post.data.pubDate && (
56+
<span
57+
itemprop='datePublished'
58+
class='mr-3 inline-flex items-center border-r-2 border-purple-200 py-1 pr-3 text-xs leading-none text-gray-500 dark:border-purple-600 dark:text-gray-400'
59+
>
60+
<Icon class='mr-1 h-4 w-4' name='heroicons:calendar-days' />
61+
{post.data.pubDate.toDateString()}
6462
</span>
6563
)
6664
}
6765
{
68-
post.data.author && (
69-
<span class='text-rosely1 dark:text-rosely7 inline-flex items-center text-xs leading-none'>
70-
<Icon class='mr-1 h-4 w-4' name='heroicons:user-circle' />
71-
{author.data.title}
66+
post.data.minutesRead && (
67+
<span class='mr-3 inline-flex items-center border-r-2 border-purple-200 py-1 pr-3 text-xs leading-none text-gray-500 dark:border-purple-600 dark:text-gray-400'>
68+
<Icon class='mr-1 h-4 w-4' name='heroicons:clock' />
69+
{post.data.minutesRead}
7270
</span>
7371
)
7472
}
73+
<span
74+
itemprop='author'
75+
class='inline-flex items-center text-xs leading-none text-gray-500 dark:text-gray-400'
76+
>
77+
<Icon class='mr-1 h-4 w-4' name='heroicons:user-circle' />
78+
{author.data.title}
79+
</span>
7580
</div>
7681

77-
<p class='mt-3 text-sm italic text-gray-600 dark:text-gray-300'>
82+
<p
83+
itemprop='abstract description'
84+
class='mt-3 text-sm italic text-gray-600 dark:text-gray-300'
85+
>
7886
{post.data.description}
7987
</p>
8088
<Tags tags={post.data.tags} />

src/components/bloghero.astro

Lines changed: 12 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,7 @@ if (post.data.author) {
3434
>
3535
</div>
3636
<Image
37+
itemprop='image'
3738
src={image}
3839
alt='featured image'
3940
class='absolute left-0 top-0 z-0 h-full w-full object-cover'
@@ -47,24 +48,22 @@ if (post.data.author) {
4748
{post.data.description}
4849
</h2>
4950
<span class='mt-3 flex'>
51+
<span class='mr-6 flex items-center'>
52+
<Image
53+
src={author.data.image}
54+
alt={author.data.title}
55+
class='mr-2 h-10 w-10 rounded-full object-cover'
56+
/>
57+
<span class='font-semibold text-purple-200'>{author.data.title}</span>
58+
</span>
5059
{
51-
post.data.author && (
60+
post.data.pubDate && (
5261
<span class='mr-6 flex items-center'>
53-
<Image
54-
src={author.data.image}
55-
alt={author.data.title}
56-
class='mr-2 h-10 w-10 rounded-full object-cover'
57-
/>
58-
<span class='font-semibold text-purple-200'>{author.data.title}</span>
62+
<Icon class='mr-1 h-6 w-6 text-purple-200' name='heroicons:calendar-days' />
63+
<span class='ml-1 font-semibold text-purple-200'>{post.data.pubDate.toString()}</span>
5964
</span>
6065
)
6166
}
62-
<span class='mr-6 flex items-center'>
63-
<Icon class='mr-1 h-6 w-6 text-purple-200' name='heroicons:calendar-days' />
64-
<span class='ml-1 font-semibold text-purple-200'>
65-
{new Date(post.data.publishDate).toString()}
66-
</span>
67-
</span>
6867
{
6968
post.data.minutesRead && (
7069
<span class='flex items-center'>

src/components/blogroll.astro

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,11 @@ export interface Props {
99
const { posts } = Astro.props
1010
---
1111

12-
<div class='flex flex-wrap space-y-12 dark:bg-gray-900 lg:space-y-0'>
12+
<div
13+
itemprop='mainEntity'
14+
itemscope
15+
itemtype='https://schema.org/Article'
16+
class='flex flex-wrap space-y-12 dark:bg-gray-900 lg:space-y-0'
17+
>
1318
{posts.map((post) => <BlogCard post={post} />)}
1419
</div>

src/components/carousel.astro

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -54,9 +54,6 @@ const images = folderFiles.map((image) => imageFiles[image])
5454
// @ts-ignore
5555
import Swiper from 'swiper/bundle'
5656

57-
// import Swiper styles
58-
import 'swiper/css/bundle'
59-
6057
new Swiper('.mySwiper', {
6158
cssMode: true,
6259
// lazy: true,

0 commit comments

Comments
 (0)