Skip to content

Commit c9b4e58

Browse files
committed
atom feed for job board
1 parent da0dda2 commit c9b4e58

File tree

4 files changed

+6
-3
lines changed

4 files changed

+6
-3
lines changed

.github/workflows/ci.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@ name: CI
22

33
on: push
44

5+
56
env:
67
IMAGE_NAME: apoland/indyhackers
78

pb/hooks/atom.pb.js

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,10 +17,11 @@ routerAdd("get", "/jobs_test.atom", (e) => {
1717

1818
const entries = records.map((r) => ({
1919
title: r.getString("title"),
20+
author: r.getString("company"),
2021
link: `https://indyhackers.org/posts/${r.id}`,
2122
id: `tag:indyhackers.org,2025:post/${r.id}`,
22-
updated: r.getDateTime("created").toString(),
23-
summary: r.getString("summary") || "",
23+
updated: new Date(r.getDateTime("created")).toISOString(),
24+
summary: r.getString("description") || "",
2425
}));
2526

2627
const xml = template.render({

pb/hooks/views/atom.html

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66
{{ range .entries }}
77
<entry>
88
<title>{{ .title }}</title>
9+
<author>{{ .author }}</author>
910
<link href="{{ .link }}" />
1011
<id>{{ .id }}</id>
1112
<updated>{{ .updated }}</updated>

src/components/jobs/JobsList.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ export default defineComponent({
4545
try {
4646
const jobs = await this.pocketbase.collection('jobs').getList(
4747
1, 100,{
48-
sort: '-created_at',
48+
sort: '-created',
4949
where: { approved: true }
5050
})
5151
this.jobs = jobs.items

0 commit comments

Comments
 (0)