diff --git a/_includes/pubs.html b/_includes/pubs.html index a277b34..32789a1 100644 --- a/_includes/pubs.html +++ b/_includes/pubs.html @@ -1,27 +1,101 @@ -

This list is not guaranteed to be up to date, but the lab's complete publications can be found here.

+{%- comment -%} + Publications list rendered from _data/publications.yaml (auto-populated + weekly by scholar_scraper.py from Google Scholar). + + Features: + - Each title links to the paper's URL when one is present in the data. + - Lab member authors are bold. The set of "lab last names" is built + from _data/people.yml (PI + all roles, current and former), so + adding/removing a member there propagates here automatically. + - Auto-derived type badge (journal / preprint / conference) based + on the venue string — no extra data entry required. + - Year-filter chips at the top let visitors narrow to a single year. +{%- endcomment -%} + +{%- assign all_lab_people = "" | split: "" -%} +{%- if site.data.people.pi -%}{%- assign all_lab_people = all_lab_people | push: site.data.people.pi.name -%}{%- endif -%} +{%- for p in site.data.people.postdocs -%}{%- assign all_lab_people = all_lab_people | push: p.name -%}{%- endfor -%} +{%- for p in site.data.people.graduate_students -%}{%- assign all_lab_people = all_lab_people | push: p.name -%}{%- endfor -%} +{%- for p in site.data.people.research_associates -%}{%- assign all_lab_people = all_lab_people | push: p.name -%}{%- endfor -%} +{%- for p in site.data.people.undergraduates -%}{%- assign all_lab_people = all_lab_people | push: p.name -%}{%- endfor -%} + +{%- comment -%} + Build "first-initial|last-name" keys (e.g. "J|Pearson") so matching is + tighter than last-name-only — keeps Amanda Li from being bolded just + because Thomas Li is a former undergrad. +{%- endcomment -%} +{%- assign lab_keys = "" | split: "" -%} +{%- for full_name in all_lab_people -%} + {%- assign parts = full_name | split: " " -%} + {%- assign first = parts | first -%} + {%- assign last = parts | last -%} + {%- assign initial = first | slice: 0, 1 -%} + {%- assign key = initial | append: "|" | append: last -%} + {%- assign lab_keys = lab_keys | push: key -%} +{%- endfor -%} + +

This list is not guaranteed to be up to date, but the lab's complete publications can be found here.

+ {% assign sorted_pubs = site.data.publications | group_by_exp:'item', 'item.issued.first.year' | sort: 'name' | reverse %} + + +
{% for year in sorted_pubs %} -

{{ year.name }}

-
    - {% for pub in year.items %} -
  1. - {{ pub.title }} -
    - {% for aa in pub.author %} - {% if forloop.last == true %}and {% endif %} {{ aa.given }} {{ aa.family }}{% if forloop.last == false %}, {% endif %} - {% endfor %} - ({{ year.name }}). -
    - {{ pub.container-title }} - {% if pub.volume != blank %} - {{ pub.volume}}{%if pub.issue and pub.issue != "" %}({{ pub.issue }}){% endif %} - {% endif %} -
    - {% if pub.note != blank %} - {{ pub.note}} - {% endif %} -
  2. - {% endfor %} -
+
+

{{ year.name }}

+
    + {% for pub in year.items %} + {%- assign venue_lc = pub.container-title | downcase -%} + {%- if venue_lc contains "biorxiv" or venue_lc contains "arxiv" or venue_lc contains "medrxiv" or venue_lc contains "chemrxiv" or venue_lc contains "psyarxiv" or venue_lc contains "osf preprints" -%} + {%- assign pub_type = "preprint" -%} + {%- elsif venue_lc contains "proceedings" or venue_lc contains "advances in neural" or venue_lc contains "neurips" or venue_lc contains "cosyne" or venue_lc contains "conference" -%} + {%- assign pub_type = "conference" -%} + {%- else -%} + {%- assign pub_type = "journal" -%} + {%- endif -%} +
  1. + {{ pub_type }} + {% if pub.URL and pub.URL != "" %}{{ pub.title }}{% else %}{{ pub.title }}{% endif %} +
    + {% for aa in pub.author -%} + {%- if forloop.last and forloop.first == false %}and {% endif -%} + {%- assign author_initial = aa.given | slice: 0, 1 -%} + {%- assign author_key = author_initial | append: "|" | append: aa.family -%} + {%- if lab_keys contains author_key -%}{{ aa.given }} {{ aa.family }}{%- else -%}{{ aa.given }} {{ aa.family }}{%- endif -%} + {%- if forloop.last == false %}, {% endif -%} + {%- endfor %} + ({{ year.name }}). +
    + {{ pub.container-title }} + {%- if pub.volume != blank %} {{ pub.volume }}{% if pub.issue and pub.issue != "" %}({{ pub.issue }}){% endif %}{% endif %} + {%- if pub.note != blank %} +
    {{ pub.note }} + {% endif %} +
  2. + {% endfor %} +
+
{% endfor %} +
+ + diff --git a/css/publications.css b/css/publications.css index c1f18da..404d99b 100644 --- a/css/publications.css +++ b/css/publications.css @@ -2,6 +2,53 @@ max-width: 900px; } +/* Year filter chips */ +.year-filter { + margin: 0 0 1.5em 0; + display: flex; + flex-wrap: wrap; + gap: 0.4em; +} + +.year-filter .year-chip { + padding: 0.25em 0.7em; + border: 1px solid #ccc; + background: #fff; + border-radius: 12px; + font-size: 0.9em; + cursor: pointer; + color: #444; + line-height: 1.4; +} + +.year-filter .year-chip:hover { + background: #f5f5f5; +} + +.year-filter .year-chip.active { + background: #337ab7; + color: #fff; + border-color: #337ab7; +} + +/* Per-paper venue-type badge (auto-derived from container-title) */ +.pub-badge { + display: inline-block; + padding: 0.1em 0.5em; + margin-right: 0.5em; + border-radius: 3px; + font-size: 0.7em; + font-weight: 600; + text-transform: uppercase; + vertical-align: middle; + letter-spacing: 0.04em; +} + +.pub-badge-journal { background: #e8f0fe; color: #1a73e8; } +.pub-badge-preprint { background: #fef3c7; color: #92400e; } +.pub-badge-conference { background: #f0e6ff; color: #6b21a8; } + +/* Preserve the existing tighter list spacing inside year sections. */ h3 li:not(:last-child) { margin-bottom: 0.75em; } diff --git a/lychee.toml b/lychee.toml index c373d1d..2f49b0d 100644 --- a/lychee.toml +++ b/lychee.toml @@ -22,10 +22,12 @@ user_agent = "Mozilla/5.0 (compatible; lychee-link-checker; +https://lychee.cli. # Status codes to treat as success. We're trying to catch dead links # (404) and broken servers, not paywalls or anti-bot measures. # - 200/204/206: success +# - 202: escholarship.org and some other deferred-fetch repos return +# this on a request that will succeed if you retry or wait # - 401: paywalled but exists # - 403/405/429: bot-protection / rate-limit / method-not-allowed # - 999: LinkedIn's bot-detection response -accept = [200, 204, 206, 401, 403, 405, 429, 999] +accept = [200, 202, 204, 206, 401, 403, 405, 429, 999] # Hosts to skip: # - pearsonlab.github.io: this is the site we're building. The sitemap