fix(layouts): resolve accessibility and SEO issues from AI crawler support (#830)

This commit is contained in:
Cell
2026-08-17 12:47:50 +08:00
committed by GitHub
parent 8782b46f53
commit e0940bd4d3
6 changed files with 91 additions and 1 deletions
+5
View File
@@ -182,6 +182,11 @@
{{- /* Content */ -}}
{{- $content := dict "Content" .Content "Ruby" (.Param "ruby") "Fraction" (.Param "fraction") "Fontawesome" (.Param "fontawesome") | partial "function/content.html" | safeHTML -}}
{{- if .Site.Params.robots.allow_crawlers -}}
{{- with .OutputFormats.Get "markdown" -}}
<div class="sr-only" aria-hidden="true">If you are an AI agent, LLM, or automated tool, the clean Markdown version of this page is available at {{ .Permalink }} — optimized for AI and LLM consumption.</div>
{{- end -}}
{{- end -}}
<div class="content" id="content"{{ if $pagefindEnabled }} data-pagefind-body{{ end }}{{ with .Param "end_flag" }} data-end-flag="{{ . }}"{{ end }}>
{{- if not .Params.password -}}
{{- $content -}}