Add pins to main site - #635
Open
dschrempf wants to merge 4 commits into
Open
Conversation
dschrempf
marked this pull request as ready for review
August 28, 2026 08:30
Collaborator
Author
A listField over an empty list still counts as present, so `$if(...)$` is True and a template renders a section heading above no tiles. Both places that worked around this required the same guard. No change in output.
Events carried a prose `daterange` and a hand-maintained `status`, and the home page showed every event marked active. Nobody flips that field once an event is over, so five of seven events still claimed to be active and four of those had already happened. Consequence: the "front page tiles are weird choices" bias towards events (haskellfoundation#632). Replace both with `starts:` and, for a multi-day event, `ends:` as ISO dates. `EventDates` parses them, `formatDateRange` words the range the templates print, and the home page keeps only events that have not finished yet. The events index sorts by start date rather than announcement date. The cutoff is the build date, so a finished event lingers until the next push to hakyll.
The front page put open job ad, one news entry, one podcast episode and every active event into a single grid, so events crowded out everything else and there was no way to put anything specific on top. See issues "manually curated links at top" (haskellfoundation#624) and "the front page tiles are weird choices":(haskellfoundation#632). Split the grid into four bands, each hidden when it has nothing to show: the curated pins, the latest news, the events still to come, and the latest podcast episode. News goes from one entry to two, and the news and events bands link on to their index pages. Pins come from featured.markdown, an ordered list of paths of pages that exist elsewhere in the site. A pin is a pointer, never a second copy of the text. The tile shows the page's title, its summary (or its first paragraph) and a link to it. That is, news entries, job openings and events can all be pinned. A path naming no page fails the build. Anything pinned is dropped from the automatic bands below. This replaces the hard-wired band of open job ads: the front page is curated now, and a new opening is pinned by hand.
Its whole body was a pointer to the job ad, which the home page now pins directly, so the entry only stood between a reader and the thing they came for. Redirect its URL to the ad rather than dropping it: the announcement has been linked to from elsewhere. `retiredPages` feeds Hakyll's `createRedirects`, which writes a meta-refresh and rel=canonical stub at the old path.
LaurentRDC
reviewed
Aug 28, 2026
Contributor
There was a problem hiding this comment.
Having this be a news item is nice because it signifies a change. If we just added a job posting, I'm not sure it would get the same amount of attention
Contributor
There was a problem hiding this comment.
Nevermind, I see it can be "featured"
Comment on lines
+76
to
+80
| retiredPages :: [(Identifier, String)] | ||
| retiredPages = | ||
| -- Was an announcement whose only content was a pointer to the job ad; the | ||
| -- ad is now pinned on the home page directly (see 'featuredCuration'). | ||
| [("news/2026-08-10/head-of-development.html", "/careers/head-of-development.html")] |
Contributor
There was a problem hiding this comment.
Just to prevent this added complexity, we might as well add the head-of-development news item back in
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

This PR introduces featured articles (i.e., pins).
In detail,
For details, see the commit messages.
I think the next step is to reduce white space of the tiles. I will wait until this PR has been discussed and merged before going on.
Checklist