Skip to content

Commit

Permalink
Add note to all pages that are on older versions of the pages (#123)
Browse files Browse the repository at this point in the history
  • Loading branch information
andrewc-dev authored Jun 5, 2019
1 parent a40c280 commit 5ff4c09
Show file tree
Hide file tree
Showing 6 changed files with 26 additions and 19 deletions.
2 changes: 1 addition & 1 deletion docs/content/search.html
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,6 @@
<div class="search-by-algolia">
<img src="/images/search-by-algolia.svg" />
</div>
<div class="search-results-container" id="search-results"/>
<div class="search-results-container" id="search-results"></div>

<br>
5 changes: 0 additions & 5 deletions docs/content/v1.0/_index.html
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,6 @@
---


{{< note title="Note" >}}
Click <a href="/latest/">here</a> to go to documentation for the latest version of YugaByte DB.
{{< /note >}}


<div class="row">
<div class="col-12 col-md-6">
<a class="section-link icon-offset" href="introduction/">
Expand Down
4 changes: 0 additions & 4 deletions docs/content/v1.0/quick-start/_index.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,6 @@ menu:
identifier: quick-start
weight: 100
---
{{< note title="Note" >}}
Click <a href="/latest/quick-start/">here</a> to go to documentation for the latest version of YugaByte DB.
{{< /note >}}


{{< hero class="enterprise-edition" title="YugaByte DB Enterprise Edition" >}}
<p class="subtitle">
Expand Down
4 changes: 0 additions & 4 deletions docs/content/v1.0/quick-start/install.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,6 @@ menu:
type: page
---

{{< note title="Note" >}}
Click <a href="/latest/quick-start/install/">here</a> to go to documentation for the latest version of YugaByte DB.
{{< /note >}}


<ul class="nav nav-tabs nav-tabs-yb">
<li >
Expand Down
17 changes: 13 additions & 4 deletions docs/layouts/_default/list.html
Original file line number Diff line number Diff line change
Expand Up @@ -23,14 +23,23 @@
<article class="article">
<div class="wrapper">
<div class="image">
<img alt="{{ .Description }}" title="{{ .Description }}" src="{{ .Page.Params.image }}">
</div>
<img alt="{{ .Description }}" title="{{ .Description }}" src="{{ .Page.Params.image }}" />
</div>
{{ partial "breadcrumbs" (dict "context" . "menu" (.Scratch.Get "currentVersionMenu")) }}

<h1>{{ .Description }} {{ if .IsDraft }} (Draft){{ end }}</h1>

<div class="head-content clearfix">{{ .Page.Params.headcontent }} </div>

<div class="head-content clearfix">{{ .Page.Params.headcontent }}</div>

{{ $urlArray := split (urls.Parse .Permalink).Path "/" }}
{{ $latestUrl := path.Join "latest" (after 2 $urlArray) }}
{{ $latestUrl = add (add "/" $latestUrl) "/" }}
{{ if ne (index $urlArray 1) "latest" }}
<div class="admonition note">
<p class="admonition-title">Note</p>
Click <a href="{{ $latestUrl }}">here</a> to go to documentation for the latest version of YugaByte DB.
</div>
{{ end }}

{{ .Content }}

Expand Down
13 changes: 12 additions & 1 deletion docs/layouts/_default/single.html
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,19 @@
{{ partial "breadcrumbs" (dict "context" . "menu" (.Scratch.Get "currentVersionMenu")) }}

<h1>{{ .Description }} {{ if .IsDraft }} (Draft){{ end }}{{ if .Page.Params.beta }}<a class="tag-beta" href="{{ .Page.Params.beta }}">Beta</a>{{ end }}</h1>

{{ $urlArray := split (urls.Parse .Permalink).Path "/" }}
{{ $latestUrl := path.Join "latest" (after 2 $urlArray) }}
{{ $latestUrl = add (add "/" $latestUrl) "/" }}
{{ if ne (index $urlArray 1) "latest" }}
<div class="admonition note">
<p class="admonition-title">Note</p>
Click <a href="{{ $latestUrl }}">here</a> to go to documentation for the latest version of YugaByte DB.
</div>
{{ end }}
<br />

{{if (.Params.showAsideToc) }}
{{if (.Params.showAsideToc) }}
<div id="toc-static">{{ .TableOfContents }}</div>
{{ else }}
{{ .TableOfContents }}
Expand Down

0 comments on commit 5ff4c09

Please sign in to comment.