1
0
Fork 0
mirror of https://git.sr.ht/~seirdy/seirdy.one synced 2024-09-19 20:02:10 +00:00

Rename "posts" section to "articles"

No liinks changed; just the content displayed. The "posts" section is
now "artilces" to distinguish it from my "notes" section.
This commit is contained in:
Rohan Kumar 2022-06-19 20:15:56 -07:00
parent b3a676c72d
commit f9c497fac0
No known key found for this signature in database
GPG key ID: 1E892DB2A5F84479
6 changed files with 21 additions and 45 deletions

View file

@ -35,9 +35,9 @@ disableKinds = ["taxonomy", "term"]
[menu]
[[menu.main]]
identifier = "posts"
name = "Posts"
title = "posts"
identifier = "articles"
name = "Articles"
title = "articles"
url = "/posts/"
weight = 10

View file

@ -1,13 +1,13 @@
---
template: "posts.html"
description: "All the long-form posts on Seirdy's Home"
title: "Posts"
description: "All the long-form articles on Seirdy's Home"
title: "Articles"
sitemap:
ChangeFreq: weekly
Priority: 0.7
---
Posts
=====
Articles
========
These are all of my long-form posts. [An Atom feed](./atom.xml) contains their full text. If that has any problems, I also have [a legacy RSS feed](./index.xml).
These are all of my long-form articles. [An Atom feed](./atom.xml) contains their full text. If that has any problems, I also have [a legacy RSS feed](./index.xml).

View file

@ -34,7 +34,7 @@
<a rel="home" href="https://seirdy.one/">Seirdy&#39;s Home</a>
</li>
<li>
<a href="/posts/">Posts</a>
<a href="/posts/">Articles</a>
</li>
<li>
<a href="/notes/">Notes</a>

View file

@ -20,18 +20,18 @@
<link href="{{ .Site.Params.WebmentionEndpoint }}" rel="webmention" />
{{ $webmanifest := resources.Get "/manifest.webmanifest" | resources.ExecuteAsTemplate "manifest.webmanifest" . | resources.Minify | resources.Fingerprint "md5" -}}
{{- printf `<link href="%s" rel="manifest" />` $webmanifest.RelPermalink | safeHTML -}}
<!--Feeds for both notes and posts; posts come first unless we're in the notes section.-->
<!--Feeds for both notes and articles; articles come first unless we're in the notes section.-->
{{- if or (eq .Section "notes") (eq .Title "Notes") -}}
<link rel="alternate" type="application/atom+xml" href="{{ site.BaseURL }}notes/atom.xml" title="Notes" />
<link rel="alternate" type="application/atom+xml" href="{{ site.BaseURL }}atom.xml" title="All content" />
<link rel="alternate" type="application/atom+xml" href="{{ site.BaseURL }}posts/atom.xml" title="Posts" />
{{- else if or (eq .Section "posts") (eq .Title "Posts") -}}
<link rel="alternate" type="application/atom+xml" href="{{ site.BaseURL }}posts/atom.xml" title="Posts" />
<link rel="alternate" type="application/atom+xml" href="{{ site.BaseURL }}posts/atom.xml" title="Articles" />
{{- else if or (eq .Section "posts") (eq .Title "Articles") -}}
<link rel="alternate" type="application/atom+xml" href="{{ site.BaseURL }}posts/atom.xml" title="Articles" />
<link rel="alternate" type="application/atom+xml" href="{{ site.BaseURL }}atom.xml" title="All content" />
<link rel="alternate" type="application/atom+xml" href="{{ site.BaseURL }}notes/atom.xml" title="Notes" />
{{- else -}}
<link rel="alternate" type="application/atom+xml" href="{{ site.BaseURL }}atom.xml" title="All content" />
<link rel="alternate" type="application/atom+xml" href="{{ site.BaseURL }}posts/atom.xml" title="Posts" />
<link rel="alternate" type="application/atom+xml" href="{{ site.BaseURL }}posts/atom.xml" title="Articles" />
<link rel="alternate" type="application/atom+xml" href="{{ site.BaseURL }}notes/atom.xml" title="Notes" />
{{- end }}
<title>{{ .Title }}{{ if and (lt (len .Title) 54) (ne $canonicalRelPermalink "/") }} - Seirdy{{ end }}</title>

View file

