Skip to content

Commit cb5f066

Browse files
committed
Add 23/24 posts.
1 parent 8c1e65b commit cb5f066

18 files changed

+147
-71
lines changed

content/post/2023/2023-04-07-goodbye-gatsby-hello-hugo.md

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

src/components/Card.tsx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ export interface Props {
99
}
1010

1111
export default function Card({ href, frontmatter, secHeading = true }: Props) {
12-
const { title, pubDatetime, modDatetime, description } = frontmatter;
12+
const { title, date, modDatetime, summary } = frontmatter;
1313

1414
const headerProps = {
1515
style: { viewTransitionName: slugifyStr(title) },
@@ -28,8 +28,8 @@ export default function Card({ href, frontmatter, secHeading = true }: Props) {
2828
<h3 {...headerProps}>{title}</h3>
2929
)}
3030
</a>
31-
<Datetime pubDatetime={pubDatetime} modDatetime={modDatetime} />
32-
<p>{description}</p>
31+
<Datetime pubDatetime={date} modDatetime={modDatetime} />
32+
<p>{summary}</p>
3333
</li>
3434
);
3535
}

content/post/2023/2023-02-22-docker-meetup-dublin.md renamed to src/content/blog/2023/2023-02-22-docker-meetup-dublin.md

Lines changed: 10 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,19 @@
11
---
22
title: "Dublin Docker Meetup"
3-
date: "2023-02-23T00:00:00Z"
4-
layout: post
5-
published: true
6-
tags: [docker]
3+
date: 2023-02-23T00:00:00Z
4+
author: emeraldjava
5+
summary: 'Docker Meetup Feb 2023'
6+
tags:
7+
- docker
8+
slug: 2023-02-23-docker-meetup
79
---
810

9-
10-
1111
# Nginx Unit - @liamcrilly
1212

13-
##
14-
Async event loop
15-
multi-process architecture
16-
config reload without interruption
17-
1 CPU core per worker thread
13+
- Async event loop
14+
- multi-process architecture
15+
- config reload without interruption
16+
- 1 CPU core per worker thread
1817

1918
web server
2019
reverse proxy
Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
---
2+
title: 'Moving to Hugo'
3+
date: 2023-04-07T10:51:26Z
4+
author: ""
5+
keywords: ["hugo"]
6+
cover: ""
7+
summary: 'Goodby Gatsby, Hello Hugo'
8+
slug: 2023-04-07-moving-to-hugo
9+
---
10+
11+
Other switch of blogging platform from Gatsby to Hugo for the moment.
12+
13+
Using the 'github-style; themes
14+
15+
https://themes.gohugo.io/themes/github-style/

content/post/2023/2023-04-08-kubernetes-starter.md renamed to src/content/blog/2023/2023-04-08-kubernetes-starter.md

Lines changed: 9 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,12 @@
1-
+++
2-
title = "Kubernetes on Docker Desktop starter"
3-
date = 2023-04-08T18:22:26+01:00
4-
author = ""
5-
keywords = ["kubernetes", "docker"]
6-
cover = ""
7-
summary = "Setting up a basic pod via Docker Desktop on Mac"
8-
+++
1+
---
2+
title: 'Kubernetes on Docker Desktop starter'
3+
date: 2023-04-08T18:22:26Z
4+
author: ""
5+
keywords: ["kubernetes", "docker"]
6+
cover: ""
7+
summary: "Setting up a basic pod via Docker Desktop on Mac"
8+
slug: 2023-04-08-kubernetes
9+
---
910

1011
Via https://github.com/dockersamples/example-voting-app
1112

content/post/2023/2023-07-22-Register-Serenity-Listener.md renamed to src/content/blog/2023/2023-07-22-Register-Serenity-Listener.md

Lines changed: 9 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,12 @@
1-
+++
2-
title = "Register Serenity Listener"
3-
date = 2023-07-22T20:03:04+01:00
4-
author = "emeraldjava"
5-
keywords = ["serenity", "java"]
6-
cover = ""
7-
summary = "Remember the META-INF config for Service Locators"
8-
+++
1+
---
2+
title: "Register Serenity Listener"
3+
date: 2023-07-22T20:03:04Z
4+
author: "emeraldjava"
5+
keywords: ["serenity", "java"]
6+
cover: ""
7+
summary: "Remember the META-INF config for Service Locators"
8+
slug: 2023-07-22-serenity
9+
---
910

