Files
Vincent Lannurien 69b2c06b28
All checks were successful
Build and deploy static pages / build-and-push (push) Successful in 13s
Show topics on the home page, name the current one in the header
The home page fell back to PaperMod's recursive page list, which dumped
digest pages instead of the research topics they belong to. Add a home
layout that renders one card per entry in data/topics.yaml, with venue
counts, the nearest upcoming deadline, and section shortcuts.

With the topics listed there, drop the topic menu from the header and
show the current topic beside the site title instead, so the selected
research area is visible from every page. The breadcrumbs then repeated
that prefix, so override the partial to start below the topic section.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
2026-08-17 20:11:50 +02:00

66 lines
2.1 KiB
HTML

{{- define "main" }}
{{- if .Title }}
<header class="page-header">
<h1>{{ .Title }}</h1>
{{- if .Description }}
<div class="post-description">{{ .Description | markdownify }}</div>
{{- end }}
</header>
{{- end }}
{{- if .Content }}
<div class="md-content page-intro">{{ .Content }}</div>
{{- end }}
{{- /* The home page lists the research topics registered in data/topics.yaml,
not the site's pages: every content page lives under a topic, so the
default recursive list would dump raw digests here. */ -}}
{{- $now := now.Format "2006-01-02" }}
{{- range hugo.Data.topics.topics }}
{{- $slug := .slug }}
{{- $data := index site.Data $slug }}
{{- $confs := len ((and $data $data.venues) | default dict).conferences }}
{{- $journals := len ((and $data $data.venues) | default dict).journals }}
{{- /* Nearest still-upcoming deadline, taken from the calendar page's events
(already normalised to ISO dates by pa-generate). */ -}}
{{- $next := "" }}
{{- $nextTitle := "" }}
{{- with site.GetPage (printf "/%s/calendar" $slug) }}
{{- range .Params.events }}
{{- $start := printf "%v" .start }}
{{- if and (ge $start $now) (or (eq $next "") (lt $start $next)) }}
{{- $next = $start }}
{{- $nextTitle = .title }}
{{- end }}
{{- end }}
{{- end }}
<article class="post-entry topic-entry">
<header class="entry-header">
<h2>{{ .title }}</h2>
</header>
{{- with .description }}
<div class="entry-content">
<p>{{ . }}</p>
</div>
{{- end }}
<ul class="topic-stats">
<li><strong>{{ $confs }}</strong> conferences</li>
<li><strong>{{ $journals }}</strong> journals</li>
{{- if $next }}
<li>next deadline <strong>{{ (time $next).Format "Jan 2, 2006" }}</strong> — {{ $nextTitle }}</li>
{{- end }}
</ul>
<footer class="entry-footer topic-links">
{{- range slice "venues" "calendar" "digests" }}
<a href="{{ printf "%s/%s/" $slug . | relURL }}">{{ . | title }}</a>
{{- end }}
</footer>
<a class="entry-link" aria-label="{{ .title }}" href="{{ printf "%s/" $slug | relURL }}"></a>
</article>
{{- end }}
{{- end }}{{- /* end main */ -}}