@ -23,9 +23,9 @@
{{ $isCurrent := false }}
<li itemprop="hasPart" itemscope="" itemtype="https://schema.org/SiteNavigationElement">
<a href="{{ .URL }}" itemprop="url"
{{- if or (eq .Identifier "notes" ) (eq .Identifier "posts") (eq .Identifier "bookmarks") }} rel="feed"{{- end }}
{{- if or (eq .Identifier "notes" ) (eq .Identifier "articles") (eq .Identifier "bookmarks") }} rel="feed"{{- end }}
{{- if or (eq $currentPage.RelPermalink .URL) ($currentPage.HasMenuCurrent "main" .) -}}{{- $isCurrent = true }} aria-current="page"{{- end -}}>
{{- if or $isCurrent (eq $currentPage.Section .Title) -}}
{{- if or $isCurrent (eq $currentPage.Section .Title) (and (eq $currentPage.Section "posts") (eq .Identifier "articles")) -}}
<strong itemprop="name">{{- .Name -}}</strong>
{{- else -}}
<span itemprop="name">{{- .Name -}}</span>

View file

@ -1,43 +1,23 @@
{{- $isStandalone := false -}}
{{- if and (ne .Permalink .Site.BaseURL) (ne .RelPermalink "/") -}}
{{- $isStandalone = true -}}
{{- end -}}
{{- if $isStandalone -}}
<main itemprop="mainEntity" class="h-feed hfeed" itemscope="" itemtype="https://schema.org/DataFeed">
<h1 class="p-name" itemprop="name headline" id="posts">Posts</h1>
<p>These are all of my long-form posts. <a href="./atom.xml">An Atom feed</a> contains the full text of all my posts. If that has any problems, I also have <a href="./index.xml">a legacy RSS feed</a>.</p>
{{- else -}}
<section class="h-feed hfeed" itemprop="hasPart" itemscope="" itemtype="https://schema.org/DataFeed">
<h2 class="p-name" itemprop="name" id="posts">Posts</h2>
<p>Heres a selection of my best posts, in featured order. To see the rest, visit <a href="posts/">my Posts page</a>.</p>
{{- end }}
<p>I edit some of these posts quite often; some are updated indefinitely. Check the “updated” timestamps.</p>
<h2 class="p-name" itemprop="name" id="articles">Articles</h2>
<p>Heres a selection of my best articles, in featured order. To see the rest, visit <a href="posts/">my Articles page</a>.</p>
<p>I edit some of these articles quite often; some are updated indefinitely. Check the “updated” timestamps.</p>
<p role="doc-tip">
Timestamp format: <code>YYYY-MM-DD</code>, as per <cite><a href="https://www.ietf.org/rfc/rfc3339.txt">RFC 3339</a></cite> and <cite><a href="https://xkcd.com/1179/">ISO 8601</a></cite>. Sorted newest to oldest.
</p>
<ol>
{{- $posts := (where site.RegularPages "Section" "posts") -}}
{{- if not $isStandalone -}}
{{- $posts = sort (where $posts "Params.featured" ">" 0) "Params.featured" -}}
{{- end -}}
{{- $posts := site.RegularPages -}}
{{- $posts = sort (where $posts "Params.featured" ">" 0) "Params.featured" -}}
{{- range $posts -}}
{{- $canonicalRelPermalink := .RelPermalink | replaceRE "^/~seirdy/" "/" -}}
<li itemprop="dataFeedElement" itemscope="" itemtype="https://schema.org/DataFeedItem">
<article class="h-entry hentry" itemprop="item" itemscope="" itemtype="https://schema.org/BlogPosting" itemid="{{ .Site.Params.CanonicalBaseURL }}{{ $canonicalRelPermalink }}">
{{ if $isStandalone -}}
<h2
{{- else -}}
<h3
{{- end }}
itemprop="name headline" class="p-name entry-title">
<a href="{{ .Permalink }}" itemprop="url" class="u-url url" rel="bookmark">
{{ .Title }}
</a>
{{ if $isStandalone -}}
</h2>
{{- else -}}
</h3>
{{- end }}
<p>
Posted <time itemprop="datePublished" class="dt-published published" datetime="{{ .Date.Format "2006-01-02 15:04:05Z07:00" }}">{{ .Date.Format "2006-01-02" }}</time>
{{- if lt .Date .Lastmod -}}
@ -51,8 +31,4 @@
</li>
{{- end }}
</ol>
{{ if $isStandalone -}}
</main>
{{ else -}}
</section>
{{ end }}