Skip to content

Commit bf32ca3

Browse files
Merge pull request #4371 from platformsh/llms-add-header
adding HTML headers for llms.txt and llms-full.txt file
2 parents 6b2cd8e + 518e631 commit bf32ca3

File tree

3 files changed

+17
-0
lines changed

3 files changed

+17
-0
lines changed

themes/psh-docs/layouts/partials/head/head.html

+1
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@
2626
{{ partial "head/opengraph" . }}
2727
{{ partial "head/css" . }}
2828
{{ partial "scripts/global" . }}
29+
{{ partial "head/llms" . }}
2930

3031
{{ if .Param "math" }}
3132
{{ partialCached "head/math.html" . }}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
{{ if ( eq .Site.Params.vendor.config.version 2 ) }}
2+
<!-- LLMS.txt -->
3+
<meta name="llms.txt" content="{{ .Site.Params.vendor.urls.docs }}/llms.txt">
4+
<meta name="llms-full.txt" content="{{ .Site.Params.vendor.urls.docs }}/llms-full.txt">
5+
{{ end }}

themes/psh-docs/layouts/partials/page-content.html

+11
Original file line numberDiff line numberDiff line change
@@ -102,6 +102,17 @@ <h3 class="pt-4 pb-2 font-light text-base text-slate">On this page</h3>
102102
</div>
103103
{{ end }}
104104

105+
<!-- Add a Button to open the Markdown version of this page (Upsun only) -->
106+
{{ if ( eq .context.Site.Params.vendor.config.version 2 ) }}
107+
<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">
108+
<a href="{{ if eq .context.Page.RelPermalink "/" }}/index.md{{ else }}{{ .context.Page.RelPermalink | replaceRE ".html" ".md" }}{{ end }}"
109+
class="px-6 py-2 bg-[#6046FF] hover:!bg-[#4D38CC] rounded-3xl text-white text-center text-sm font-semibold"
110+
title="View this page in a Markdown format"
111+
target="_blank">
112+
View Markdown version
113+
</a>
114+
</div>
115+
{{ end }}
105116
</div>
106117

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

0 commit comments

Comments
 (0)