feat: add Markdown export for conference and workshop pages - #23
feat: add Markdown export for conference and workshop pages#23MaddulaPavan wants to merge 2 commits into
Conversation
Yeping-Hu
left a comment
There was a problem hiding this comment.
Thanks for this — it's a genuinely useful idea, and the implementation is clean: a pure formatter separated from the UI, no new dependencies, no backend. I'd like to take it, with some changes.
Numbers below are from merging your branch into current main and building, so they reflect where the repo is now rather than where it was when you branched.
The main thing: page weight
The Markdown for every section is embedded in the HTML as a data attribute, and each section carries it twice (Copy and Download each hold their own copy):
| page | total | markdown payload | share |
|---|---|---|---|
/conference/neurips/ |
411,317 B | 289,132 B | 70.3% |
/conference/iros/ |
159,495 B | 105,914 B | 66.4% |
| a workshop page | 16,785 B | 884 B | 5.3% |
That NeurIPS page is ~119 KB on main today, so it more than triples, and every visitor downloads the export text whether or not they use it.
The fix fits a pattern already in the repo: generate the Markdown as build output rather than embedding it, the same way src/pages/feeds/[feed].ics.ts emits 256 calendar feeds and src/pages/api/workshops.json.ts emits JSON. Download becomes a plain link to /exports/neurips-2026-workshops.md; Copy does a fetch() on the same URL. That drops ~289 KB from the page and removes the duplication. It's 24 files, one per conference-year, regenerated on every deploy with no manual upkeep. There's a short write-up of the convention under "What the JSON API exposes for deadlines" in docs/ARCHITECTURE.md.
Given that, could we split this into two PRs? The per-workshop copy link is only 884 bytes and good as-is — I'd like to merge that quickly, separately from the conference-level export.
Fixes for the per-workshop part
-
Drop
notesfrom the output (or filter the boilerplate). 889 of 898 entries havenotes: "Topics were auto-suggested and may be imprecise — edits welcome.", so nearly every export ends with that maintenance note presented as the workshop's Description. -
Include
abstract_deadline. This landed after you branched: ~3% of venues gate submission behind a mandatory abstract registration before the paper deadline. I decoded the export forneurips-2026-ascion the merged branch — it containsAug 29and no mention ofAug 20or the word "Abstract" anywhere, so anyone pasting that into an assistant gets a deadline nine days later than the real gate. This one I'd treat as a correctness bug rather than a nice-to-have. -
Theming.
--link,--link-hover,--textand--font-sansaren't defined in this codebase, so the link falls back to#2563eband renders blue while every other link on the site isvar(--accent)green. Dark mode is also keyed on@media (prefers-color-scheme: dark), but the site themes via:root[data-theme="dark"], so a manual theme toggle won't be honoured.var(--accent)/var(--warn)and the[data-theme]selector should cover it. -
Real Markdown.
Status\nOpen callis a single newline, so Markdown renders it as one paragraph ("Status Open call").**Status:** Open callor a list would fix it. -
Optional, but worth considering: there's now a
deadline_historyfield carrying an append-only log of observed deadline values. A line like "extended by 5 days on 2026-08-04" would give a reader (or an LLM) useful context about how settled a deadline is. Entirely your call — unlike the abstract deadline, nothing is wrong without it.
A short test for markdown.ts would be welcome too — it's a pure function, and CI already runs 16 scripts/*_test.mjs files.
The non-feature changes
I'd rather see these in their own PR:
- The
--root-selectorquoting fix for Windows is a good catch and I'll happily take it. - Copying the Pagefind index into
site/public/means the nextastro buildcopies the previous index intodist/before regenerating, so stale index files can accumulate locally. CI is a fresh checkout so production isn't affected, but it makes local builds non-idempotent — worth discussing separately. .gitignoreaddingsite/.astro/: that directory is tracked and actively maintained — I committed a regeneration ofsite/.astro/content.d.tslast week after bumping Astro to 7.1.6, since Dependabot doesn't run a build. Ignoring the directory would hide that the file needs regenerating on the next upgrade.
One more note
The view-transition handling (global click delegation, non-bubbling MouseEvent to dodge router interception) is solving a problem this site doesn't have — there's no ClientRouter/ViewTransitions anywhere in src/. Not harmful, but a plain listener would be simpler if you'd rather drop it.
You'll also need a rebase: main is 36 commits ahead, including 6 commits to conference/[conf].astro and 4 to workshop/[slug].astro. It still merges cleanly — I checked — but the conference listing is now a two-column grid with full workshop titles under each acronym, and the workshop page carries an abstract-deadline line plus a deadline-history section, so it's worth confirming your component still sits where you intended.
Thanks again for a well-described PR — and happy to take on the build-output route myself if you'd rather not, since it leans on repo conventions you'd have no reason to know.
5069888 to
47b349e
Compare
|
Thanks for the detailed review @Yeping-Hu! As requested, I've split this into two parts. This PR (#23) now focuses strictly on the per-workshop export (
The conference-level export using static build outputs ( |
Summary & Goal
This PR adds client-side Markdown Export & Sharing capabilities for both conference edition pages and individual workshop pages. The feature allows users to instantly copy or download comprehensive workshop information formatted specifically for use with AI assistants (ChatGPT, Claude, Gemini, Copilot, Cursor, etc.) without needing to manually copy dozens of individual pages.
The implementation is 100% client-side, requiring no backend or API changes, adhering strictly to the repository's static-site design philosophy.
Key Features Implemented
1. Conference Edition Export (
/conference/[conf])NeurIPS 2026,NeurIPS 2025).safety-alignment) to human-readable labels (e.g.,- Safety and Alignment) usingtopicById.{conf-id}-{year}-workshops.md(e.g.,neurips-2026-workshops.md).2. Individual Workshop Export (
/workshop/[slug]).linkrowheader alongside existing links (OpenReview venue ↗,✎ Edit this entry).variant="link"to match native link font size, link color, hover transitions, and text decoration.✓ Copied!green confirmation.Technical & Architecture Details
site/src/lib/markdown.ts): Keeps Markdown generation logic decoupled from UI components.MarkdownExport.astro): Uses a global delegated click listener (document.addEventListener('click')) so export handlers continue working seamlessly across Astro View Transitions client-side page navigations.MouseEvents (bubbles: false), preventing client-side routers from intercepting file saves as tab navigations.\"[data-pf-ws]\") inpackage.jsonbuild scripts and added automated Pagefind indexing sync topublic/pagefind/so local development (npm run dev) works seamlessly alongside production builds (npm run build).Verification & Testing
npm run devandnpm run build.pagefindandpagefind-papers)..mddownloads across multiple browser sessions.