Turn the blog into a project landing page
Build and deploy the poweronoff.click hugo / build (push) Successful in 45s
Build and deploy the poweronoff.click hugo / build (push) Successful in 45s
The site is now a single page introducing Stan and listing his projects, with a short description and a link for each. Blog posts, the about page, the post archetype and the new-post helper are gone (git history keeps them). The Impressum and Datenschutzerklärung stay: they are legally required and the footer links to them. Projects are data-driven: - data/projects.yaml: name, url, description, optional status/tags - layouts/shortcodes/projects.html: renders cards and fails the build when a required field is missing or the URL is not absolute - layouts/_partials/extend_head.html: card CSS using PaperMod variables, so light/dark keeps working; no theme fork First entry is Berlin Crime Stories, described from its own site (German crime stories set in Berlin, published in German/English/Russian). Config: site title and copy retargeted to projects, homeInfoParams/menu/social icons/pagination/search output removed, taxonomies disabled (no posts), locale set to de so html lang and og:locale are German. make check now also asserts that the cards, the Berlin Crime Stories link and both legal pages exist, and make new-project documents how to add one.
This commit is contained in:
1 parent
d59b91c4bd
commit
ae2aab5753
15 files changed
+259
-390
No files matched your search
@@ -0,0 +1,38 @@
|
||||
{{- /* Renders the project cards on the landing page from data/projects.yaml.
|
||||
Validates the data so a broken entry fails the build instead of shipping
|
||||
an empty card. Styling lives in layouts/_partials/extend_head.html. */ -}}
|
||||
|
||||
{{- with hugo.Data.projects -}}
|
||||
<section id="projekte" class="projects">
|
||||
<h2>Projekte</h2>
|
||||
<div class="project-grid">
|
||||
{{- range $project := . }}
|
||||
{{- if or (not $project.name) (not $project.url) (not $project.description) }}
|
||||
{{- errorf "data/projects.yaml: entry %q needs name, url and description" (default "<unnamed>" $project.name) }}
|
||||
{{- end }}
|
||||
{{- if not (hasPrefix $project.url "http") }}
|
||||
{{- errorf "data/projects.yaml: %q must use an absolute http(s) url, got %q" $project.name $project.url }}
|
||||
{{- end }}
|
||||
<article class="project-card">
|
||||
<header class="project-header">
|
||||
<h3><a href="{{ $project.url }}">{{ $project.name }}</a></h3>
|
||||
{{- with $project.status }}
|
||||
<span class="project-status">{{ . }}</span>
|
||||
{{- end }}
|
||||
</header>
|
||||
<p class="project-description">{{ $project.description }}</p>
|
||||
{{- with $project.tags }}
|
||||
<ul class="project-tags">
|
||||
{{- range . }}
|
||||
<li>{{ . }}</li>
|
||||
{{- end }}
|
||||
</ul>
|
||||
{{- end }}
|
||||
<a class="project-link" href="{{ $project.url }}">Projekt ansehen →</a>
|
||||
</article>
|
||||
{{- end }}
|
||||
</div>
|
||||
</section>
|
||||
{{- else -}}
|
||||
{{- errorf "data/projects.yaml is missing or empty" -}}
|
||||
{{- end -}}
|
||||
Reference in new issue
Block a user