From 25ba004afeaaac60e3b4874c21acf306b7a8797c Mon Sep 17 00:00:00 2001 From: George Cushen Date: Sun, 17 Aug 2025 22:56:49 +0100 Subject: [PATCH] feat: add support for pronouns Close #3190 --- .github/workflows/build-test-site.yaml | 6 +++--- .../blox-plugin-decap-cms/data/decap_cms_config.yaml | 1 + .../layouts/_partials/blox/resume-biography-3.html | 3 +++ .../layouts/_partials/blox/resume-biography.html | 3 +++ .../layouts/_partials/page_author_card.html | 11 ++++++++--- starters/academic-cv/content/authors/admin/_index.md | 3 +++ starters/blog/content/authors/admin/_index.md | 3 +++ .../documentation/content/authors/admin/_index.md | 3 +++ starters/landing-page/content/authors/admin/_index.md | 3 +++ starters/link-in-bio/content/authors/admin/_index.md | 3 +++ starters/resume/content/authors/admin/_index.md | 3 +++ 11 files changed, 36 insertions(+), 6 deletions(-) diff --git a/.github/workflows/build-test-site.yaml b/.github/workflows/build-test-site.yaml index 1779101b..3d996f80 100644 --- a/.github/workflows/build-test-site.yaml +++ b/.github/workflows/build-test-site.yaml @@ -34,11 +34,11 @@ jobs: - recursive: false args: [--frozen-lockfile] - - name: Install Tailwind v4 dependencies + - name: Install Tailwind v4 dependencies for test site run: | - cd modules/blox-tailwind + cd test pnpm install --frozen-lockfile - cd ../.. + cd .. - name: Check for linting errors run: pnpm run lint:js # TODO: also lint styles again once new rule errors resolved diff --git a/modules/blox-plugin-decap-cms/data/decap_cms_config.yaml b/modules/blox-plugin-decap-cms/data/decap_cms_config.yaml index fbb7af36..61d22189 100644 --- a/modules/blox-plugin-decap-cms/data/decap_cms_config.yaml +++ b/modules/blox-plugin-decap-cms/data/decap_cms_config.yaml @@ -16,6 +16,7 @@ collections: - {label: "Display name (such as your full name)", name: "title", widget: "string"} - {label: "First name", name: "first_name", widget: "string", required: false} - {label: "Last name", name: "last_name", widget: "string", required: false} + - {label: "Pronouns (e.g., she/her, he/him, they/them)", name: "pronouns", widget: "string", required: false} - {label: "Position or tagline (such as Professor of AI)", name: "role", widget: "string", required: false} - label: "Avatar (upload an image named `avatar.jpg/png`)" name: "avatar_filename" diff --git a/modules/blox-tailwind/layouts/_partials/blox/resume-biography-3.html b/modules/blox-tailwind/layouts/_partials/blox/resume-biography-3.html index 6edc0f67..db12d682 100644 --- a/modules/blox-tailwind/layouts/_partials/blox/resume-biography-3.html +++ b/modules/blox-tailwind/layouts/_partials/blox/resume-biography-3.html @@ -62,6 +62,9 @@ {{- $person_page.Title -}} {{- end -}} + {{- with $person.pronouns -}} +
({{ . }})
+ {{- end -}} {{ with $person.role }}

{{ . | markdownify | emojify }}

{{ end }} diff --git a/modules/blox-tailwind/layouts/_partials/blox/resume-biography.html b/modules/blox-tailwind/layouts/_partials/blox/resume-biography.html index eebfafc2..22112ce9 100644 --- a/modules/blox-tailwind/layouts/_partials/blox/resume-biography.html +++ b/modules/blox-tailwind/layouts/_partials/blox/resume-biography.html @@ -56,6 +56,9 @@ {{- $person_page.Title -}} {{- end -}} + {{- with $person.pronouns -}} +
({{ . }})
+ {{- end -}} {{ with $person.role }}

