Skip to content

Commit ab8b09b

Browse files
committed
feat: Added Markdown generation for markdown versions of all pages
1 parent 08c4f71 commit ab8b09b

14 files changed

Lines changed: 456 additions & 87 deletions

File tree

.github/workflows/gh-pages.yml

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,9 +26,18 @@ jobs:
2626
hugo-version: '0.133.1'
2727
extended: true
2828

29+
- name: Setup Node.js
30+
uses: actions/setup-node@v6
31+
with:
32+
node-version: '22'
33+
34+
- name: Install markdown generator dependencies
35+
run: npm install asciidoctor @asciidoctor/reducer downdoc
36+
2937
- name: Build
3038
run: |
3139
hugo --minify
40+
node utils/generate-md.js
3241
3342
- name: Deploy
3443
uses: peaceiris/actions-gh-pages@v4

Makefile

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ UNAME=$(shell uname -s)
55
# Also because of the proxy 127.0.0.1 doesn't work as a bind address.
66
ifeq ($(UNAME), Darwin)
77
PODMAN_OPTS ?= -it --security-opt label=disable --pull=newer -p 4000:4000
8-
HUGO_SERVER_OPTS = --bind 0.0.0.0
8+
HUGO_SERVER_OPTS = --bind 0.0.0.0
99
else
1010
PODMAN_OPTS ?= -it --security-opt label=disable --pull=newer --net=host
1111
endif
@@ -35,12 +35,17 @@ test: htmltest ## Runs tests
3535

3636
.PHONY: build
3737
build: ## Build the website locally in the public/ folder
38-
podman run $(PODMAN_OPTS) -v $(PWD):/site:$(ATTRS) --entrypoint hugo $(HOMEPAGE_CONTAINER)
38+
podman run $(PODMAN_OPTS) -v $(PWD):/site:$(ATTRS) $(HOMEPAGE_CONTAINER) -c "hugo && node utils/generate-md.js"
39+
40+
.PHONY: generate-md
41+
generate-md: ## Generate Markdown versions of all pages in public/
42+
node utils/generate-md.js
3943

4044
.PHONY: serve
4145
serve: ## Build the website locally from a container and serve it
4246
@echo "Serving via container. Browse to http://localhost:4000"
43-
podman run $(PODMAN_OPTS) -v $(PWD):/site:$(ATTRS) --entrypoint hugo $(HOMEPAGE_CONTAINER) server -p 4000 $(HUGO_SERVER_OPTS)
47+
podman run $(PODMAN_OPTS) -v $(PWD):/site:$(ATTRS) $(HOMEPAGE_CONTAINER) -c "hugo && node utils/generate-md.js && hugo server -p 4000 $(HUGO_SERVER_OPTS)"
48+
4449

4550
.PHONY: htmltest
4651
htmltest: build ## Runs htmltest against the site to find broken links

config.yaml

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,11 @@ mediaTypes:
4646
outputFormats:
4747
patterns:
4848
mediatype: application/json
49+
llmstxt:
50+
mediatype: text/plain
51+
baseName: llms
52+
isPlainText: true
53+
notAlternative: true
4954

5055
menus:
5156
main:
@@ -57,3 +62,7 @@ sitemap:
5762
priority: 0.5
5863
filename: sitemap.xml
5964
enableRobotsTXT: true
65+
outputs:
66+
home:
67+
- html
68+
- llmstxt

