Skip to content
Merged
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/en/history/bibliography/_index.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
title: Bibliography
heading: Interlisp Bibliography
type: bibliography
robots: "noindex, follow"
cascade:
type: bibliography
toc_hide: true
Expand Down
8 changes: 8 additions & 0 deletions layouts/_partials/hooks/head-end.html
Original file line number Diff line number Diff line change
@@ -1,3 +1,11 @@
<link rel="canonical" href="{{ .Permalink }}">
<link rel="me" href="https://fosstodon.org/@interlisp">
{{- /* Emit a page-level robots directive when front matter sets `robots`.
Docsy's head.html already emits "index, follow" for production pages;
when both tags are present, search engines apply the most restrictive
rule, so a `noindex` value here wins. See the bibliography section's
_index.md. */ -}}
{{ with .Params.robots }}
<meta name="robots" content="{{ . | htmlEscape }}">
{{ end }}
{{ partial "bibliography-json-ld.html" . }}
4 changes: 2 additions & 2 deletions layouts/bibliography/list.html
Original file line number Diff line number Diff line change
Expand Up @@ -107,9 +107,9 @@ <h1 class="h3 m-0">{{ or .Params.heading .Title }}</h1>
{{- $previewing := gt (countwords $plain) $previewWordLimit -}}
{{- if $previewing }}
{{- $previewWords := split $plain " " | first $previewWordLimit -}}
<div class="mt-2 small">{{ delimit $previewWords " " | safeHTML }}…</div>
<div class="mt-2 small" data-nosnippet>{{ delimit $previewWords " " | safeHTML }}…</div>
{{- else }}
<div class="mt-2 small">{{ replace (. | htmlEscape) "\n" "<br>" | safeHTML }}</div>
<div class="mt-2 small" data-nosnippet>{{ replace (. | htmlEscape) "\n" "<br>" | safeHTML }}</div>
{{- end }}
{{ end }}
</li>
Expand Down
2 changes: 2 additions & 0 deletions layouts/sitemap.xml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
<urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9"
xmlns:xhtml="http://www.w3.org/1999/xhtml">
{{ range (where .Data.Pages "Type" "!=" "redirect") }}
{{- if not (strings.Contains (.Params.robots | default "") "noindex") }}
<url>
<loc>{{ .Permalink }}</loc>{{ if not .Lastmod.IsZero }}
<lastmod>{{ safeHTML ( .Lastmod.Format "2006-01-02T15:04:05-07:00" ) }}</lastmod>{{ end }}{{ with .Sitemap.ChangeFreq }}
Expand All @@ -18,5 +19,6 @@
href="{{ .Permalink }}"
/>{{ end }}
</url>
{{- end }}
{{ end }}
</urlset>