@grove-dev/astro 0.3.2 → 0.4.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/lib/index.d.ts +1 -0
- package/dist/lib/index.d.ts.map +1 -1
- package/dist/lib/index.js +1 -0
- package/dist/lib/index.js.map +1 -1
- package/dist/lib/load-collections.d.ts +12 -0
- package/dist/lib/load-collections.d.ts.map +1 -0
- package/dist/lib/load-collections.js +34 -0
- package/dist/lib/load-collections.js.map +1 -0
- package/package.json +5 -4
- package/src/components/CollectionIndex.astro +72 -0
- package/src/components/CollectionPage.astro +89 -0
- package/src/components/CollectionRow.astro +109 -0
- package/src/components/CollectionTeaser.astro +81 -0
- package/src/components/CurationGrid.astro +2 -2
- package/src/components/GroveDocumentHead.astro +28 -0
- package/src/components/Hero.astro +0 -1
- package/src/components/Icon.astro +4 -18
- package/src/components/IndexRow.astro +5 -5
- package/src/components/ItemCard.astro +15 -27
- package/src/components/RefinePanel.astro +2 -2
- package/src/components/SmartLensTabs.astro +4 -1
- package/src/layouts/BaseLayout.astro +11 -7
- package/src/layouts/Footer.astro +2 -2
- package/src/lib/index.ts +1 -0
- package/src/lib/load-collections.ts +33 -0
- package/src/server/collections.test.ts +190 -0
- package/src/server/collections.ts +197 -0
- package/src/server/index.ts +1 -0
- package/src/server/models.ts +5 -1
package/src/server/models.ts
CHANGED
|
@@ -19,6 +19,7 @@ import {
|
|
|
19
19
|
formatStars,
|
|
20
20
|
getOwnerAndRepoFromRepoUrl,
|
|
21
21
|
getOwnerAvatarUrl,
|
|
22
|
+
projectStackIds,
|
|
22
23
|
statusDisplay,
|
|
23
24
|
totalPages,
|
|
24
25
|
} from "@grove-dev/core";
|
|
@@ -42,6 +43,9 @@ export interface DirectorySiteConfig {
|
|
|
42
43
|
repoUrl?: string;
|
|
43
44
|
nav?: Array<{ label: string; href: string }>;
|
|
44
45
|
facets?: string[];
|
|
46
|
+
analytics?: {
|
|
47
|
+
googleAnalyticsId?: string;
|
|
48
|
+
};
|
|
45
49
|
footer?: {
|
|
46
50
|
columns?: Array<{
|
|
47
51
|
heading: string;
|
|
@@ -283,7 +287,7 @@ export function getRecordDetailModel(
|
|
|
283
287
|
const description = record.description ?? `${name} on ${site.name}`;
|
|
284
288
|
const repoUrl = proj?.repoUrl ?? record.links?.github ?? "";
|
|
285
289
|
const homepageUrl = record.links?.website ?? "";
|
|
286
|
-
const stacks =
|
|
290
|
+
const stacks = projectStackIds(proj);
|
|
287
291
|
const platforms = proj?.platforms ?? [];
|
|
288
292
|
const github = proj?.github?.repository;
|
|
289
293
|
const stars = github?.stargazers_count ?? 0;
|