{{ . | markdownify | emojify }}

{{ end }} diff --git a/modules/blox-tailwind/layouts/_partials/page_author_card.html b/modules/blox-tailwind/layouts/_partials/page_author_card.html index d62cd62d..ca05b767 100644 --- a/modules/blox-tailwind/layouts/_partials/page_author_card.html +++ b/modules/blox-tailwind/layouts/_partials/page_author_card.html @@ -30,9 +30,14 @@ {{ i18n "authors" }}
- {{if $profile_url}}{{end}} - {{$author_page.Title}} - {{if $profile_url}}{{end}} + + {{if $profile_url}}{{end}} + {{$author_page.Title}} + {{if $profile_url}}{{end}} + + {{- with $author_page.Params.pronouns -}} + ({{ . }}) + {{- end -}}
{{ with $author_page.Params.role }} diff --git a/starters/academic-cv/content/authors/admin/_index.md b/starters/academic-cv/content/authors/admin/_index.md index 16ed1118..456791c8 100644 --- a/starters/academic-cv/content/authors/admin/_index.md +++ b/starters/academic-cv/content/authors/admin/_index.md @@ -9,6 +9,9 @@ name_pronunciation: Chien Shiung Wu first_name: Shiung Wu last_name: Chien +# Pronouns (optional) +pronouns: she/her + # Status emoji status: icon: ☕️ diff --git a/starters/blog/content/authors/admin/_index.md b/starters/blog/content/authors/admin/_index.md index ebc5fefb..ae0712e7 100644 --- a/starters/blog/content/authors/admin/_index.md +++ b/starters/blog/content/authors/admin/_index.md @@ -9,6 +9,9 @@ name_pronunciation: Chien Shiung Wu first_name: Shiung Wu last_name: Chien +# Pronouns (optional) +pronouns: she/her + # Status emoji status: icon: ☕️ diff --git a/starters/documentation/content/authors/admin/_index.md b/starters/documentation/content/authors/admin/_index.md index ebc5fefb..ae0712e7 100644 --- a/starters/documentation/content/authors/admin/_index.md +++ b/starters/documentation/content/authors/admin/_index.md @@ -9,6 +9,9 @@ name_pronunciation: Chien Shiung Wu first_name: Shiung Wu last_name: Chien +# Pronouns (optional) +pronouns: she/her + # Status emoji status: icon: ☕️ diff --git a/starters/landing-page/content/authors/admin/_index.md b/starters/landing-page/content/authors/admin/_index.md index ebc5fefb..ae0712e7 100644 --- a/starters/landing-page/content/authors/admin/_index.md +++ b/starters/landing-page/content/authors/admin/_index.md @@ -9,6 +9,9 @@ name_pronunciation: Chien Shiung Wu first_name: Shiung Wu last_name: Chien +# Pronouns (optional) +pronouns: she/her + # Status emoji status: icon: ☕️ diff --git a/starters/link-in-bio/content/authors/admin/_index.md b/starters/link-in-bio/content/authors/admin/_index.md index 91a68b4c..8d86c24e 100644 --- a/starters/link-in-bio/content/authors/admin/_index.md +++ b/starters/link-in-bio/content/authors/admin/_index.md @@ -9,6 +9,9 @@ name_pronunciation: Chien Shiung Wu first_name: Shiung Wu last_name: Chien +# Pronouns (optional) +pronouns: she/her + # Status emoji status: icon: ☕️ diff --git a/starters/resume/content/authors/admin/_index.md b/starters/resume/content/authors/admin/_index.md index 8249d537..0374e0e9 100644 --- a/starters/resume/content/authors/admin/_index.md +++ b/starters/resume/content/authors/admin/_index.md @@ -9,6 +9,9 @@ name_pronunciation: Chien Shiung Wu first_name: Shiung Wu last_name: Chien +# Pronouns (optional) +pronouns: she/her + # Status emoji status: icon: ☕️