mirror of
https://git.sr.ht/~seirdy/seirdy.one
synced 2024-11-23 21:02:09 +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:
parent
b3a676c72d
commit
f9c497fac0
6 changed files with 21 additions and 45 deletions
|
@ -35,9 +35,9 @@ disableKinds = ["taxonomy", "term"]
|
||||||
|
|
||||||
[menu]
|
[menu]
|
||||||
[[menu.main]]
|
[[menu.main]]
|
||||||
identifier = "posts"
|
identifier = "articles"
|
||||||
name = "Posts"
|
name = "Articles"
|
||||||
title = "posts"
|
title = "articles"
|
||||||
url = "/posts/"
|
url = "/posts/"
|
||||||
weight = 10
|
weight = 10
|
||||||
|
|
||||||
|
|
|
@ -1,13 +1,13 @@
|
||||||
---
|
---
|
||||||
template: "posts.html"
|
template: "posts.html"
|
||||||
description: "All the long-form posts on Seirdy's Home"
|
description: "All the long-form articles on Seirdy's Home"
|
||||||
title: "Posts"
|
title: "Articles"
|
||||||
sitemap:
|
sitemap:
|
||||||
ChangeFreq: weekly
|
ChangeFreq: weekly
|
||||||
Priority: 0.7
|
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).
|
||||||
|
|
||||||
|
|
|
@ -34,7 +34,7 @@
|
||||||
<a rel="home" href="https://seirdy.one/">Seirdy's Home</a>
|
<a rel="home" href="https://seirdy.one/">Seirdy's Home</a>
|
||||||
</li>
|
</li>
|
||||||
<li>
|
<li>
|
||||||
<a href="/posts/">Posts</a>
|
<a href="/posts/">Articles</a>
|
||||||
</li>
|
</li>
|
||||||
<li>
|
<li>
|
||||||
<a href="/notes/">Notes</a>
|
<a href="/notes/">Notes</a>
|
||||||
|
|
|
@ -20,18 +20,18 @@
|
||||||
<link href="{{ .Site.Params.WebmentionEndpoint }}" rel="webmention" />
|
<link href="{{ .Site.Params.WebmentionEndpoint }}" rel="webmention" />
|
||||||
{{ $webmanifest := resources.Get "/manifest.webmanifest" | resources.ExecuteAsTemplate "manifest.webmanifest" . | resources.Minify | resources.Fingerprint "md5" -}}
|
{{ $webmanifest := resources.Get "/manifest.webmanifest" | resources.ExecuteAsTemplate "manifest.webmanifest" . | resources.Minify | resources.Fingerprint "md5" -}}
|
||||||
{{- printf `<link href="%s" rel="manifest" />` $webmanifest.RelPermalink | safeHTML -}}
|
{{- 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") -}}
|
{{- 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 }}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 }}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" />
|
||||||
{{- else if or (eq .Section "posts") (eq .Title "Posts") -}}
|
{{- else if or (eq .Section "posts") (eq .Title "Articles") -}}
|
||||||
<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 }}atom.xml" title="All content" />
|
<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" />
|
<link rel="alternate" type="application/atom+xml" href="{{ site.BaseURL }}notes/atom.xml" title="Notes" />
|
||||||
{{- else -}}
|
{{- 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 }}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" />
|
<link rel="alternate" type="application/atom+xml" href="{{ site.BaseURL }}notes/atom.xml" title="Notes" />
|
||||||
{{- end }}
|
{{- end }}
|
||||||
<title>{{ .Title }}{{ if and (lt (len .Title) 54) (ne $canonicalRelPermalink "/") }} - Seirdy{{ end }}</title>
|
<title>{{ .Title }}{{ if and (lt (len .Title) 54) (ne $canonicalRelPermalink "/") }} - Seirdy{{ end }}</title>
|
||||||
|
|
|
@ -23,9 +23,9 @@
|
||||||
{{ $isCurrent := false }}
|
{{ $isCurrent := false }}
|
||||||
<li itemprop="hasPart" itemscope="" itemtype="https://schema.org/SiteNavigationElement">
|
<li itemprop="hasPart" itemscope="" itemtype="https://schema.org/SiteNavigationElement">
|
||||||
<a href="{{ .URL }}" itemprop="url"
|
<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 (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>
|
<strong itemprop="name">{{- .Name -}}</strong>
|
||||||
{{- else -}}
|
{{- else -}}
|
||||||
<span itemprop="name">{{- .Name -}}</span>
|
<span itemprop="name">{{- .Name -}}</span>
|
||||||
|
|
|
@ -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">
|
<section class="h-feed hfeed" itemprop="hasPart" itemscope="" itemtype="https://schema.org/DataFeed">
|
||||||
<h2 class="p-name" itemprop="name" id="posts">Posts</h2>
|
<h2 class="p-name" itemprop="name" id="articles">Articles</h2>
|
||||||
<p>Here’s a selection of my best posts, in featured order. To see the rest, visit <a href="posts/">my Posts page</a>.</p>
|
<p>Here’s a selection of my best articles, in featured order. To see the rest, visit <a href="posts/">my Articles page</a>.</p>
|
||||||
{{- end }}
|
<p>I edit some of these articles quite often; some are updated indefinitely. Check the “updated” timestamps.</p>
|
||||||
<p>I edit some of these posts quite often; some are updated indefinitely. Check the “updated” timestamps.</p>
|
|
||||||
<p role="doc-tip">
|
<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.
|
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>
|
</p>
|
||||||
<ol>
|
<ol>
|
||||||
{{- $posts := (where site.RegularPages "Section" "posts") -}}
|
{{- $posts := site.RegularPages -}}
|
||||||
{{- if not $isStandalone -}}
|
{{- $posts = sort (where $posts "Params.featured" ">" 0) "Params.featured" -}}
|
||||||
{{- $posts = sort (where $posts "Params.featured" ">" 0) "Params.featured" -}}
|
|
||||||
{{- end -}}
|
|
||||||
{{- range $posts -}}
|
{{- range $posts -}}
|
||||||
{{- $canonicalRelPermalink := .RelPermalink | replaceRE "^/~seirdy/" "/" -}}
|
{{- $canonicalRelPermalink := .RelPermalink | replaceRE "^/~seirdy/" "/" -}}
|
||||||
<li itemprop="dataFeedElement" itemscope="" itemtype="https://schema.org/DataFeedItem">
|
<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 }}">
|
<article class="h-entry hentry" itemprop="item" itemscope="" itemtype="https://schema.org/BlogPosting" itemid="{{ .Site.Params.CanonicalBaseURL }}{{ $canonicalRelPermalink }}">
|
||||||
{{ if $isStandalone -}}
|
|
||||||
<h2
|
|
||||||
{{- else -}}
|
|
||||||
<h3
|
<h3
|
||||||
{{- end }}
|
|
||||||
itemprop="name headline" class="p-name entry-title">
|
itemprop="name headline" class="p-name entry-title">
|
||||||
<a href="{{ .Permalink }}" itemprop="url" class="u-url url" rel="bookmark">
|
<a href="{{ .Permalink }}" itemprop="url" class="u-url url" rel="bookmark">
|
||||||
{{ .Title }}
|
{{ .Title }}
|
||||||
</a>
|
</a>
|
||||||
{{ if $isStandalone -}}
|
|
||||||
</h2>
|
|
||||||
{{- else -}}
|
|
||||||
</h3>
|
</h3>
|
||||||
{{- end }}
|
|
||||||
<p>
|
<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>
|
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 -}}
|
{{- if lt .Date .Lastmod -}}
|
||||||
|
@ -51,8 +31,4 @@
|
||||||
</li>
|
</li>
|
||||||
{{- end }}
|
{{- end }}
|
||||||
</ol>
|
</ol>
|
||||||
{{ if $isStandalone -}}
|
|
||||||
</main>
|
|
||||||
{{ else -}}
|
|
||||||
</section>
|
</section>
|
||||||
{{ end }}
|
|
||||||
|
|
Loading…
Reference in a new issue