forked from influxdata/docs-v2
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
add JSON page lists for use in the v3 UI (influxdata#5363)
- Loading branch information
Showing
7 changed files
with
136 additions
and
16 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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 }} | ||
] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,21 +1,23 @@ | ||
<urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9" | ||
xmlns:xhtml="http://www.w3.org/1999/xhtml"> | ||
{{ range .Data.Pages }} | ||
<url> | ||
<loc>{{ .Permalink }}</loc>{{ if not .Lastmod.IsZero }} | ||
<lastmod>{{ safeHTML ( .Lastmod.Format "2006-01-02T15:04:05-07:00" ) }}</lastmod>{{ end }}{{ with .Sitemap.ChangeFreq }} | ||
<changefreq>{{ . }}</changefreq>{{ end }}{{ if ge .Sitemap.Priority 0.0 }} | ||
<priority>{{ .Sitemap.Priority }}</priority>{{ end }}{{ if .IsTranslated }}{{ range .Translations }} | ||
<xhtml:link | ||
rel="alternate" | ||
hreflang="{{ .Lang }}" | ||
href="{{ .Permalink }}" | ||
/>{{ end }} | ||
<xhtml:link | ||
rel="alternate" | ||
hreflang="{{ .Lang }}" | ||
href="{{ .Permalink }}" | ||
/>{{ end }} | ||
</url> | ||
{{ if not .Params.omit_from_sitemap }} | ||
<url> | ||
<loc>{{ .Permalink }}</loc>{{ if not .Lastmod.IsZero }} | ||
<lastmod>{{ safeHTML ( .Lastmod.Format "2006-01-02T15:04:05-07:00" ) }}</lastmod>{{ end }}{{ with .Sitemap.ChangeFreq }} | ||
<changefreq>{{ . }}</changefreq>{{ end }}{{ if ge .Sitemap.Priority 0.0 }} | ||
<priority>{{ .Sitemap.Priority }}</priority>{{ end }}{{ if .IsTranslated }}{{ range .Translations }} | ||
<xhtml:link | ||
rel="alternate" | ||
hreflang="{{ .Lang }}" | ||
href="{{ .Permalink }}" | ||
/>{{ end }} | ||
<xhtml:link | ||
rel="alternate" | ||
hreflang="{{ .Lang }}" | ||
href="{{ .Permalink }}" | ||
/>{{ end }} | ||
</url> | ||
{{ end }} | ||
{{ end }} | ||
</urlset> |