Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

adding HTML headers for llms.txt and llms-full.txt file #4371

Open
wants to merge 5 commits into
base: main
Choose a base branch
from
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 themes/psh-docs/layouts/partials/head/head.html
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@
{{ partial "head/opengraph" . }}
{{ partial "head/css" . }}
{{ partial "scripts/global" . }}
{{ partial "head/llms" . }}

{{ if .Param "math" }}
{{ partialCached "head/math.html" . }}
Expand Down
5 changes: 5 additions & 0 deletions themes/psh-docs/layouts/partials/head/llms.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
{{ if ( eq .Site.Params.vendor.config.version 2 ) }}
<!-- LLMS.txt -->
<meta name="llms.txt" content="{{ .Site.Params.vendor.urls.docs }}/llms.txt">
<meta name="llms-full.txt" content="{{ .Site.Params.vendor.urls.docs }}/llms-full.txt">
{{ end }}
11 changes: 11 additions & 0 deletions themes/psh-docs/layouts/partials/page-content.html
Original file line number Diff line number Diff line change
Expand Up @@ -101,6 +101,17 @@ <h3 class="pt-4 pb-2 font-light text-base text-slate">On this page</h3>
</div>
{{ end }}

<!-- Add a Button to open the Markdown version of this page (Upsun only) -->
{{ if ( eq .context.Site.Params.vendor.config.version 2 ) }}
<div class="justify-start border border-stone border-t-0 px-4 pt-10 pb-4 mb-12 md:mb-0 bottom-0 text-sm [&_a]:text- hover:[&_a]:underline focus:[&_a]:underline [&_ul_ul]:pl-4">
<a href="{{ if eq .context.Page.RelPermalink "/" }}/index.md{{ else }}{{ .context.Page.RelPermalink | replaceRE ".html" ".md" }}{{ end }}"
class="px-6 py-2 bg-[#6046FF] hover:!bg-[#4D38CC] rounded-3xl text-white text-center text-sm font-semibold"
title="View this page in a Markdown format"
target="_blank">
View Markdown version
</a>
</div>
{{ end }}
</div>

<div class="prose xl:prose-lg max-w-[96vw] md:max-w-none prose-code:!mb-0 prose-h2:text-xl prose-h3:text-xl prose-h4:text-lg">
Expand Down
Loading