added structure for reference navigation
parent
117a18d387
commit
1a2dbc0e64
|
@ -240,3 +240,26 @@ to seeing the full content block.
|
||||||
Truncated markdown content here.
|
Truncated markdown content here.
|
||||||
{{% /truncate %}}
|
{{% /truncate %}}
|
||||||
```
|
```
|
||||||
|
|
||||||
|
### Reference content
|
||||||
|
The InfluxDB documentation is "task-based," meaning content primarily focuses on
|
||||||
|
what a user is **doing**, not what they are **using**.
|
||||||
|
However, there is a need to document tools and other things that don't necessarily
|
||||||
|
fit in the task-based style.
|
||||||
|
This is referred to as "reference content."
|
||||||
|
|
||||||
|
Reference content is styled just as the rest of the InfluxDB documentation.
|
||||||
|
The only difference is the `menu` reference in the page's frontmatter.
|
||||||
|
When defining the menu for reference content, use the following pattern:
|
||||||
|
|
||||||
|
```yaml
|
||||||
|
# Pattern
|
||||||
|
menu:
|
||||||
|
v<major-version-number>_<minor-version-number>_ref:
|
||||||
|
# ...
|
||||||
|
|
||||||
|
# Example
|
||||||
|
menu:
|
||||||
|
v2_0_ref:
|
||||||
|
# ...
|
||||||
|
```
|
||||||
|
|
|
@ -1,6 +1,10 @@
|
||||||
///////////////////////////// Make headers linkable /////////////////////////////
|
///////////////////////////// Make headers linkable /////////////////////////////
|
||||||
|
|
||||||
$("h2,h3,h4,h5,h6").each(function() {
|
$(".article--content h2, \
|
||||||
|
.article--content h3, \
|
||||||
|
.article--content h4, \
|
||||||
|
.article--content h5, \
|
||||||
|
.article--content h6" ).each(function() {
|
||||||
var link = "<a href=\"#" + $(this).attr("id") + "\"></a>"
|
var link = "<a href=\"#" + $(this).attr("id") + "\"></a>"
|
||||||
$(this).wrapInner( link );
|
$(this).wrapInner( link );
|
||||||
})
|
})
|
||||||
|
|
|
@ -207,6 +207,17 @@
|
||||||
&:after { transform: rotate(180deg); }
|
&:after { transform: rotate(180deg); }
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Reference title styles
|
||||||
|
h4 {
|
||||||
|
margin: 2rem 0 0 -1rem;
|
||||||
|
color: rgba($article-heading, .8);
|
||||||
|
font-style: italic;
|
||||||
|
font-weight: 700;
|
||||||
|
text-transform: uppercase;
|
||||||
|
font-size: .85rem;
|
||||||
|
letter-spacing: .08rem;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -0,0 +1,11 @@
|
||||||
|
---
|
||||||
|
title: Command line tools
|
||||||
|
seotitle: Command line tools for managing InfluxDB
|
||||||
|
description: InfluxDB comes with command line tools meant to aid in managing and working with InfluxDB.
|
||||||
|
menu:
|
||||||
|
v2_0_ref:
|
||||||
|
name: Command line tools
|
||||||
|
weight: 1
|
||||||
|
---
|
||||||
|
|
||||||
|
_Placeholder for command line content._
|
|
@ -97,5 +97,84 @@
|
||||||
{{ end }}
|
{{ end }}
|
||||||
</li>
|
</li>
|
||||||
{{end}}
|
{{end}}
|
||||||
|
|
||||||
|
<!-- Reference Section -->
|
||||||
|
{{ $refMenuID := print (replaceRE "[.]" "_" $currentVersion) "_ref" }}
|
||||||
|
<h4 class="reference">Reference</h4>
|
||||||
|
|
||||||
|
{{ range (index .Site.Menus $refMenuID) }}
|
||||||
|
<!-- Nested Reference Navigation -->
|
||||||
|
<li class="nav-category {{ if .HasChildren }}parent{{ end }} {{ if or ($currentPage.IsMenuCurrent .Menu .) ($currentPage.HasMenuCurrent .Menu .) }}active{{end}}">
|
||||||
|
{{ if .HasChildren }}<a href="#" class="children-toggle {{ if .HasChildren }}parent{{ end }} {{ if or ($currentPage.IsMenuCurrent .Menu .) ($currentPage.HasMenuCurrent .Menu .) }}open{{end}}"></a>{{ end }}
|
||||||
|
<a href="{{ .URL }}">{{ .Name }}</a>
|
||||||
|
{{ if .HasChildren }}
|
||||||
|
<ul class="children {{ if .HasChildren }}parent{{ end }} {{ if or ($currentPage.IsMenuCurrent .Menu .) ($currentPage.HasMenuCurrent .Menu .) }}open{{end}}">
|
||||||
|
{{ range .Children }}
|
||||||
|
<li class="nav-item {{ if .HasChildren }}parent{{ end }} {{ if or ($currentPage.IsMenuCurrent .Menu .) ($currentPage.HasMenuCurrent .Menu .) }}active{{end}}">
|
||||||
|
{{ if .HasChildren }}<a href="#" class="children-toggle {{ if .HasChildren }}parent{{ end }} {{ if or ($currentPage.IsMenuCurrent .Menu .) ($currentPage.HasMenuCurrent .Menu .) }}open{{end}}"></a>{{ end }}
|
||||||
|
<a href="{{ .URL }}">{{ .Name }}</a>
|
||||||
|
{{ if .HasChildren }}
|
||||||
|
<ul class="children {{ if .HasChildren }}parent{{ end }} {{ if or ($currentPage.IsMenuCurrent .Menu .) ($currentPage.HasMenuCurrent .Menu .) }}open{{end}}">
|
||||||
|
{{ range .Children }}
|
||||||
|
<li class="nav-item {{ if .HasChildren }}parent{{ end }} {{ if or ($currentPage.IsMenuCurrent .Menu .) ($currentPage.HasMenuCurrent .Menu .) }}active{{end}}">
|
||||||
|
{{ if .HasChildren }}<a href="#" class="children-toggle {{ if .HasChildren }}parent{{ end }} {{ if or ($currentPage.IsMenuCurrent .Menu .) ($currentPage.HasMenuCurrent .Menu .) }}open{{end}}"></a>{{ end }}
|
||||||
|
<a href="{{ .URL }}">{{ .Name }}</a>
|
||||||
|
{{ if .HasChildren }}
|
||||||
|
<ul class="children {{ if .HasChildren }}parent{{ end }} {{ if or ($currentPage.IsMenuCurrent .Menu .) ($currentPage.HasMenuCurrent .Menu .) }}open{{end}}">
|
||||||
|
{{ range .Children }}
|
||||||
|
<li class="nav-item {{ if .HasChildren }}parent{{ end }} {{ if or ($currentPage.IsMenuCurrent .Menu .) ($currentPage.HasMenuCurrent .Menu .) }}active{{end}}">
|
||||||
|
{{ if .HasChildren }}<a href="#" class="children-toggle {{ if .HasChildren }}parent{{ end }} {{ if or ($currentPage.IsMenuCurrent .Menu .) ($currentPage.HasMenuCurrent .Menu .) }}open{{end}}"></a>{{ end }}
|
||||||
|
<a href="{{ .URL }}">{{ .Name }}</a>
|
||||||
|
{{ if .HasChildren }}
|
||||||
|
<ul class="children {{ if .HasChildren }}parent{{ end }} {{ if or ($currentPage.IsMenuCurrent .Menu .) ($currentPage.HasMenuCurrent .Menu .) }}open{{end}}">
|
||||||
|
{{ range .Children }}
|
||||||
|
<li class="nav-item {{ if .HasChildren }}parent{{ end }} {{ if or ($currentPage.IsMenuCurrent .Menu .) ($currentPage.HasMenuCurrent .Menu .) }}active{{end}}">
|
||||||
|
{{ if .HasChildren }}<a href="#" class="children-toggle {{ if .HasChildren }}parent{{ end }} {{ if or ($currentPage.IsMenuCurrent .Menu .) ($currentPage.HasMenuCurrent .Menu .) }}open{{end}}"></a>{{ end }}
|
||||||
|
<a href="{{ .URL }}">{{ .Name }}</a>
|
||||||
|
{{ if .HasChildren }}
|
||||||
|
<ul class="children {{ if .HasChildren }}parent{{ end }} {{ if or ($currentPage.IsMenuCurrent .Menu .) ($currentPage.HasMenuCurrent .Menu .) }}open{{end}}">
|
||||||
|
{{ range .Children }}
|
||||||
|
<li class="nav-item {{ if .HasChildren }}parent{{ end }} {{ if or ($currentPage.IsMenuCurrent .Menu .) ($currentPage.HasMenuCurrent .Menu .) }}active{{end}}">
|
||||||
|
{{ if .HasChildren }}<a href="#" class="children-toggle {{ if .HasChildren }}parent{{ end }} {{ if or ($currentPage.IsMenuCurrent .Menu .) ($currentPage.HasMenuCurrent .Menu .) }}open{{end}}"></a>{{ end }}
|
||||||
|
<a href="{{ .URL }}">{{ .Name }}</a>
|
||||||
|
|
||||||
|
<!-- Begin nested block -->
|
||||||
|
{{ if .HasChildren }}
|
||||||
|
<ul class="children {{ if .HasChildren }}parent{{ end }} {{ if or ($currentPage.IsMenuCurrent .Menu .) ($currentPage.HasMenuCurrent .Menu .) }}open{{end}}">
|
||||||
|
{{ range .Children }}
|
||||||
|
<li class="nav-item {{ if .HasChildren }}parent{{ end }} {{ if or ($currentPage.IsMenuCurrent .Menu .) ($currentPage.HasMenuCurrent .Menu .) }}active{{end}}">
|
||||||
|
{{ if .HasChildren }}<a href="#" class="children-toggle {{ if .HasChildren }}parent{{ end }} {{ if or ($currentPage.IsMenuCurrent .Menu .) ($currentPage.HasMenuCurrent .Menu .) }}open{{end}}"></a>{{ end }}
|
||||||
|
<a href="{{ .URL }}">{{ .Name }}</a>
|
||||||
|
<!-- To add more nested layers, copy the nested block and paste it here -->
|
||||||
|
</li>
|
||||||
|
{{ end }}
|
||||||
|
</ul>
|
||||||
|
{{ end }}
|
||||||
|
<!-- End nested block -->
|
||||||
|
|
||||||
|
</li>
|
||||||
|
{{ end }}
|
||||||
|
</ul>
|
||||||
|
{{ end }}
|
||||||
|
</li>
|
||||||
|
{{ end }}
|
||||||
|
</ul>
|
||||||
|
{{ end }}
|
||||||
|
</li>
|
||||||
|
{{ end }}
|
||||||
|
</ul>
|
||||||
|
{{ end }}
|
||||||
|
</li>
|
||||||
|
{{ end }}
|
||||||
|
</ul>
|
||||||
|
{{ end }}
|
||||||
|
</li>
|
||||||
|
{{ end }}
|
||||||
|
</ul>
|
||||||
|
{{ end }}
|
||||||
|
</li>
|
||||||
|
{{end}}
|
||||||
|
|
||||||
|
|
||||||
</ul>
|
</ul>
|
||||||
</aside>
|
</aside>
|
||||||
|
|
Loading…
Reference in New Issue