updated page title generation and other templated items
parent
17e420c1e5
commit
815db04ac7
|
@ -4,7 +4,7 @@ description: >
|
|||
Learn how to use and leverage InfluxDB in use cases such as monitoring metrics, IoT data, and events.
|
||||
layout: version-landing
|
||||
menu:
|
||||
versions:
|
||||
influxdb:
|
||||
name: v2.0
|
||||
aliases:
|
||||
- /v2.0/
|
||||
|
|
|
@ -1,5 +1,9 @@
|
|||
{{ partial "header.html" . }}
|
||||
|
||||
{{ $productPathData := findRE "[^/]+.*?" .RelPermalink }}
|
||||
{{ $product := index $productPathData 0 }}
|
||||
{{ $currentVersion := index $productPathData 1 }}
|
||||
|
||||
<div class="page-wrapper">
|
||||
{{ partial "sidebar.html" . }}
|
||||
<div class="content-wrapper">
|
||||
|
@ -7,8 +11,7 @@
|
|||
|
||||
<div class="cards">
|
||||
<div class="card main" id="get-started">
|
||||
{{ $currentVersion := replaceRE "v" "" (index (findRE "[^/]+.*?" .RelPermalink) 0) }}
|
||||
<h1>Get started with InfluxDB {{ $currentVersion }}</h1>
|
||||
<h1>Get started with InfluxDB {{ replaceRE "v" "" $currentVersion }}</h1>
|
||||
<a class="btn" href="get-started/#start-with-influxdb-cloud-2-0">Start with InfluxDB Cloud</a>
|
||||
<a class="btn oss" href="get-started/#start-with-influxdb-oss">Start with InfluxDB OSS</a>
|
||||
</div>
|
||||
|
|
|
@ -1,12 +1,19 @@
|
|||
{{ $currentVersion := replaceRE "v" "" (index (findRE "[^/]+.*?" .RelPermalink) 0) }}
|
||||
{{ $productPathData := findRE "[^/]+.*?" .RelPermalink }}
|
||||
{{ $product := index $productPathData 0 }}
|
||||
{{ $currentVersion := index $productPathData 1 }}
|
||||
|
||||
<!doctype html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
{{ partial "header/google-analytics-head.html" }}
|
||||
<meta charset="utf-8">
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
|
||||
{{ if in .RelPermalink "/cloud/"}}
|
||||
<title>{{ if .Params.seotitle }} {{ print .Params.seotitle " | " }} {{ else if .Title }} {{ print .Title " | " }}{{ end }}{{ .Site.Data.products.cloud.name }} Documentation</title>
|
||||
{{ if eq $product nil }}
|
||||
<title>InfluxData Documentation</title>
|
||||
{{ else if eq $currentVersion nil}}
|
||||
<title>{{ (index .Site.Data.products $product).name }} Documentation</title>
|
||||
{{ else if eq (len $productPathData) 2 }}
|
||||
<title>{{ (index .Site.Data.products $product).name }} {{ $currentVersion }} Documentation</title>
|
||||
{{ else }}
|
||||
<title>{{ if .Params.seotitle }} {{ print .Params.seotitle " | " }} {{ else if .Title }} {{ print .Title " | " }} {{ end }}InfluxDB {{ if $currentVersion }}{{print $currentVersion " " }}{{ end }}Documentation</title>
|
||||
{{ end }}
|
||||
|
|
|
@ -1,3 +1,7 @@
|
|||
{{ $productPathData := findRE "[^/]+.*?" .RelPermalink }}
|
||||
{{ $product := index $productPathData 0 }}
|
||||
{{ $currentVersion := index $productPathData 1 }}
|
||||
|
||||
<div class="topnav">
|
||||
<div class="topnav--left">
|
||||
<a class="influx-home" href="https://www.influxdata.com" title="InfluxData"><span class="icon-influx-logo"></span><span class="icon-influx-logotype"></span></a>
|
||||
|
@ -5,22 +9,20 @@
|
|||
<a class="docs-home" href="/{{ $.Site.Data.versions.stable_version }}">InfluxDB Docs</a>
|
||||
</div>
|
||||
<div class="topnav--right">
|
||||
{{ if or (eq $product nil) (eq $currentVersion nil) }}
|
||||
{{ else }}
|
||||
<div class="version-selector">
|
||||
{{- $currentVersion := (index (findRE "[^/]+.*?" .RelPermalink) 0) -}}
|
||||
{{ if not ( in $currentVersion "v2") }}
|
||||
<p class="selected">Select Version</p>
|
||||
{{ else }}
|
||||
<p class="selected">{{ $currentVersion }}</p>
|
||||
{{ end }}
|
||||
<p class="selected">{{ $currentVersion }}</p>
|
||||
<ul class="version-list">
|
||||
{{ range .Site.Menus.versions.ByName.Reverse }}
|
||||
{{ range (index .Site.Menus $product).ByName.Reverse }}
|
||||
<li>
|
||||
<a href="{{ .URL }}">{{ .Name }}</a>
|
||||
</li>
|
||||
{{ end }}
|
||||
<li><a href="https://docs.influxdata.com" class="legacy" target="_blank">v1.x</a></li>
|
||||
<li><a href="https://github.com/influxdata/docs.influxdata.com" class="legacy" target="_blank">v0.x</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
{{ end }}
|
||||
<button id="search-btn" onclick="toggle_sidebar('sidebar-open');document.getElementById('algolia-search-input').focus();return false;"><span class="icon-search"></span></button>
|
||||
<button class="url-trigger" href="#"><span class="icon-ui-cog-thick"></span></button>
|
||||
<button class="theme-switcher" id="theme-switch-light" onclick="switch_style('light-theme');return false;"><span class="icon-sun1"></span></button>
|
||||
|
|
Loading…
Reference in New Issue