Skip to content

updated social transformer library and updated team members. #50

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 13 additions & 4 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
},
"dependencies": {
"@astrojs/check": "^0.9.4",
"@fujocoded/zod-transform-socials": "^0.0.11",
"@iconify-json/fa6-brands": "^1.2.5",
"@iconify-json/fa6-solid": "^1.1.20",
"@iconify-json/logos": "^1.1.42",
Expand All @@ -24,8 +25,7 @@
},
"devDependencies": {
"prettier": "^3.2.5",
"prettier-plugin-astro": "^0.14.1",
"social-links": "^1.14.0"
"prettier-plugin-astro": "^0.14.1"
},
"engines": {
"node": ">=20.0.0"
Expand Down
34 changes: 18 additions & 16 deletions src/components/TeamMemberCard.astro
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
import type { ImageMetadata } from "astro";

import { Icon } from "astro-icon/components";
import type { SocialsData } from "../lib/socials-transformer";
import type { SocialLinksData } from "@fujocoded/zod-transform-socials";
import type { CollectionEntry } from "astro:content";
import type { Project } from "../content/config";

Expand All @@ -12,7 +12,7 @@ interface Props {
avatar: ImageMetadata;
roles: CollectionEntry<"team">["data"]["roles"];
project?: Project | undefined;
contacts: SocialsData[];
contacts: SocialLinksData[];
}

const props = Astro.props;
Expand All @@ -39,7 +39,6 @@ const props = Astro.props;
</ul>
) : (
Object.keys(props.roles).map(
// @ts-expect-error
(project: Project) =>
!!props.roles[project].length && (
<li>
Expand All @@ -64,19 +63,22 @@ const props = Astro.props;
<ul class:list={{ hidden: props.contacts.length == 0 }} class="contacts">
{
props.contacts.map((contact) => (
<li>
<a href={contact.url}>
{contact.icon ? (
<>
<Icon name={contact.icon} />
</>
) : (
<>
<Icon name={"lucide:home"} />
</>
)}
</a>
</li>
<li>
<a href={contact.url}>
{contact.icon ? (
<>
<Icon name={contact.icon} title={contact.platform} />
</>
) : (
<>
<Icon
name={"lucide:home"}
title={`${props.name}'s website`}
/>
</>
)}
</a>
</li>
))
}
</ul>
Expand Down
14 changes: 3 additions & 11 deletions src/content/config.ts
Original file line number Diff line number Diff line change
@@ -1,9 +1,6 @@
import { defineCollection, z } from "astro:content";
import {
socialsSchema,
transformSocial,
type SocialsData,
} from "../lib/socials-transformer";

import { SocialLinks } from "@fujocoded/zod-transform-socials";

const Volume0Issue1Role = z.enum([
"Technical Writer",
Expand Down Expand Up @@ -44,12 +41,7 @@ const teamCollection = defineCollection({
name: z.string(),
avatar: tools.image(),
roles,
contacts: socialsSchema
.array()
.default([])
.transform(
(contacts) => contacts.map(transformSocial) as Array<SocialsData>
),
contacts: SocialLinks,
}),
});

Expand Down
11 changes: 3 additions & 8 deletions src/content/team/enigmalea.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -21,12 +21,7 @@ roles:
- Copy Writer
contacts:
- https://enigmalea.quest
- https://enigmalea.tumblr.com
- https://enigmalea.bsky.social
- url: https://easymode.im/@enigmalea
platform: firefish
username: enigmalea
- url: https://bsky.app/profile/enigmalea.quest
icon: simple-icons:bluesky
- https://archiveofourown.org/users/enigmalea
- https://github.com/enigmalea
- https://enigmalea.dreamwidth.org
- https://ko-fi.com/enigmalea
- https://enigmalea.tumblr.com
1 change: 1 addition & 0 deletions src/content/team/ria.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,3 +7,4 @@ roles:
- Additional Coding
contacts:
- https://github.com/riazaia
- https://bsky.app/profile/riazaia.bsky.social
2 changes: 1 addition & 1 deletion src/content/team/yuu.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,4 +8,4 @@ roles:
- Beta Reader
- Proofreader
contacts:
- https://where.yuu.gay/
- https://where.yuu.observer/
166 changes: 0 additions & 166 deletions src/lib/socials-transformer.ts

This file was deleted.