Skip to content

Commit 7090451

Browse files
authored
Merge pull request #8 from milan-codes/develop
Develop
2 parents fed4a18 + ea45b93 commit 7090451

29 files changed

Lines changed: 274 additions & 4149 deletions

astro.config.mjs

Lines changed: 7 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,28 +1,24 @@
1-
import { defineConfig } from "astro/config";
1+
import { defineConfig } from 'astro/config';
22

33
// https://astro.build/config
4-
import svelte from "@astrojs/svelte";
4+
import tailwind from '@astrojs/tailwind';
55

66
// https://astro.build/config
7-
import tailwind from "@astrojs/tailwind";
8-
9-
// https://astro.build/config
10-
import partytown from "@astrojs/partytown";
11-
import { remarkReadingTime } from "./remark-reading-time.mjs";
7+
import partytown from '@astrojs/partytown';
8+
import { remarkReadingTime } from './remark-reading-time.mjs';
129

1310
// https://astro.build/config
1411
export default defineConfig({
1512
integrations: [
16-
svelte(),
1713
tailwind(),
1814
partytown({
1915
config: {
20-
forward: ["dataLayer.push"],
16+
forward: ['dataLayer.push'],
2117
},
2218
}),
2319
],
2420
markdown: {
25-
remarkPlugins: ["remark-math", remarkReadingTime],
26-
rehypePlugins: ["rehype-katex"],
21+
remarkPlugins: ['remark-math', remarkReadingTime],
22+
rehypePlugins: ['rehype-katex'],
2723
},
2824
});

bun.lockb

217 KB
Binary file not shown.

package.json

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,12 +12,10 @@
1212
},
1313
"dependencies": {
1414
"@astrojs/partytown": "^1.2.3",
15-
"@astrojs/svelte": "^2.0.1",
1615
"@astrojs/tailwind": "^3.0.1",
17-
"astro": "^2.0.4",
16+
"astro": "^3.0.10",
1817
"mdast-util-to-string": "^4.0.0",
1918
"reading-time": "^1.5.0",
20-
"svelte": "^3.54.0",
2119
"tailwindcss": "^3.0.24"
2220
},
2321
"devDependencies": {

src/components/BlogPost.astro

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
---
2+
import { formattedPublishDate } from '../utils';
3+
4+
const { frontmatter } = Astro.props;
5+
---
6+
7+
<div>
8+
<h1 class="text-sm text-gray-400 dark:text-gray-600 mt-8">
9+
{formattedPublishDate(frontmatter.pubDate)}
10+
</h1>
11+
<h1 class="text-xl text-gray-900 dark:text-gray-100 tracking-wider">{frontmatter.title}</h1>
12+
<h1 class="text-gray-600 dark:text-gray-400">{frontmatter.description}</h1>
13+
<h1 class="mt-1 text-sm text-gray-400 dark:text-gray-600">{frontmatter.minutesRead}</h1>
14+
<div class="prose dark:prose-invert text-gray-600 dark:text-gray-400 my-8">
15+
<slot />
16+
</div>
17+
<ul class="flex flex-wrap my-8">
18+
{
19+
frontmatter.tags.map((tag: any) => (
20+
<li class="text-sm text-gray-400 dark:text-gray-600 mr-3 hover:underline">
21+
<a href={`/tags/${tag}`}>{`#${tag}`}</a>
22+
</li>
23+
))
24+
}
25+
</ul>
26+
<hr />
27+
<div class="prose dark:prose-invert text-gray-600 dark:text-gray-400 my-8">
28+
If you have any questions or comments, or you would like to point out any errors in any of the
29+
blog posts, please reach out to me at <a href="mailto:milanherke@protonmail.com"
30+
>milanherke@protonmail.com</a
31+
>.
32+
</div>
33+
</div>

src/components/BlogPost.svelte

Lines changed: 0 additions & 26 deletions
This file was deleted.

src/components/BlogPostCard.astro

Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
---
2+
import { formattedPublishDate } from '../utils';
3+
4+
const { post, containerStyleOverride } = Astro.props;
5+
---
6+
7+
<div class={containerStyleOverride ?? 'my-8'}>
8+
<p class="text-gray-400 dark:text-gray-600 text-sm">
9+
{formattedPublishDate(post.frontmatter.pubDate)}
10+
</p>
11+
<a
12+
class="inline-flex items-center rounded-lg text-gray-900 dark:text-gray-100 hover:underline"
13+
href={post.url}
14+
>
15+
{post.frontmatter.title}
16+
<svg
17+
xmlns="http://www.w3.org/2000/svg"
18+
width="24"
19+
height="24"
20+
viewBox="0 0 24 24"
21+
fill="none"
22+
stroke="currentColor"
23+
stroke-width="2"
24+
stroke-linecap="round"
25+
stroke-linejoin="round"
26+
class="ml-1 h-4 w-4"
27+
><line x1="7" y1="17" x2="17" y2="7"></line><polyline points="7 7 17 7 17 17"></polyline></svg
28+
>
29+
</a>
30+
<p class="text-gray-600 dark:text-gray-400">{post.frontmatter.description}</p>
31+
<ul class="flex flex-wrap">
32+
<li class="mr-3 text-gray-400 dark:text-gray-600 text-sm">{post.frontmatter.minutesRead}</li>
33+
{
34+
post.frontmatter.tags.map((tag: any) => (
35+
<li class="mr-3 text-gray-400 dark:text-gray-600 text-sm font-medium hover:underline">
36+
<a href={`/tags/${tag}`}>{`#${tag}`}</a>
37+
</li>
38+
))
39+
}
40+
</ul>
41+
</div>

src/components/BlogPostCard.svelte

Lines changed: 0 additions & 24 deletions
This file was deleted.
Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
---
2+
import BlogPostCard from './BlogPostCard.astro';
3+
4+
const { post } = Astro.props;
5+
---
6+
7+
<div class="my-8">
8+
<div class="flex justify-between">
9+
<h1 class="text-gray-900 dark:text-gray-100 tracking-wider">Latest blog post</h1>
10+
<a
11+
href="/blog"
12+
class="inline-flex items-center text-gray-400 dark:text-gray-600 text-sm hover:underline"
13+
>See all <svg
14+
xmlns="http://www.w3.org/2000/svg"
15+
width="24"
16+
height="24"
17+
viewBox="0 0 24 24"
18+
fill="none"
19+
stroke="currentColor"
20+
stroke-width="2"
21+
stroke-linecap="round"
22+
stroke-linejoin="round"
23+
class="ml-1 h-4 w-4"
24+
><line x1="5" y1="12" x2="19" y2="12"></line><polyline points="12 5 19 12 12 19"
25+
></polyline></svg
26+
></a
27+
>
28+
</div>
29+
<BlogPostCard post={post} containerStyleOverride="mt-2" />
30+
</div>

src/components/LatestBlogPost.svelte

Lines changed: 0 additions & 13 deletions
This file was deleted.

0 commit comments

Comments
 (0)