Skip to content

Commit e934a99

Browse files
committed
get everything done
1 parent 47c2c11 commit e934a99

File tree

2 files changed

+40
-602
lines changed

2 files changed

+40
-602
lines changed
Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
---
2+
import { getCollection } from 'astro:content';
3+
import { ServiceBox } from './ServiceBox.tsx';
4+
5+
const allServices = await getCollection('docs', ({ id }) => {
6+
return id.startsWith('aws/services/') && !id.includes('/index');
7+
});
8+
9+
const sortedServices = allServices.sort((a, b) => {
10+
const titleA = a.data.title || a.data.linkTitle || '';
11+
const titleB = b.data.title || b.data.linkTitle || '';
12+
return titleA.localeCompare(titleB);
13+
});
14+
15+
const serviceData = sortedServices.map(service => {
16+
const title = service.data.title || service.data.linkTitle || 'Unknown Service';
17+
const description = service.data.description || `Implementation details for ${title} API`;
18+
19+
const href = `/${service.id}`;
20+
21+
return {
22+
title,
23+
description,
24+
href
25+
};
26+
});
27+
---
28+
29+
<div class="service-grid">
30+
{serviceData.map(service => (
31+
<ServiceBox
32+
title={service.title}
33+
description={service.description}
34+
href={service.href}
35+
client:load
36+
/>
37+
))}
38+
</div>

0 commit comments

Comments
 (0)