From a631e637370e0223ea51faaecf0dd1e4b382ae21 Mon Sep 17 00:00:00 2001 From: David Karlsson <35727626+dvdksn@users.noreply.github.com> Date: Fri, 23 Jan 2026 08:19:18 +0100 Subject: [PATCH] site: remove front matter from generated md output The front matter addition an experiment, but I think we should remove it for now. There's no clear reason to include it. Maybe if some sort of standard emerges for structuring front matter for agents, we could consider reintroducing it. But for now I'd remove it to keep things clean and simple. Signed-off-by: David Karlsson <35727626+dvdksn@users.noreply.github.com> --- layouts/_default/api.markdown.md | 37 ++--------------------------- layouts/_default/cli.markdown.md | 34 +------------------------- layouts/_default/list.markdown.md | 35 +-------------------------- layouts/_default/single.markdown.md | 34 +------------------------- 4 files changed, 5 insertions(+), 135 deletions(-) diff --git a/layouts/_default/api.markdown.md b/layouts/_default/api.markdown.md index ff3bef0693..012b44430c 100644 --- a/layouts/_default/api.markdown.md +++ b/layouts/_default/api.markdown.md @@ -1,38 +1,5 @@ ---- -title: {{ .Title }} -url: {{ .Permalink }} -{{- range .Ancestors }} - {{- if and (not .IsHome) .Permalink }} -parent: - title: {{ .Title }} - url: {{ .Permalink }} - {{- break }} - {{- end }} -{{- end }} -{{- if .Ancestors }} -breadcrumbs: -{{- range .Ancestors.Reverse }} - {{- if and (not .IsHome) .Permalink }} - - title: {{ .Title }} - url: {{ .Permalink }} - {{- end }} -{{- end }} - - title: {{ .Title }} - url: {{ .Permalink }} -{{- end }} -{{- with .NextInSection }} -next: - title: {{ .Title }} - url: {{ .Permalink }} -{{- end }} -{{- with .PrevInSection }} -prev: - title: {{ .Title }} - url: {{ .Permalink }} -{{- end }} -{{- $specURL := urls.Parse (printf "/%s%s.yaml" .File.Dir .File.ContentBaseName) }} -openapi_spec: {{ $specURL.String | absURL }} ---- +{{- $specURL := urls.Parse (printf "/%s%s.yaml" .File.Dir .File.ContentBaseName) -}} +# {{ .Title }} {{ .Content }} diff --git a/layouts/_default/cli.markdown.md b/layouts/_default/cli.markdown.md index 99cfd9ecc0..7c03cb1f0b 100644 --- a/layouts/_default/cli.markdown.md +++ b/layouts/_default/cli.markdown.md @@ -4,39 +4,7 @@ {{- else }} {{- $data = index site.Data .Params.datafile }} {{- end -}} ---- -title: {{ .Title }} -url: {{ .Permalink }} -{{- range .Ancestors }} - {{- if and (not .IsHome) .Permalink }} -parent: - title: {{ .Title }} - url: {{ .Permalink }} - {{- break }} - {{- end }} -{{- end }} -{{- if .Ancestors }} -breadcrumbs: -{{- range .Ancestors.Reverse }} - {{- if and (not .IsHome) .Permalink }} - - title: {{ .Title }} - url: {{ .Permalink }} - {{- end }} -{{- end }} - - title: {{ .Title }} - url: {{ .Permalink }} -{{- end }} -{{- with .NextInSection }} -next: - title: {{ .Title }} - url: {{ .Permalink }} -{{- end }} -{{- with .PrevInSection }} -prev: - title: {{ .Title }} - url: {{ .Permalink }} -{{- end }} ---- +# {{ .Title }} {{ with $data.short }}**Description:** {{ . }}{{ end }} diff --git a/layouts/_default/list.markdown.md b/layouts/_default/list.markdown.md index ab2747bc38..54f3071376 100644 --- a/layouts/_default/list.markdown.md +++ b/layouts/_default/list.markdown.md @@ -1,36 +1,3 @@ ---- -title: {{ .Title }} -url: {{ .Permalink }} -{{- range .Ancestors }} - {{- if and (not .IsHome) .Permalink }} -parent: - title: {{ .Title }} - url: {{ .Permalink }} - {{- break }} - {{- end }} -{{- end }} -{{- if .Ancestors }} -breadcrumbs: -{{- range .Ancestors.Reverse }} - {{- if and (not .IsHome) .Permalink }} - - title: {{ .Title }} - url: {{ .Permalink }} - {{- end }} -{{- end }} - - title: {{ .Title }} - url: {{ .Permalink }} -{{- end }} -{{- $children := where .Pages "Permalink" "ne" "" }} -{{- if $children }} -children: -{{- range $children }} - - title: {{ .Title }} - url: {{ .Permalink }} - {{- with .Description }} - description: {{ . }} - {{- end }} -{{- end }} -{{- end }} ---- +# {{ .Title }} {{ .RenderShortcodes }} diff --git a/layouts/_default/single.markdown.md b/layouts/_default/single.markdown.md index 40c1778180..54f3071376 100644 --- a/layouts/_default/single.markdown.md +++ b/layouts/_default/single.markdown.md @@ -1,35 +1,3 @@ ---- -title: {{ .Title }} -url: {{ .Permalink }} -{{- range .Ancestors }} - {{- if and (not .IsHome) .Permalink }} -parent: - title: {{ .Title }} - url: {{ .Permalink }} - {{- break }} - {{- end }} -{{- end }} -{{- if .Ancestors }} -breadcrumbs: -{{- range .Ancestors.Reverse }} - {{- if and (not .IsHome) .Permalink }} - - title: {{ .Title }} - url: {{ .Permalink }} - {{- end }} -{{- end }} - - title: {{ .Title }} - url: {{ .Permalink }} -{{- end }} -{{- with .NextInSection }} -next: - title: {{ .Title }} - url: {{ .Permalink }} -{{- end }} -{{- with .PrevInSection }} -prev: - title: {{ .Title }} - url: {{ .Permalink }} -{{- end }} ---- +# {{ .Title }} {{ .RenderShortcodes }}