Skip to content

Commit e5d22c7

Browse files
drmowinckelsclaude
andauthored
Paginate directory and add cross-page name search (#580)
* Paginate directory and add cross-page name search The /directory/ page rendered all 1,334 member cards into a single 2.9MB HTML file, with no loading indicator while Shuffle.js laid them out. This switches to Hugo pagination (60/page) for the default view and adds a JSON-driven filter path so search and the existing interest/language/location filters still scan the full directory. - Hugo pagination via .Paginate; pagination nav reused from the default list layout pattern - New directory/list.json output emits every entry's searchable fields plus its rendered card HTML, so the JSON-driven view doesn't need to reimplement card markup in JS - Name search input added above the existing filter dropdowns; diacritic-insensitive (NFD-normalised) so "maelle" matches "Maëlle" - Active filters and search syncing to ?q=&interests=&languages= &location= so filtered views are shareable and survive reload - Filtered results render in requestAnimationFrame batches of 20 to avoid blocking the main thread when a broad filter matches hundreds of cards - Shuffle init wrapped in try/catch and isCentered:true removed — Shuffle's __getCenteredPositions has a bug where a missed splice leaves undefined entries, causing TypeError on .includes during initial layout Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com> * Render directory bio as markdown and drop per-entry r_packages The new directory JSON schema may include a `bio` key with markdown text. Surface it as the page Content via _content.gotmpl so it renders through Hugo's markdown pipeline. Reorganise the right column card to show About above Interests/Activities (using the i18n "about" label without repeating the entry name), and only render the Activities heading when r_groups actually has entries. Drop the inline r_packages section that read from the per-entry JSON; authored packages are sourced from awesome-rladies-creations now and already render via the existing remote walk + hex-wall. Add bio fields to the Grace Hopper and Hedy Lamarr sample entries so the markdown rendering is exercised in the build. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com> --------- Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
1 parent b438ab7 commit e5d22c7

14 files changed

Lines changed: 293 additions & 70 deletions

File tree

content/directory/_content.gotmpl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{{ $.EnableAllLanguages }}
22
{{ range $key, $dirArray := site.Data.directory }}
33

4-
{{ $pageContent := "" }}
4+
{{ $pageContent := $dirArray.bio | default "" }}
55

66
{{ $imageURLScratch := newScratch }}
77

content/directory/_index.en.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,9 @@
11
---
22
title: "Directory"
33
type: "directory"
4+
outputs:
5+
- HTML
6+
- JSON
47
image:
58
path: og-image.png
69
alt: "Hexagonal photo grid of RLadies+ community members beside the message 'Find a speaker for your next event in our directory!'"

content/directory/_index.es.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,9 @@
11
---
22
title: "Directorio"
33
type: "directory"
4+
outputs:
5+
- HTML
6+
- JSON
47
---
58

69
Añádete al directorio de RLadies+ — solo toma unos minutos y tu perfil será visible para la comunidad.

content/directory/_index.fr.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,9 @@
22
title: "Membres"
33
type: "directory"
44
url: /fr/membres/
5+
outputs:
6+
- HTML
7+
- JSON
58
---
69

710
Ajoutez-vous au répertoire RLadies+ — cela ne prend que quelques minutes et votre profil sera visible par la communauté.

content/directory/_index.pt.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,9 @@
11
---
22
title: "Diretório"
33
type: "directory"
4+
outputs:
5+
- HTML
6+
- JSON
47
---
58

69
Adicione-se ao diretório RLadies+ — leva apenas alguns minutos e seu perfil ficará visível para a comunidade.

data/directory/sample-grace-hopper.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
{
22
"name": "Grace Hopper (Sample Entry)",
33
"honorific": "PhD, Rear Admiral",
4+
"bio": "Grace was a pioneering computer scientist and a **Rear Admiral** in the United States Navy. She is credited with popularising the term *debugging* and contributed to the development of [COBOL](https://en.wikipedia.org/wiki/COBOL).\n\n- Authored the first compiler-related tools in the 1950s.\n- Champion of accessible programming languages.\n- Advocate for mentoring the next generation of engineers.\n\n> One of her famous sayings: \"The most dangerous phrase in the language is, 'we've always done it this way.'\"",
45
"categories": ["Sample", "Speaker", "Mentor"],
56
"location": {
67
"city": "Arlington",

data/directory/sample-hedy-lamarr.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
{
22
"name": "Hedy Lamarr (Sample Entry)",
33
"categories": ["Sample", "Speaker"],
4+
"bio": "Hedy was an Austrian-American actress and inventor. With composer George Antheil she co-invented an early version of [frequency-hopping spread spectrum](https://en.wikipedia.org/wiki/Frequency-hopping_spread_spectrum) communication, a technique that underpins many modern wireless systems.\n\nShe held a US patent for the design and was inducted into the **National Inventors Hall of Fame** in 2014.",
45
"location": {
56
"country": "Austria"
67
},

i18n/en.yaml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,8 @@ filter_languages: 'Filter by languages'
5454
search_languages: 'Search languages...'
5555
filter_location: 'Filter by location'
5656
search_location: 'Search location...'
57+
search_directory: 'Search by name…'
58+
no_results: 'No members match your filters.'
5759
preferred_contact: 'Preferred contact'
5860
connect: 'Connect'
5961
last_updated: 'Last updated'

i18n/es.yaml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,8 @@ filter_languages: 'Filtrar por idiomas'
5454
search_languages: 'Buscar idiomas...'
5555
filter_location: 'Filtrar por ubicación'
5656
search_location: 'Buscar ubicación...'
57+
search_directory: 'Buscar por nombre…'
58+
no_results: 'Ningún miembro coincide con tus filtros.'
5759
preferred_contact: 'Contacto preferido'
5860
connect: 'Conectar'
5961
last_updated: 'Última actualización'

i18n/fr.yaml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,8 @@ filter_languages: 'Filtrer par langues'
5454
search_languages: 'Rechercher des langues...'
5555
filter_location: 'Filtrer par localisation'
5656
search_location: 'Rechercher une localisation...'
57+
search_directory: 'Rechercher par nom…'
58+
no_results: 'Aucun membre ne correspond à vos filtres.'
5759
preferred_contact: 'Contact préféré'
5860
connect: 'Connecter'
5961
last_updated: 'Dernière mise à jour'

0 commit comments

Comments
 (0)