1011
# Step 1 - Create the Listener
1112

content/post/2023/2023-12-29-github-worth.md renamed to src/content/blog/2023/2023-12-29-github-worth.md

Lines changed: 9 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,12 @@
1-
+++
2-
title = "Github Worth"
3-
date = 2023-07-22T20:03:04+01:00
4-
author = "emeraldjava"
5-
keywords = ["github"]
6-
cover = ""
7-
summary = "The percieved value of my github repo!"
8-
+++
1+
---
2+
title: "Github Worth"
3+
date: 2023-12-09T20:03:04Z
4+
author: "emeraldjava"
5+
keywords: ["github"]
6+
cover: ""
7+
summary: "The percieved value of my github repo!"
8+
slug: 2023-12-29-git-worth
9+
---
910

1011
Using https://github-worth.vercel.app/ to determine the value of the [emeraldjava](https://github.com/emeraldjava) github empire.
1112

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
---
2+
title: "Enable GitHUb Discussions"
3+
date: 2023-07-30T20:03:04Z
4+
author: "emeraldjava"
5+
keywords: ["github"]
6+
cover: ""
7+
summary: "The percieved value of my github repo!"
8+
slug: 2023-07-30-github-discuss
9+
---
10+
11+
emeraldjava/emeraldjava.github.io
12+
13+
https://giscus.app/
14+
15+
[45586619](https://github.com/settings/installations/45586619)
16+
17+
https://blog.puvvadi.me/posts/github-comments-hugo-giscus/
18+
19+
https://tangenttechnologies.ca/blog/hugo-themes/
20+
21+
https://www.justinjbird.me/2023/adding-comments-to-a-hugo-site-using-giscus/
22+
23+
24+
https://giscus.app/api/discussions?repo=emeraldjava%2Femeraldjava.github.io&term=Github+Worth&category=General&number=0&strict=false&first=15
25+
26+
https://zhauniarovich.com/post/2021/2021-06-giscus/
27+
https://github.com/zyrikby/website_related/tree/master
28+
29+
See https://docs.github.com/en/rest/repos/repos?apiVersion=2022-11-28#get-a-repository
30+
31+
gh api \
32+
-H "Accept: application/vnd.github+json" \
33+
-H "X-GitHub-Api-Version: 2022-11-28" \
34+
/repos/emeraldjava/emeraldjava.github.io
35+
Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
---
2+
title: "Home Assistant Setup"
3+
date: 2024-03-31T20:03:04Z
4+
author: "emeraldjava"
5+
featured: true
6+
tags:
7+
- synology
8+
- homeassistant
9+
cover: ""
10+
summary: "The perceived value of my github repo!"
11+
slug: 2024-03-31-home-assistant
12+
---
13+
14+
2024-31-03-setup-home-assistant.md
15+
16+
docker run -d --name=home_assistant \
17+
-e TZ=Europe/Dublin \
18+
-v /var/services/homes/admin/homeassistant:/config \
19+
-v /usr/syno/etc/certificate:/certificate \
20+
--net=host \
21+
--restart always \
22+
homeassistant/home-assistant
23+
24+
emeraldjava.synology.me:8123
25+
26+
53004ede-358f-4ec1-82ad-52d311c5c321
27+
28+
[12:16:21.353] > [2024-03-31 12:16:21] error
29+
30+
> - find /lib/ld-musl-x86_64.so.1, which is required to run the Visual Studio Code Server in musl environments
31+
[12:16:21.357] > 4de21bb3f979: start
32+
33+
34+
##
35+
36+
sudo docker run --name hass --restart=always --net=host --privileged -itd -v /volume1/homeassistant/config:/config -v /usr/syno/etc/certificate:/certificate --device /dev/ttyACM0 homeassistant/home-assistant
37+
38+
https://community.home-assistant.io/t/ssl-and-home-assistant-running-on-a-synology-docker/32102/4

src/content/blog/adding-new-post.md renamed to src/content/blog/2024/2024-06-06-new-astro-post.md

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,13 @@
11
---
22
title: Adding new posts in AstroPaper theme
33
author: me
4-
pubDatetime: 2022-09-23T15:22:00Z
5-
modDatetime: 2023-12-21T09:12:47.400Z
6-
slug: adding-new-posts-in-astropaper-theme
4+
date: 2024-06-06T15:22:00Z
5+
slug: 2024-06-06-new-astro-post
76
featured: true
87
draft: false
98
tags:
109
- docs
11-
description:
10+
summary:
1211
Some rules & recommendations for creating or adding new posts using AstroPaper
1312
theme.
1413
---

src/content/config.ts

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -8,10 +8,11 @@ const blog = defineCollection({
88
schema: ({ image }) =>
99
z.object({
1010
author: z.string().default(SITE.author),
11-
pubDate: z.coerce.date().optional(),
12-
updatedDate: z.coerce.date().optional(),
13-
pubDatetime: z.coerce.date(),
11+
date: z.coerce.date(),
12+
//pubDate: z.coerce.date().optional(),
1413
modDatetime: z.coerce.date().optional().nullable(),
14+
//pubDatetime: z.coerce.date(),
15+
//modDatetime: z.coerce.date().optional().nullable(),
1516
title: z.string(),
1617
featured: z.boolean().optional(),
1718
draft: z.boolean().optional(),
@@ -22,7 +23,7 @@ const blog = defineCollection({
2223
})
2324
.or(z.string())
2425
.optional(),
25-
description: z.string(),
26+
summary: z.string(),
2627
canonicalURL: z.string().optional(),
2728
}),
2829
});

src/layouts/PostDetails.astro

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -18,10 +18,10 @@ const { post } = Astro.props;
1818
const {
1919
title,
2020
author,
21-
description,
21+
summary,
2222
ogImage,
2323
canonicalURL,
24-
pubDatetime,
24+
date,
2525
modDatetime,
2626
tags,
2727
} = post.data;
@@ -37,8 +37,8 @@ const ogUrl = new URL(
3737
const layoutProps = {
3838
title: `${title} | ${SITE.title}`,
3939
author,
40-
description,
41-
pubDatetime,
40+
summary,
41+
date,
4242
modDatetime,
4343
canonicalURL,
4444
ogImage: ogUrl,
@@ -68,7 +68,7 @@ const layoutProps = {
6868
<main id="main-content">
6969
<h1 transition:name={slugifyStr(title)} class="post-title">{title}</h1>
7070
<Datetime
71-
pubDatetime={pubDatetime}
71+
pubDatetime={date}
7272
modDatetime={modDatetime}
7373
size="lg"
7474
className="my-2"

src/pages/rss.xml.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,8 @@ export async function GET() {
1313
items: sortedPosts.map(({ data, slug }) => ({
1414
link: `posts/${slug}/`,
1515
title: data.title,
16-
description: data.description,
17-
pubDate: new Date(data.modDatetime ?? data.pubDatetime),
16+
description: data.summary,
17+
pubDate: new Date(data.modDatetime ?? data.date),
1818
})),
1919
});
2020
}

src/pages/search.astro

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ const sortedPosts = getSortedPosts(posts);
1515
// List of items to search in
1616
const searchList = sortedPosts.map(({ data, slug }) => ({
1717
title: data.title,
18-
description: data.description,
18+
description: data.summary,
1919
data,
2020
slug,
2121
}));

src/utils/getSortedPosts.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,10 +7,10 @@ const getSortedPosts = (posts: CollectionEntry<"blog">[]) => {
77
.sort(
88
(a, b) =>
99
Math.floor(
10-
new Date(b.data.modDatetime ?? b.data.pubDatetime).getTime() / 1000
10+
new Date(b.data.modDatetime ?? b.data.date).getTime() / 1000
1111
) -
1212
Math.floor(
13-
new Date(a.data.modDatetime ?? a.data.pubDatetime).getTime() / 1000
13+
new Date(a.data.modDatetime ?? a.data.date).getTime() / 1000
1414
)
1515
);
1616
};

src/utils/postFilter.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ import type { CollectionEntry } from "astro:content";
44
const postFilter = ({ data }: CollectionEntry<"blog">) => {
55
const isPublishTimePassed =
66
Date.now() >
7-
new Date(data.pubDatetime).getTime() - SITE.scheduledPostMargin;
7+
new Date(data.date).getTime() - SITE.scheduledPostMargin;
88
return !data.draft && (import.meta.env.DEV || isPublishTimePassed);
99
};
1010

0 commit comments

Comments
 (0)