Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions content/blog/CLAUDE.md
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,7 @@ Freeform. Avoid duplicating `software` or `topics` values.
| `nohero` | Boolean, hides the hero image |
| `hidesubscription` | Boolean, hides the subscription CTA |
| `photo.url` / `photo.author` | Stock photo attribution |
| `canonical_url` | Set only when another site's copy is the canonical version (e.g. the same post on `posit.co/blog`); the `<link rel="canonical">` tag and JSON-LD then point there. Omit for the default: our page is canonical (self-referencing tag). |
| `code-line-numbers` | Boolean, turns on line-number gutters for every code block on the page |

## Project Blog Listing
Expand Down
3 changes: 3 additions & 0 deletions layouts/partials/head.html
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,9 @@
content="{{ with .Params.Keywords }}{{ delimit . ", " }}{{ else }}{{ $.Site.Params.Keywords }}{{ end }}"
/>
<meta name="robots" content="noodp" />
{{- /* Pages default to self-canonical; canonical_url in frontmatter defers to
another site's copy (e.g. posit.co/blog) */ -}}
<link rel="canonical" href="{{ or .Params.canonical_url .Permalink }}" />
{{- if $.Site.Params.pwa.enabled }}<link rel="manifest" href="/manifest.json" />{{ end -}}

{{- /* Custom Open Graph and Twitter images for blog posts */ -}}
Expand Down
5 changes: 3 additions & 2 deletions layouts/partials/jsonld.html
Original file line number Diff line number Diff line change
Expand Up @@ -27,12 +27,13 @@
-}}

{{- else if and (eq .Section "blog") .IsPage -}}
{{- $canonical := or .Params.canonical_url .Permalink -}}
{{- $ld = dict
"@context" "https://schema.org"
"@type" "BlogPosting"
"headline" .Title
"url" .Permalink
"mainEntityOfPage" (dict "@type" "WebPage" "@id" .Permalink)
"url" $canonical
"mainEntityOfPage" (dict "@type" "WebPage" "@id" $canonical)
"datePublished" (.Date.Format "2006-01-02T15:04:05-07:00")
"dateModified" (.Lastmod.Format "2006-01-02T15:04:05-07:00")
"publisher" $org
Expand Down
Loading