layouts/index.llmstxt.txt

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
# {{ .Site.Title }}
2+
3+
> {{ .Site.Params.description }}
4+
5+
Important notes:
6+
7+
- Validated Patterns are built on OpenShift Container Platform (Kubernetes) and leverage GitOps principles using ArgoCD, Red Hat Advanced Cluster Management (RHACM), and Tekton
8+
- They are designed for IT architects, advanced developers, and system administrators familiar with Kubernetes and OpenShift
9+
- Patterns can be deployed using either the OpenShift-based Validated Patterns framework or the Ansible GitOps Framework (AGOF)
10+
- All patterns require an available OpenShift 4.12+ cluster with cluster-admin privileges, at least 8 CPU cores, 16GB RAM, and dynamic storage provisioning
11+
- Each pattern includes values files (values-global.yaml, values-hub.yaml) for customization and secrets management without committing sensitive data to git repositories
12+
- Markdown versions of all pages are available by appending index.md to any page URL. For example: https://validatedpatterns.io/learn/quickstart/index.md
13+
- Full documentation in a single file: https://validatedpatterns.io/llms-full.txt
14+
15+
## Learn
16+
{{ range where .Site.RegularPages "Section" "learn" }}
17+
- [{{ .Title }}]({{ .Permalink }}): {{ with .Params.summary }}{{ . }}{{ else }}{{ .Summary | plainify | truncate 150 }}{{ end }}
18+
{{- end }}
19+
20+
## Patterns
21+
{{ range .Site.Sections }}{{ if eq .Section "patterns" }}{{ range .Sections }}
22+
- [{{ .Title }}]({{ .Permalink }}): {{ with .Params.summary }}{{ . }}{{ else }}{{ .Summary | plainify | truncate 150 }}{{ end }}
23+
{{- end }}{{ end }}{{ end }}
24+
25+
## Contributing
26+
{{ range where .Site.RegularPages "Section" "contribute" }}
27+
- [{{ .Title }}]({{ .Permalink }}): {{ with .Params.summary }}{{ . }}{{ else }}{{ .Summary | plainify | truncate 150 }}{{ end }}
28+
{{- end }}

layouts/partials/head.html

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,11 @@
3838
{{- /* Favicon */ -}}
3939
<link rel="icon" type="image/x-icon" href="/favicon.ico">
4040
<link rel="apple-touch-icon" sizes="180x180" href="/images/validated-patterns.png">
41+
42+
{{- /* Agent Discovery Links (RFC 8288 / RFC 9727) */ -}}
43+
<link rel="api-catalog" href="/.well-known/api-catalog" type="application/linkset+json">
44+
<link rel="service-doc" href="/llms.txt" type="text/plain">
45+
<link rel="sitemap" href="/sitemap.xml" type="application/xml">
4146

4247
{{- /* DNS Prefetch and Preconnect for Performance */ -}}
4348
<link rel="dns-prefetch" href="//use.fontawesome.com">

layouts/partials/page-actions.html

Lines changed: 5 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,4 @@
1-
{{- $repo := .Site.Params.github_repo | default "validatedpatterns/docs" -}}
2-
{{- $branch := .Site.Params.github_branch | default "main" -}}
3-
{{- $filePath := "" -}}
4-
{{- $rawUrl := "" -}}
5-
{{- $sourceLabel := "View source" -}}
6-
{{- if .File -}}
7-
{{- $filePath = .File.Path -}}
8-
{{- $rawUrl = printf "https://raw.githubusercontent.com/%s/%s/content/%s" $repo $branch $filePath -}}
9-
{{- if strings.HasSuffix $filePath ".md" -}}
10-
{{- $sourceLabel = "View as Markdown" -}}
11-
{{- end -}}
12-
{{- end -}}
1+
{{- $mdUrl := printf "%sindex.md" .Permalink -}}
132

