add JSON page lists for use in the v3 UI (#5363)
parent
7520bccd29
commit
259e8e67b4
|
@ -0,0 +1,9 @@
|
||||||
|
---
|
||||||
|
layout: page-list
|
||||||
|
outputs: [json]
|
||||||
|
omit_from_sitemap: true
|
||||||
|
---
|
||||||
|
|
||||||
|
This file is used to generate a JSON file containing the navigation structure
|
||||||
|
for this product. The InfluxDB v3 UI retrieves this JSON to build documentation
|
||||||
|
links in the UI.
|
|
@ -0,0 +1,9 @@
|
||||||
|
---
|
||||||
|
layout: page-list
|
||||||
|
outputs: [json]
|
||||||
|
omit_from_sitemap: true
|
||||||
|
---
|
||||||
|
|
||||||
|
This file is used to generate a JSON file containing the navigation structure
|
||||||
|
for this product. The InfluxDB v3 UI retrieves this JSON to build documentation
|
||||||
|
links in the UI.
|
|
@ -0,0 +1,9 @@
|
||||||
|
---
|
||||||
|
layout: page-list
|
||||||
|
outputs: [json]
|
||||||
|
omit_from_sitemap: true
|
||||||
|
---
|
||||||
|
|
||||||
|
This file is used to generate a JSON file containing the navigation structure
|
||||||
|
for this product. The InfluxDB v3 UI retrieves this JSON to build documentation
|
||||||
|
links in the UI.
|
|
@ -46,3 +46,8 @@ smartDashes = false
|
||||||
[privacy.youtube]
|
[privacy.youtube]
|
||||||
disable = false
|
disable = false
|
||||||
privacyEnhanced = true
|
privacyEnhanced = true
|
||||||
|
|
||||||
|
[outputFormats.json]
|
||||||
|
mediaType = "application/json"
|
||||||
|
baseName = "pages"
|
||||||
|
isPlainText = true
|
||||||
|
|
|
@ -42,3 +42,8 @@ smartDashes = false
|
||||||
[privacy.youtube]
|
[privacy.youtube]
|
||||||
disable = false
|
disable = false
|
||||||
privacyEnhanced = true
|
privacyEnhanced = true
|
||||||
|
|
||||||
|
[outputFormats.json]
|
||||||
|
mediaType = "application/json"
|
||||||
|
baseName = "pages"
|
||||||
|
isPlainText = true
|
||||||
|
|
|
@ -0,0 +1,81 @@
|
||||||
|
{{- $productPathData := findRE "[^/]+.*?" .RelPermalink -}}
|
||||||
|
{{- $product := index $productPathData 0 -}}
|
||||||
|
{{- $version := index $productPathData 1 -}}
|
||||||
|
{{- $menuKey := print $product "_" (replaceRE `-` "_" $version) -}}
|
||||||
|
{{- $menu := index .Site.Menus $menuKey -}}
|
||||||
|
[
|
||||||
|
{{ range $index, $entry := $menu }}
|
||||||
|
{{- if $index -}},{{- end }}
|
||||||
|
{
|
||||||
|
"name": {{ .Name | jsonify }},
|
||||||
|
"url": {{ absURL (cond (isset .Params "url") .Params.url .URL) | jsonify }},
|
||||||
|
"children": [
|
||||||
|
{{- range $index, $entry := .Children -}}
|
||||||
|
{{- if $index -}},{{- end }}
|
||||||
|
{
|
||||||
|
"name": {{ .Name | jsonify }},
|
||||||
|
"url": {{ absURL (cond (isset .Params "url") .Params.url .URL) | jsonify }},
|
||||||
|
"children": [
|
||||||
|
{{- range $index, $entry := .Children -}}
|
||||||
|
{{- if $index -}},{{- end }}
|
||||||
|
{
|
||||||
|
"name": {{ .Name | jsonify }},
|
||||||
|
"url": {{ absURL (cond (isset .Params "url") .Params.url .URL) | jsonify }},
|
||||||
|
"children": [
|
||||||
|
{{- range $index, $entry := .Children -}}
|
||||||
|
{{- if $index -}},{{- end }}
|
||||||
|
{
|
||||||
|
"name": {{ .Name | jsonify }},
|
||||||
|
"url": {{ absURL (cond (isset .Params "url") .Params.url .URL) | jsonify }},
|
||||||
|
"children": [
|
||||||
|
{{- range $index, $entry := .Children -}}
|
||||||
|
{{- if $index -}},{{- end }}
|
||||||
|
{
|
||||||
|
"name": {{ .Name | jsonify }},
|
||||||
|
"url": {{ absURL (cond (isset .Params "url") .Params.url .URL) | jsonify }},
|
||||||
|
"children": [
|
||||||
|
{{- range $index, $entry := .Children -}}
|
||||||
|
{{- if $index -}},{{- end }}
|
||||||
|
{
|
||||||
|
"name": {{ .Name | jsonify }},
|
||||||
|
"url": {{ absURL (cond (isset .Params "url") .Params.url .URL) | jsonify }},
|
||||||
|
"children": [
|
||||||
|
{{- range $index, $entry := .Children -}}
|
||||||
|
{{- if $index -}},{{- end }}
|
||||||
|
{
|
||||||
|
"name": {{ .Name | jsonify }},
|
||||||
|
"url": {{ absURL (cond (isset .Params "url") .Params.url .URL) | jsonify }},
|
||||||
|
"children": [
|
||||||
|
{{- range $index, $entry := .Children -}}
|
||||||
|
{{- if $index -}},{{- end }}
|
||||||
|
{
|
||||||
|
"name": {{ .Name | jsonify }},
|
||||||
|
"url": {{ absURL (cond (isset .Params "url") .Params.url .URL) | jsonify }},
|
||||||
|
"children": [
|
||||||
|
{{ range .Children }}
|
||||||
|
{{ end }}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
{{ end }}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
{{ end }}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
{{ end }}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
{{ end }}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
{{ end }}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
{{ end }}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
{{ end }}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
{{ end }}
|
||||||
|
]
|
|
@ -1,21 +1,23 @@
|
||||||
<urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9"
|
<urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9"
|
||||||
xmlns:xhtml="http://www.w3.org/1999/xhtml">
|
xmlns:xhtml="http://www.w3.org/1999/xhtml">
|
||||||
{{ range .Data.Pages }}
|
{{ range .Data.Pages }}
|
||||||
<url>
|
{{ if not .Params.omit_from_sitemap }}
|
||||||
<loc>{{ .Permalink }}</loc>{{ if not .Lastmod.IsZero }}
|
<url>
|
||||||
<lastmod>{{ safeHTML ( .Lastmod.Format "2006-01-02T15:04:05-07:00" ) }}</lastmod>{{ end }}{{ with .Sitemap.ChangeFreq }}
|
<loc>{{ .Permalink }}</loc>{{ if not .Lastmod.IsZero }}
|
||||||
<changefreq>{{ . }}</changefreq>{{ end }}{{ if ge .Sitemap.Priority 0.0 }}
|
<lastmod>{{ safeHTML ( .Lastmod.Format "2006-01-02T15:04:05-07:00" ) }}</lastmod>{{ end }}{{ with .Sitemap.ChangeFreq }}
|
||||||
<priority>{{ .Sitemap.Priority }}</priority>{{ end }}{{ if .IsTranslated }}{{ range .Translations }}
|
<changefreq>{{ . }}</changefreq>{{ end }}{{ if ge .Sitemap.Priority 0.0 }}
|
||||||
<xhtml:link
|
<priority>{{ .Sitemap.Priority }}</priority>{{ end }}{{ if .IsTranslated }}{{ range .Translations }}
|
||||||
rel="alternate"
|
<xhtml:link
|
||||||
hreflang="{{ .Lang }}"
|
rel="alternate"
|
||||||
href="{{ .Permalink }}"
|
hreflang="{{ .Lang }}"
|
||||||
/>{{ end }}
|
href="{{ .Permalink }}"
|
||||||
<xhtml:link
|
/>{{ end }}
|
||||||
rel="alternate"
|
<xhtml:link
|
||||||
hreflang="{{ .Lang }}"
|
rel="alternate"
|
||||||
href="{{ .Permalink }}"
|
hreflang="{{ .Lang }}"
|
||||||
/>{{ end }}
|
href="{{ .Permalink }}"
|
||||||
</url>
|
/>{{ end }}
|
||||||
|
</url>
|
||||||
|
{{ end }}
|
||||||
{{ end }}
|
{{ end }}
|
||||||
</urlset>
|
</urlset>
|
||||||
|
|
Loading…
Reference in New Issue