-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: Add University page with tagged articles shortcode
- Loading branch information
Showing
3 changed files
with
30 additions
and
0 deletions.
There are no files selected for viewing
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
--- | ||
title: "University" | ||
date: 2024-06-11T00:00:00Z | ||
draft: false | ||
--- | ||
|
||
# Freenet University | ||
|
||
Deep dives into Freenet's technical concepts and architecture. These articles explain the theory and implementation details behind Freenet's core technologies. | ||
|
||
{{< tagged-articles tag="university" >}} |
This file contains 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
13 changes: 13 additions & 0 deletions
13
hugo-site/themes/freenet/layouts/shortcodes/tagged-articles.html
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
{{ $tag := .Get "tag" }} | ||
{{ $articles := where .Site.RegularPages "Params.tags" "intersect" (slice $tag) }} | ||
{{ $sortedArticles := sort $articles "Date" "desc" }} | ||
|
||
<ul> | ||
{{ range $sortedArticles }} | ||
<li> | ||
<i class="fas fa-graduation-cap"></i> | ||
<a href="{{ .Permalink }}">{{ .Title }}</a> | ||
<p class="article-description">{{ .Description }}</p> | ||
</li> | ||
{{ end }} | ||
</ul> |