Skip to content
Open
Show file tree
Hide file tree
Changes from 59 commits
Commits
Show all changes
112 commits
Select commit Hold shift + click to select a range
91472ba
New landing page
mjpost Jul 14, 2026
7a12575
"Compact, warmer revision"
mjpost Jul 14, 2026
caa754c
Compute stats in python, not hugo
mjpost Jul 14, 2026
6716674
Third refresh
mjpost Jul 14, 2026
50ee4ae
Remove welcome title
mjpost Jul 14, 2026
8699a4d
black
mjpost Jul 14, 2026
7dd1c6a
Merge remote-tracking branch 'origin/master' into landing-page
mjpost Jul 15, 2026
9d3e180
Pull out paper count
mjpost Jul 15, 2026
02b11e6
Consolidating features
mjpost Jul 15, 2026
2f4243a
Restore "years covered"
mjpost Jul 15, 2026
229f9a1
Remove dead space and replace Filter label
mjpost Jul 15, 2026
0657f6f
Count all venues, not just top-level ones
mjpost Jul 15, 2026
ac4c28f
Add per-venue "..." affordance
mjpost Jul 15, 2026
60022d2
Remove affordance if all years are displayed
mjpost Jul 15, 2026
3ff0574
Fix homepage venue_count to use top-level venues
Copilot Jul 15, 2026
1d7c720
Restore full venue count and fix test
mjpost Jul 15, 2026
4892722
Restore side-by-side behavior
mjpost Jul 15, 2026
4e77704
Front "All"
mjpost Jul 15, 2026
533f824
Add a box with recently ingested events
mjpost Jul 15, 2026
0b51e16
Ensmallen everything
mjpost Jul 15, 2026
e8bc9d3
Embiggen fonts
mjpost Jul 15, 2026
4b5c349
Add more glaring preview border
mjpost Jul 15, 2026
e8e0e27
Restore original palette
mjpost Jul 15, 2026
ffe6d59
Add EarlyMT to the top level so papers show
mjpost Jul 15, 2026
d1fd223
Muted red-based scheme
mjpost Jul 15, 2026
d5b34d1
Reduce the red a bit
mjpost Jul 15, 2026
9144577
Restore button colors
mjpost Jul 15, 2026
5339a24
Just a touch of color
mjpost Jul 15, 2026
dbc79d8
Reformat SIG block
mjpost Jul 15, 2026
843cd0f
Add a bit of muted color to headers
mjpost Jul 15, 2026
63d08bb
Head backgrounds
mjpost Jul 15, 2026
d5e7f17
Test colors for Nathan
mjpost Jul 16, 2026
7a85c48
Restore red
mjpost Jul 16, 2026
5c8e44f
Change year range
mjpost Jul 16, 2026
46b3571
int
mjpost Jul 16, 2026
e3d9ba7
Remove year links count
mjpost Jul 16, 2026
1890aff
Search over all venues
mjpost Jul 16, 2026
c553803
Change filter text
mjpost Jul 16, 2026
7b6a9e6
Inflect noun properly
mjpost Jul 16, 2026
fe087dd
Two-toned headers with muted button colors
mjpost Jul 16, 2026
e770e82
Restore bright buttons and incorpoate those colors into two-tone head…
mjpost Jul 16, 2026
24a8e46
Add click-to-dismiss for the site preview warning
mjpost Jul 16, 2026
2d81c2f
Fix blue in intro header
mjpost Jul 16, 2026
ab1eaf8
Fix text
mjpost Jul 16, 2026
3ad5cb0
Fix ellipsis spacing
mjpost Jul 16, 2026
d1367e8
Fix hover highlight inconsistency
mjpost Jul 16, 2026
c4274cd
Equalize font size
mjpost Jul 16, 2026
7c381c3
Dark red top border
mjpost Jul 16, 2026
ccfdd93
Merge remote-tracking branch 'origin/master' into landing-page
mjpost Jul 17, 2026
a84a990
Make left col 20% of width
mjpost Jul 17, 2026
c5c44ca
Justify left text
mjpost Jul 17, 2026
d5d81d5
Revert column width change
mjpost Jul 17, 2026
5b94b4a
inflect()
mjpost Jul 19, 2026
b03e9e9
Merge branch 'master' into landing-page
mjpost Jul 20, 2026
76f7ebf
Merge remote-tracking branch 'origin/master' into landing-page
mjpost Jul 21, 2026
7074e24
Remove text justification style
mjpost Jul 21, 2026
e95c467
Merge remote-tracking branch 'origin/master' into landing-page
mjpost Jul 21, 2026
c645a61
Remove hyphenization
mjpost Jul 21, 2026
1cfad42
Merge remote-tracking branch 'origin/master' into landing-page
mjpost Jul 22, 2026
bc70c80
Change text color to white
mjpost Jul 26, 2026
ed553b4
Merge remote-tracking branch 'origin/master' into landing-page
mjpost Jul 27, 2026
71967be
Extract colors into separate file
mjpost Jul 28, 2026
4a982b0
Explicit test against min()
mjpost Jul 28, 2026
1359972
black
mjpost Jul 28, 2026
6bd9a42
"Search all X venues..."
mjpost Jul 28, 2026
1aa8a15
Add robots.txt for previews
mjpost Jul 28, 2026
859c30f
Fix width of venue column
mjpost Jul 28, 2026
3857693
Merge remote-tracking branch 'origin/master' into landing-page
mjpost Jul 28, 2026
105db18
Wrap venue text
mjpost Jul 28, 2026
c37940c
Add min-width
mjpost Jul 28, 2026
a683e19
Simplify subtract_months
mjpost Jul 28, 2026
a598c54
Add leap year test
mjpost Jul 28, 2026
faec29d
Merge remote-tracking branch 'origin/master' into landing-page
mjpost Jul 28, 2026
8fdefc8
Link color, vertical space, remove button icons
mjpost Jul 30, 2026
3027377
Filter count to right of filter bar
mjpost Jul 30, 2026
811d28a
Merge venues, fill space with year boxes
mjpost Jul 30, 2026
36d3e9d
Add blank space for non-ACL venues
mjpost Jul 30, 2026
b5eee4d
Move marker before text
mjpost Jul 30, 2026
b4f78a6
Move filter bar inside Venues box
mjpost Jul 30, 2026
ec1d8e2
Sort parent events first
mjpost Jul 30, 2026
175c73f
Restore the cramped look of the original
mjpost Jul 30, 2026
6355f2c
black
mjpost Jul 30, 2026
6f51a86
Thinner boxes around years
mjpost Jul 30, 2026
8eba82d
Remove year boxes
mjpost Jul 30, 2026
3760028
Fill more of the window width on wide screens
mjpost Jul 30, 2026
e938eaf
Consolidate headers
mjpost Jul 30, 2026
285489f
More space after venue ID
mjpost Jul 30, 2026
099b087
Smaller numbers on mobile
mjpost Jul 30, 2026
da06c33
Remove = sign
mjpost Jul 30, 2026
0f4dd06
Restore header colors, gray full venue name, fix ellipses
mjpost Jul 30, 2026
822e96a
Colorize newly-ingested years
mjpost Jul 30, 2026
a89a5de
Change header bar and highlight colors
mjpost Jul 30, 2026
694e87b
Change colors
mjpost Jul 30, 2026
dcffa5b
Add top border
mjpost Jul 30, 2026
7b9b728
Link to feedback page in the FAQ
mjpost Jul 30, 2026
dd93a1f
Left-align years
mjpost Jul 31, 2026
4da34bd
Merge remote-tracking branch 'origin/master' into landing-page
mjpost Jul 31, 2026
b01912c
Align from the left to right-aligned spots
mjpost Jul 31, 2026
ba7cc6b
Right-aligned years grid, per-row left-aligned placement
mjpost Jul 31, 2026
e900c77
Stop wrapping venue IDs
mjpost Jul 31, 2026
a673f27
Years now globally left-aligned; JEP/TALN/RECITAL breaks
mjpost Jul 31, 2026
eadfea7
New four-grouping of venues
mjpost Jul 31, 2026
8744f56
Fix center margin gap
mjpost Jul 31, 2026
c011c7d
Attempt to fix vertical alignment above and below buttons
mjpost Aug 1, 2026
7211149
Address microscopic baseline alignment issue observed by eagle-eyed e…
mjpost Aug 1, 2026
c1db29b
• -> ▪
mjpost Aug 1, 2026
a0f69be
Fix year expansion alignment issue
mjpost Aug 1, 2026
a270125
Diacritic-agnostic search, allow *
mjpost Aug 1, 2026
0521212
Add blog post
mjpost Aug 1, 2026
2b5cb5f
Fix bottom cropping of year filter buttons
mjpost Aug 1, 2026
c2f64c8
Rewording
mjpost Aug 1, 2026
dc378c2
Put recent announcements on the main page
mjpost Aug 1, 2026
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
97 changes: 94 additions & 3 deletions bin/create_hugo_data.py
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,9 @@
"""

from docopt import docopt
from calendar import monthrange
from collections import Counter
from datetime import date
from functools import cache
import logging as log
import msgspec
Expand All @@ -50,6 +52,7 @@

from acl_anthology import Anthology, config, primary_console
from acl_anthology.collections.paper import PaperDeletionType
from acl_anthology.collections.types import EventLink
from acl_anthology.collections.volume import VolumeType
from acl_anthology.constants import UNKNOWN_INGEST_DATE
from acl_anthology.utils.logging import setup_rich_logging
Expand Down Expand Up @@ -273,10 +276,95 @@ def volume_to_dict(volume):
return data


def export_papers_and_volumes(anthology, builddir, dryrun):
def subtract_months(value, months):
"""Return a date shifted back by a number of calendar months."""
month_index = value.year * 12 + value.month - 1 - months
year, zero_based_month = divmod(month_index, 12)
month = zero_based_month + 1
day = min(value.day, monthrange(year, month)[1])
return date(year, month, day)
Comment thread
mjpost marked this conversation as resolved.
Outdated


def recent_top_level_events(anthology, current_date=None):
"""Return top-level events ingested within the past three months."""
current_date = current_date or date.today()
cutoff = subtract_months(current_date, 3)
recent_events = []

explicitly_colocated_ids = {
volume_id
for event in anthology.events.values()
for volume_id, link_type in event.colocated_ids.items()
if link_type == EventLink.EXPLICIT
}

for event in anthology.events.values():
venue_id, year = event.id.rsplit("-", 1)
venue = anthology.venues.get(venue_id)
if venue_id == "ws" or venue is None or not venue.is_toplevel:
continue

own_volume_ids = {
volume_id
for volume_id, link_type in event.colocated_ids.items()
if link_type == EventLink.INFERRED
}
if own_volume_ids & explicitly_colocated_ids:
continue

ingest_date = max(
(volume.ingest_date for volume in event.volumes()), default=None
)
if ingest_date is None or not cutoff <= ingest_date <= current_date:
continue

recent_events.append(
{
"id": event.id,
"label": f"{venue.acronym} {year}",
"ingest_date": ingest_date.isoformat(),
}
)

return sorted(
recent_events,
key=lambda event: (event["ingest_date"], event["label"]),
reverse=True,
)


def homepage_stats(anthology, current_date=None):
"""Compute collection statistics displayed on the homepage."""
volumes = list(anthology.volumes())
all_venues = list(anthology.venues.values())
top_level_venues = [venue for venue in all_venues if venue.is_toplevel]

return {
"paper_count": sum(1 for _ in anthology.papers()),
"volume_count": len(volumes),
"venue_count": len(all_venues),
"venue_year_count": sum(
len({volume.year for volume in venue.volumes()}) for venue in top_level_venues
),
"oldest_year": min(volume.year for volume in volumes),
"newest_year": max(volume.year for volume in volumes),
"recent_events": recent_top_level_events(anthology, current_date),
}


def export_homepage_stats(anthology, builddir, dryrun):
data = homepage_stats(anthology)
if not dryrun:
with open(f"{builddir}/data/homepage.json", "wb") as f:
f.write(ENCODER.encode(data))
return data


def export_papers_and_volumes(anthology, builddir, dryrun, paper_count=None):
all_volumes = {}
with make_progress() as progress:
paper_count = sum(1 for _ in anthology.papers())
if paper_count is None:
paper_count = sum(1 for _ in anthology.papers())
task = progress.add_task("Exporting papers...", total=paper_count)
for collection in anthology.collections.values():
collection_papers = {}
Expand Down Expand Up @@ -596,7 +684,10 @@ def export_anthology(anthology, builddir, clean=False, dryrun=False):
if not check_directory(target_dir, clean=clean):
return

export_papers_and_volumes(anthology, builddir, dryrun)
stats = export_homepage_stats(anthology, builddir, dryrun)
export_papers_and_volumes(
anthology, builddir, dryrun, paper_count=stats["paper_count"]
)
export_people(anthology, builddir, dryrun)
export_venues(anthology, builddir, dryrun)
export_events(anthology, builddir, dryrun)
Expand Down
1 change: 1 addition & 0 deletions data/yaml/venues/earlymt.yaml
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
acronym: EarlyMT
name: Pre-1980 MT conferences
is_toplevel: true
Loading
Loading