Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
19 commits
Select commit Hold shift + click to select a range
8a7d783
Articles: a newsletter issue as its own brick, Educators' Corner port…
LukasWallrich Nov 20, 2026
658c1f2
Articles: authors found by their profile's name, role and bio in the …
LukasWallrich Nov 20, 2026
1a26b56
Rebrand checks: allow the 17 descriptions that lose the stray space b…
LukasWallrich Nov 20, 2026
70a4e1b
Rebrand checks: a description that only lost a space inside a bracket…
LukasWallrich Nov 20, 2026
3de62b2
compare_builds: a description cut a word later counts as unchanged on…
LukasWallrich Nov 20, 2026
ce36865
Merge rebrand-doors into hc/articles2
LukasWallrich Nov 24, 2026
65be9e7
Merge rebrand-doors into PR #1243
LukasWallrich Dec 2, 2026
b251b8f
Articles: no underline under the byline's icons
LukasWallrich Dec 2, 2026
46ae7db
Articles: wide figures end at the page's edge
LukasWallrich Dec 2, 2026
1ee7483
Articles: wide figures reach the page's edge from 1241 px
LukasWallrich Dec 2, 2026
f31c7cb
Articles: keep Reviewer Zero's logo, and FORRT's own logo stays small
LukasWallrich Dec 2, 2026
25aafaa
Move the doors folders' contents into their parents, as on rebrand-doors
LukasWallrich Dec 2, 2026
b498526
Merge rebrand-doors
LukasWallrich Dec 2, 2026
281cde2
Merge remote-tracking branch 'origin/rebrand-doors' into HEAD
LukasWallrich Dec 3, 2026
f0ba25a
Leave newsletter posts as they are
LukasWallrich Dec 3, 2026
f4ae73e
Merge remote-tracking branch 'origin/rebrand-doors' into HEAD
LukasWallrich Dec 3, 2026
6898d62
Merge remote-tracking branch 'origin/rebrand-doors' into HEAD
LukasWallrich Dec 3, 2026
b303a54
Articles: keep short openings plain, the author card on phones to Edu…
LukasWallrich Dec 3, 2026
ab4b568
Articles: figures and notes follow the 640 px text measure
LukasWallrich Dec 3, 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
40 changes: 40 additions & 0 deletions assets/css/article.css
Original file line number Diff line number Diff line change
Expand Up @@ -1272,3 +1272,43 @@ html:has(.list-filter-section){scroll-padding-top:calc(var(--list-filter-bar,0px
.outcome-board.is-seen .outcome-tile .outcome-bricks i{animation-play-state:running}
}
@keyframes outcome-brick{from{opacity:0;transform:scale(.2)}}

/* A paragraph of nothing but pictures in an article (reading): as wide as the text, a pair side by side
at one height, each no wider than its file. A picture wider than its share of the text links to its full size. Square corners,
so a frame drawn in the picture is not clipped. On a phone the pictures stack. */
.article-layout .article-style p.img-row{display:flex;gap:12px;align-items:flex-start;max-width:var(--measure);margin:28px 0}
.article-layout .article-style .img-pair-item{flex:calc(var(--w) / var(--h)) 1 0;min-width:0;max-width:calc(var(--w) * 1px)}
.article-layout .article-style .img-row img{display:block;width:100%;height:auto}
.article-layout .article-style a.img-full{display:block;cursor:zoom-in}
.article-layout .article-style a.img-full:hover img{filter:brightness(.94)}
.article-layout .article-style a.img-full:focus-visible{outline:3px solid var(--ink);outline-offset:3px}
/* On a wide screen a figure runs past the text into the empty band on its right, to the page's edge. */
@media(min-width:1241px){.article-layout:has(>.article-card):not(.article-layout-callouts,.article-layout-wide) .article-style p.img-row:not(.img-row-text){width:min(calc(50vw + 130px),818px);max-width:none;gap:16px}
}
@media(max-width:560px){.article-layout .article-style p.img-row{flex-direction:column}
.article-layout .article-style .img-pair-item{flex:none;max-width:100%}
}

/* An editor's note after an article: its label bold and the note at body weight, a size down, under a short rule. */
.article-layout .article-style .editors-note{max-width:calc(var(--measure) * 18 / 17);margin:0 0 16px;font-size:17px;line-height:1.55}
.article-layout .article-style hr:has(+ .editors-note,+ br + .editors-note){width:96px;margin:36px 0 18px;border:0;border-top:3px solid var(--edu)}

/* An Educators' Corner article by one author with a photo (article_header): on a phone or tablet the byline is a band
on education's pale ground, in place of the side card at the end; on a wide screen the card has photo and name. */
.article-layout .byline-portrait :is(.byline-photo,.network-icon,.byline-role,.byline-bio){display:none}
@media(max-width:1000px){.article-layout .byline-portrait{display:grid;grid-template-columns:96px minmax(0,1fr);gap:2px 16px;align-items:center;margin-top:20px;padding:22px 18px 16px;background:var(--edu-bg);border-radius:var(--r-large);box-shadow:inset 0 6px 0 var(--edu)}
.article-layout .byline-portrait>*{grid-column:2}
.article-layout .byline-portrait .byline-photo{display:block;grid-column:1;grid-row:1/span 3;width:96px;height:96px;border-radius:50%;object-fit:cover;box-shadow:0 0 0 3px #fff}
.article-layout .byline-portrait .byline-authors{font:500 21px/1.2 var(--display)}
.article-layout .byline-portrait .byline-role{display:block;font-size:15px;line-height:1.4}
.article-layout .byline-portrait .byline-bio{display:block;grid-column:1/-1;margin-top:10px;font-size:15px;line-height:1.45}
.article-layout .byline-portrait :is(.byline-role,.byline-bio) p{margin:0}
.article-layout .byline-portrait .network-icon{display:flex;gap:0;margin:2px 0 0 -10px;padding:0;list-style:none}
.article-layout .byline-portrait .network-icon li{margin:0}
.article-layout .byline-portrait .network-icon a{display:flex;align-items:center;justify-content:center;width:44px;height:44px;color:var(--link);font-size:17px;text-decoration:none}
.article-layout:has(.byline-portrait) .article-card{display:none}
}
.article-layout .article-card-edu .card-authors>li:has(>.card-author-portrait){grid-template-columns:minmax(0,1fr)}
.article-layout .article-card-edu .card-authors>li>img.card-author-portrait{grid-row:auto;width:100%;height:auto;aspect-ratio:184/220;margin:0 0 12px;border-radius:var(--r-small);object-fit:cover}
.article-layout .article-card-edu .card-authors>li:has(>.card-author-portrait)>div>*{grid-column:1}
.article-layout .article-card-edu .card-authors>li:has(>.card-author-portrait) .card-author-name{font-size:22px}
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ draft: false
image:
#caption: "Photo by Andrea Piacquadio from [Pexels](https://www.pexels.com/photo/happy-ethnic-woman-sitting-at-table-with-laptop-3769021/)"
focal_point: "Center"
preview_only: false
preview_only: true

# Projects (optional).
# Associate this post with one or more of your projects.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ draft: false
image:
#caption: "Photo by Andrea Piacquadio from [Pexels](https://www.pexels.com/photo/happy-ethnic-woman-sitting-at-table-with-laptop-3769021/)"
focal_point: "Center"
preview_only: false
preview_only: true

# Projects (optional).
# Associate this post with one or more of your projects.
Expand Down
3 changes: 3 additions & 0 deletions content/educators-corner/016-reviewer-zero/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,9 @@ image:
focal_point: "Center"
preview_only: false

# Pictures that stay at the width of the text on wide screens.
text_width_figures: ["tweet_rz.webp"]

# Projects (optional).
# Associate this post with one or more of your projects.
# Simply enter your project's folder or file name without extension.
Expand Down
8 changes: 6 additions & 2 deletions layouts/_default/_markup/render-link.html
Original file line number Diff line number Diff line change
@@ -1,2 +1,6 @@
{{- /* A Hugo Markdown render hook to parse links, opening external links in new tabs. Trimmed so no whitespace is emitted before the link. */ -}}
<a href="{{ .Destination | safeURL }}"{{ with .Title}} title="{{ . }}"{{ end }}{{ if or (strings.HasPrefix .Destination "http://") (strings.HasPrefix .Destination "https://") (strings.HasPrefix .Destination "//") }} target="_blank" rel="noopener"{{ end }}>{{ .Text | safeHTML }}</a>
{{- /* Markdown links, opening other sites in new tabs; a link to forrt.org itself (site.Params.doors.host, with or
without www.) stays in the tab, as in booklet_contents. Overrides the theme's hook, whose comment line left a
line break before every link: rendered as a space, it split "(" from a link that follows it. */ -}}
{{- $host := strings.TrimPrefix "www." (urls.Parse .Destination).Host -}}
{{- $away := and $host (ne $host site.Params.doors.host) -}}
<a href="{{ .Destination | safeURL }}"{{ with .Title}} title="{{ . }}"{{ end }}{{ if $away }} target="_blank" rel="noopener"{{ end }}>{{ .Text | safeHTML }}</a>
16 changes: 15 additions & 1 deletion layouts/partials/article_header.html
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,22 @@
{{ $heading := .Params.heading_title | default .Title }}
{{ if .Params.hide_title }}<h1 class="sr-only">{{ $heading }}</h1>{{ else }}<h1>{{ $heading }}</h1>{{ end }}
{{ with .Params.subtitle }}<p class="standfirst">{{ . | markdownify | emojify }}</p>{{ end }}
<div class="byline">
{{/* An Educators' Corner article by one author with a photo: on a phone or tablet the byline is a band on education's pale
ground with the photo, name, links and date, and the side card, which has them on a wide screen, is left out
there (article.css). */}}
{{ $profile := false }}{{ $photo := false }}
{{ if and (eq (len (.Params.authors | default slice)) 1) (eq .Type "educators-corner") }}
{{ with partialCached "author_profile" (index .Params.authors 0) (index .Params.authors 0) }}{{ $profile = . }}{{ if ne (lower (.Params.name | default "")) "forrt" }}{{ $photo = (.Resources.ByType "image").GetMatch "*avatar*" }}{{ end }}{{ end }}
{{ end }}
<div class="byline{{ if $photo }} byline-portrait{{ end }}">
Comment thread
cubic-dev-ai[bot] marked this conversation as resolved.
Resolved
{{ with $photo }}<img class="byline-photo" src="{{ (.Fill "192x192 Center webp q80").RelPermalink }}" width="96" height="96" alt="">{{ end }}
{{ with .Params.authors }}<span class="byline-authors">{{ partial "page_metadata_authors" $page }}</span>{{ end }}
{{ if $photo }}
{{/* The card's role and bio come too, as the card is left out on these screens. */}}
{{ with $profile.Params.role }}<span class="byline-role">{{ . | markdownify | emojify }}</span>{{ end }}
{{ if $profile.Params.social }}{{ partial "social_links" $profile }}{{ end }}
{{ with $profile.Params.bio }}<span class="byline-bio">{{ . | markdownify | emojify }}</span>{{ end }}
{{ end }}
{{/* The side card carries the date on a wide screen; on a narrow one it would come after the article. */}}
{{ if and (in (slice "post" "educators-corner" "pedagogies") .Type) (not .Date.IsZero) }}<time class="byline-date" datetime="{{ .Date.Format "2006-01-02" }}">{{ .Date.Format "2 January 2006" }}</time>{{ end }}
{{ if and (eq .Type "post") (ge .ReadingTime 3) }}<span class="byline-time">{{ .ReadingTime }} {{ i18n "minute_read" }}</span>{{ end }}
Expand Down
2 changes: 1 addition & 1 deletion layouts/partials/author_links.html
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{{/* Author names, comma-separated, each linked to its profile where one exists, as page_metadata_authors does.
Input: a slice of names as written in a page's `authors`. */}}
{{- range $i, $raw := . -}}
{{- $profile := site.GetPage (printf "/authors/%s" (urlize $raw)) -}}
{{- $profile := partialCached "author_profile" $raw $raw -}}
{{- if gt $i 0 }}, {{ end -}}
{{- $name := $raw -}}{{- with $profile -}}{{- with .Params.name -}}{{- $name = . -}}{{- end -}}{{- end -}}
{{- if and $profile $profile.Params.name (site.Params.link_authors | default true) -}}
Expand Down
16 changes: 16 additions & 0 deletions layouts/partials/author_profile.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
{{/* The profile page (/authors/<slug>/) for a name as written in a page's `authors`, or false. The slug is usually the
name made into a URL; a title such as "Dr." in front, or a profile whose folder differs from the credited name
("Patrick Forscher" at patrick-s-forscher), is found by the profile's own name. Call it with partialCached and
the name as the key. */}}
{{ $raw := . }}
{{ $found := site.GetPage (printf "/authors/%s" (urlize $raw)) }}
{{ if not $found }}
{{ $plain := replaceRE `(?i)^(dr|prof|professor)\.?\s+` "" (trim $raw " ") }}
{{ $found = site.GetPage (printf "/authors/%s" (urlize $plain)) }}
{{ if not $found }}
{{ with site.GetPage "/authors" }}{{ range .Sections }}
{{ if and (not $found) (eq (lower (.Params.name | default .Title)) (lower $plain)) }}{{ $found = . }}{{ end }}
{{ end }}{{ end }}
{{ end }}
{{ end }}
{{ return $found }}
2 changes: 1 addition & 1 deletion layouts/partials/page_metadata_authors.html
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
{{ with .Param "authors" }}
{{ $link_authors := site.Params.link_authors | default true }}
{{ range $index, $name_raw := . }}
{{- $profile_page := site.GetPage (printf "/authors/%s" (urlize $name_raw)) -}}
{{- $profile_page := partialCached "author_profile" $name_raw $name_raw -}}
{{- $name := $name_raw -}}
{{- if and $profile_page $profile_page.Params.name }}{{ $name = $profile_page.Params.name }}{{ end -}}
{{- if gt $index 0 }}, {{ end -}}
Expand Down
22 changes: 22 additions & 0 deletions layouts/partials/reading.html
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,28 @@
{{ $label := cond (in (.Params.categories | default slice) "Newsletter") "Read the full issue" "$3" }}
{{ $body = replaceRE $link (printf `<p class="post-action"><a class="post-brick ac-panel-%v" href="$1"$2>%s</a></p>` $tone $label) $body 1 | safeHTML }}
{{ end }}
{{/* In an article, a paragraph of nothing but pictures is a figure: as wide as the text, or wider on a wide screen,
a pair side by side at one height (article.css), and each picture wider than its share of the text links to its
full size. A picture the author already linked is left alone, because it sits inside that link, not alone in the
paragraph. */}}
{{ if and .IsPage (in (slice "post" "educators-corner" "pedagogies") .Type) }}
{{ range findRE `<p>\s*(?:<img [^>]*>\s*)+</p>` $body }}
Comment thread
LukasWallrich marked this conversation as resolved.
Resolved
{{ $figure := . }}
{{ $column := div 640 (len (findRE `<img ` .)) }}
Comment thread
LukasWallrich marked this conversation as resolved.
Resolved
{{ range findRESubmatch `<img src="(/[^"]+)"[^>]*? width="(\d+)" height="(\d+)"[^>]*>` . }}
{{ $img := index . 0 }}
{{ $link := cond (gt (int (index . 2)) $column) (printf `<a class="img-full" href="%s">%s<span class="sr-only"> (full size)</span></a>` (index . 1) $img) $img }}
{{ $figure = replace $figure $img (printf `<span class="img-pair-item" style="--w:%s;--h:%s">%s</span>` (index . 2) (index . 3) $link) }}
{{ end }}
{{/* A picture an article names in `text_width_figures`, such as a screenshot of a tweet, stays at the text's width. */}}
{{ $class := "img-row" }}
{{ range $.Params.text_width_figures }}{{ if in $figure . }}{{ $class = "img-row img-row-text" }}{{ end }}{{ end }}
Comment thread
LukasWallrich marked this conversation as resolved.
Resolved
{{ $body = replace $body . (replace $figure "<p>" (printf `<p class="%s">` $class)) | safeHTML }}
{{ end }}
{{/* An editor's note set wholly in emphasis read as one bold block: its label stays bold, the note itself is
body text (Educators' Corner 001, 007, 012). */}}
{{ $body = replaceRE `<p>\s*<em>Editor(?:&rsquo;|’|')s note(?::\s*|</em>:\s*)([\s\S]*?)(?:</em>)?\s*</p>` `<p class="editors-note"><strong>Editor’s note:</strong> $1</p>` $body | safeHTML }}
{{ end }}
{{ $contents := cond (findRE `(?i)<h1\b` .Content 1 | len | lt 0) slice (findRE `<li` .TableOfContents 1) }}
{{ $written := findRESubmatch `<h2[^>]*\bid="?([^"> ]+)"?[^>]*>([\s\S]*?)</h2>` $body }}
{{/* A short page's real sections can sit a level down. */}}
Expand Down
6 changes: 4 additions & 2 deletions layouts/partials/reading_card.html
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
{{/* Authors with a profile page, photo first; the rest by name. */}}
{{ $authors := slice }}
{{ if $article }}{{ range $p.Params.authors }}
{{ $profile := site.GetPage (printf "/authors/%s" (urlize .)) }}
{{ $profile := partialCached "author_profile" . . }}
{{ $authors = $authors | append (dict "name" . "profile" $profile) }}
{{ end }}{{ end }}
{{/* A newsletter's archive, which neither the breadcrumb nor the cards at the end link. */}}
Expand Down Expand Up @@ -54,7 +54,9 @@
<li{{ if not $adds }} class="card-author-plain"{{ end }}>
{{ with .profile }}
{{ $avatar := (.Resources.ByType "image").GetMatch "*avatar*" }}
{{ with $avatar }}<img src="{{ (.Fill "112x112 Center webp q80").RelPermalink }}" width="56" height="56" alt="">{{ end }}
{{/* On an education article a lone author's portrait is large, as the article's opening picture (article.css); FORRT's own account is not a person, and its logo stays small. */}}
{{ $person := ne (lower (.Params.name | default "")) "forrt" }}
{{ with $avatar }}{{ if and $person (eq (len $authors) 1) (in (slice "educators-corner" "pedagogies") $p.Type) }}<img class="card-author-portrait" src="{{ (.Fill "368x440 Center webp q80").RelPermalink }}" width="184" height="220" alt="">{{ else }}<img src="{{ (.Fill "112x112 Center webp q80").RelPermalink }}" width="56" height="56" alt="">{{ end }}{{ end }}
<div>
<a class="card-author-name" href="{{ .RelPermalink }}">{{ .Title }}</a>
{{ with .Params.role }}<p class="card-author-role">{{ . | markdownify | emojify }}</p>{{ end }}
Expand Down
33 changes: 33 additions & 0 deletions scripts/rebrand/compare_builds.py
Original file line number Diff line number Diff line change
Expand Up @@ -111,6 +111,38 @@ def _equivalent_social_images(before, after):
return before, after


# A space just inside an opening bracket or quote, as in "( https://…": Markdown links left one there until #1243.
_OPENER_SPACE = re.compile(r"""([(\[“«]|(?:^|(?<=\s))")\s+""")


def _same_description(old, new):
"""True when two descriptions differ only by spaces just inside an opening bracket or quote. Losing such a space
can move the cut of a long description ("…") on by a word, so the cut text may then end one or two words later."""
removed = len(_OPENER_SPACE.findall(old)) + len(_OPENER_SPACE.findall(new))
old, new = _OPENER_SPACE.sub(r"\1", old), _OPENER_SPACE.sub(r"\1", new)
if old == new:
return True
# A later cut is only explained by a removed space; without one, any difference is a real edit.
if not removed:
return False
stems = [text[:-1].rstrip() if text.endswith("…") else text for text in (old, new)]
short = 0 if len(stems[0]) < len(stems[1]) else 1
shorter, longer = stems[short], stems[1 - short]
# Only a cut description may end earlier than the other, and only by a word or two.
return (old, new)[short].endswith("…") and longer.startswith(shorter) and len(longer[len(shorter):].split()) <= 2
Comment thread
LukasWallrich marked this conversation as resolved.
Resolved


def _equivalent_descriptions(before, after):
"""Treat a description as unchanged when it only lost a space inside a bracket or quote (_same_description).
Every other tag, and any description that changed otherwise, still compares exactly."""
for key in ("description", "og:description", "twitter:description"):
old = [tag for tag in before if tag.partition("=")[0] == key]
new = [tag for tag in after if tag.partition("=")[0] == key]
if len(old) == 1 and len(new) == 1 and old != new and _same_description(old[0][len(key) + 1:], new[0][len(key) + 1:]):
after = [old[0] if tag == new[0] else tag for tag in after]
return before, after


def compare_heads(reference, candidate, allowed=frozenset()):
"""Return {path: (only_before, only_after)} for pages whose SEO tags differ."""
changes = {}
Expand All @@ -121,6 +153,7 @@ def compare_heads(reference, candidate, allowed=frozenset()):
before = _without_edit_date(tags)
after = _without_edit_date(candidate[path])
before, after = _equivalent_social_images(before, after)
before, after = _equivalent_descriptions(before, after)
if before != after:
before, after = set(before), set(after)
changes[path] = (sorted(before - after), sorted(after - before))
Expand Down
26 changes: 26 additions & 0 deletions scripts/tests/test_rebrand_checks.py
Original file line number Diff line number Diff line change
Expand Up @@ -246,6 +246,32 @@ def test_heads_report_only_differences(self):
changes = compare_heads({"a": ["x", "y"], "b": ["z"]}, {"a": ["x", "w"], "b": ["z"]})
self.assertEqual(changes, {"a": (["y"], ["w"])})

def test_a_description_may_lose_the_space_inside_a_bracket(self):
before = ["description=Open Source Guides ( https://opensource.guide/) are a collection",
'og:description=He said " The replication" was fine', "title=Page"]
after = ["description=Open Source Guides (https://opensource.guide/) are a collection",
'og:description=He said "The replication" was fine', "title=Page"]
self.assertEqual(compare_heads({"a": before}, {"a": after}), {})

def test_a_cut_description_may_then_end_a_word_later(self):
before = ["description=Software ( https://jasp-stats.org/) and the web…"]
after = ["description=Software (https://jasp-stats.org/) and the web application…"]
self.assertEqual(compare_heads({"a": before}, {"a": after}), {})

def test_other_description_changes_still_count(self):
before = "description=Open Source Guides ( https://opensource.guide/) are a collection…"
for after in ("description=Open Source Guides (https://opensource.guide/) is a collection…",
"description=Open Source Guides (https://opensource.guide/) are a collection of many more resources…",
"description=Open Source Guides (https://opensource.guide/) are a",
"description=Open Source Guides(https://opensource.guide/) are a collection…"):
with self.subTest(after=after):
self.assertIn("a", compare_heads({"a": [before]}, {"a": [after]}))
# Without a removed space, even a cut description that ends a word later is a real edit.
self.assertIn("a", compare_heads({"a": ["description=Software and the web…"]},
{"a": ["description=Software and the web application…"]}))
# Only descriptions: the same change in a title still counts.
self.assertIn("a", compare_heads({"a": ["title=A ( b)"]}, {"a": ["title=A (b)"]}))


def social_tags(self, image, image_type="image/webp", width="100", height="50"):
return sorted(["og:image=" + image, "twitter:image=" + image,
Expand Down
Loading