143
<div class="page-actions" data-permalink="{{ .Permalink }}">
154
<button type="button" class="page-actions__button" data-action="copy-page" aria-label="Copy page content">
@@ -25,21 +14,19 @@
2514
<i class="fas fa-link" aria-hidden="true"></i> Copy link
2615
</button>
2716
</li>
28-
{{- if $rawUrl }}
2917
<li role="menuitem">
30-
<a href="{{ $rawUrl }}" target="_blank" rel="noopener">
31-
<i class="fab fa-markdown" aria-hidden="true"></i> {{ $sourceLabel }}
18+
<a href="{{ $mdUrl }}" target="_blank" rel="noopener">
19+
<i class="fab fa-markdown" aria-hidden="true"></i> View as Markdown
3220
</a>
3321
</li>
34-
{{- end }}
3522
<li class="page-actions__divider" role="separator"></li>
3623
<li role="menuitem">
37-
<a href="https://claude.ai/new?q={{ printf "Read and summarize this documentation page: %s" .Permalink | urlquery }}" target="_blank" rel="noopener">
24+
<a href="https://claude.ai/new?q={{ printf "Read this page from the Validated Patterns docs: %sindex.md and answer questions about the content." .Permalink | urlquery }}" target="_blank" rel="noopener">
3825
<i class="fas fa-robot" aria-hidden="true"></i> Open in Claude
3926
</a>
4027
</li>
4128
<li role="menuitem">
42-
<a href="https://chatgpt.com/?q={{ printf "Read and summarize this documentation page: %s" .Permalink | urlquery }}" target="_blank" rel="noopener">
29+
<a href="https://chatgpt.com/?q={{ printf "Read this page from the Validated Patterns docs: %sindex.md and answer questions about the content." .Permalink | urlquery }}" target="_blank" rel="noopener">
4330
<i class="fas fa-comment-dots" aria-hidden="true"></i> Open in ChatGPT
4431
</a>
4532
</li>

layouts/robots.txt

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
User-agent: *
2+
Allow: /
3+
4+
User-agent: GPTBot
5+
Allow: /
6+
7+
User-agent: OAI-SearchBot
8+
Allow: /
9+
10+
User-agent: Claude-Web
11+
Allow: /
12+
13+
User-agent: Google-Extended
14+
Allow: /
15+
16+
User-agent: Applebot-Extended
17+
Allow: /
18+
19+
User-agent: CCBot
20+
Allow: /
21+
22+
User-agent: PerplexityBot
23+
Allow: /
24+
25+
User-agent: Bytespider
26+
Disallow: /
27+
28+
User-agent: AhrefsBot
29+
Disallow: /
30+
31+
Sitemap: {{ "sitemap.xml" | absURL }}
32+
33+
Content-Signal: ai-train=no, search=yes, ai-input=yes

layouts/search/list.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,4 +22,4 @@ <h1 class="pf-c-title pf-m-4xl">
2222
{{ partialCached "footer.html" . }}
2323
</main>
2424

25-
{{ end }}
25+
{{ end }}
Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
{
2+
"$schema": "https://agentskills.io/schema/index.json",
3+
"skills": [
4+
{
5+
"name": "validated-patterns-docs",
6+
"type": "documentation",
7+
"description": "Browse documentation for Red Hat Validated Patterns — GitOps-driven, automated application stacks for hybrid cloud deployments on OpenShift.",
8+
"url": "https://validatedpatterns.io/llms.txt"
9+
},
10+
{
11+
"name": "pattern-catalog",
12+
"type": "catalog",
13+
"description": "Discover 30+ validated patterns organized by industry, Red Hat product, and partner, with deployment guides and architecture details.",
14+
"url": "https://validatedpatterns.io/patterns/"
15+
},
16+
{
17+
"name": "quickstart-guide",
18+
"type": "tutorial",
19+
"description": "Step-by-step guide to deploying your first validated pattern on OpenShift using the GitOps framework.",
20+
"url": "https://validatedpatterns.io/learn/quickstart/"
21+
}
22+
]
23+
}

static/.well-known/api-catalog

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
{
2+
"linkset": [
3+
{
4+
"anchor": "https://validatedpatterns.io/",
5+
"service-doc": [
6+
{
7+
"href": "https://validatedpatterns.io/learn/quickstart/",
8+
"type": "text/html"
9+
}
10+
],
11+
"describedby": [
12+
{
13+
"href": "https://validatedpatterns.io/llms.txt",
14+
"type": "text/plain"
15+
},
16+
{
17+
"href": "https://validatedpatterns.io/sitemap.xml",
18+
"type": "application/xml"
19+
}
20+
]
21+
}
22+
]
23+
}

0 commit comments

Comments
 (0)