mirror of
https://github.com/lingble/talos.git
synced 2025-11-03 05:57:53 +00:00
docs: show archived/pre-release banner based on version
Also clean up some stuff we're not going to use. Signed-off-by: Andrey Smirnov <andrey.smirnov@talos-systems.com>
This commit is contained in:
11
website/.gitignore
vendored
11
website/.gitignore
vendored
@@ -1,10 +1 @@
|
|||||||
*.log
|
resources
|
||||||
.cache
|
|
||||||
.DS_Store
|
|
||||||
src/.temp
|
|
||||||
node_modules
|
|
||||||
dist
|
|
||||||
public
|
|
||||||
!.env.example
|
|
||||||
.env
|
|
||||||
.env.*
|
|
||||||
|
|||||||
@@ -1,3 +0,0 @@
|
|||||||
FROM klakegg/hugo:ext-alpine
|
|
||||||
|
|
||||||
RUN apk add git
|
|
||||||
@@ -4,6 +4,7 @@ no_list: true
|
|||||||
linkTitle: "Documentation"
|
linkTitle: "Documentation"
|
||||||
cascade:
|
cascade:
|
||||||
type: docs
|
type: docs
|
||||||
|
preRelease: true
|
||||||
---
|
---
|
||||||
|
|
||||||
## Welcome
|
## Welcome
|
||||||
|
|||||||
@@ -1,17 +0,0 @@
|
|||||||
#Copyright 2018 Google LLC
|
|
||||||
#
|
|
||||||
#Licensed under the Apache License, Version 2.0 (the "License");
|
|
||||||
#you may not use this file except in compliance with the License.
|
|
||||||
#You may obtain a copy of the License at
|
|
||||||
#
|
|
||||||
# https://www.apache.org/licenses/LICENSE-2.0
|
|
||||||
#
|
|
||||||
#Unless required by applicable law or agreed to in writing, software
|
|
||||||
#distributed under the License is distributed on an "AS IS" BASIS,
|
|
||||||
#WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
||||||
#See the License for the specific language governing permissions and
|
|
||||||
#limitations under the License.
|
|
||||||
#
|
|
||||||
rm -rf public/
|
|
||||||
HUGO_ENV="production" hugo --gc || exit 1
|
|
||||||
s3deploy -source=public/ -region=eu-west-1 -bucket=bep.is -distribution-id=E8OKNT7W9ZYZ2 -path temp/td
|
|
||||||
@@ -1,13 +0,0 @@
|
|||||||
version: "3.3"
|
|
||||||
|
|
||||||
services:
|
|
||||||
|
|
||||||
site:
|
|
||||||
image: docsy/docsy-example
|
|
||||||
build:
|
|
||||||
context: .
|
|
||||||
command: server
|
|
||||||
ports:
|
|
||||||
- "1313:1313"
|
|
||||||
volumes:
|
|
||||||
- .:/src
|
|
||||||
@@ -1,15 +1,26 @@
|
|||||||
<!-- Check the variable that indicates whether this is an archived doc set.
|
<!-- Check the variable that indicates whether this is an archived doc set.
|
||||||
If yes, display a banner. -->
|
If yes, display a banner. -->
|
||||||
{{ if .Site.Params.archived_version }}
|
{{ $latest_version := .Site.Params.url_latest_version }}
|
||||||
|
{{ $current_version := .Section | printf "/%s" }}
|
||||||
|
|
||||||
|
{{ if .FirstSection.Params.prerelease }}
|
||||||
{{ $color := "primary" }}
|
{{ $color := "primary" }}
|
||||||
{{ $latest_version := .Site.Params.url_latest_version }}
|
|
||||||
{{ $current_version := .Site.Params.version }}
|
|
||||||
<div class="pageinfo pageinfo-{{ $color }}">
|
<div class="pageinfo pageinfo-{{ $color }}">
|
||||||
{{ with $current_version }}<p>Version {{ . | markdownify }} of the
|
{{ with $current_version }}<p>Version {{ trim . "/" | markdownify }} of the
|
||||||
|
documentation is for the Talos version being developed.
|
||||||
|
{{ with $latest_version }}For the latest stable version of Talos, see the
|
||||||
|
<a href="{{ $latest_version | safeURL }}">latest version</a>.</p>
|
||||||
|
{{ end }}
|
||||||
|
{{ end }}
|
||||||
|
</div>
|
||||||
|
{{ else if ne $latest_version $current_version }}
|
||||||
|
{{ $color := "primary" }}
|
||||||
|
<div class="pageinfo pageinfo-{{ $color }}">
|
||||||
|
{{ with $current_version }}<p>Version {{ trim . "/" | markdownify }} of the
|
||||||
documentation is no longer actively maintained. The site that you are
|
documentation is no longer actively maintained. The site that you are
|
||||||
currently viewing is an archived snapshot.
|
currently viewing is an archived snapshot.
|
||||||
{{ with $latest_version }}For up-to-date documentation, see the
|
{{ with $latest_version }}For up-to-date documentation, see the
|
||||||
<a href="{{ $latest_version | safeURL }}" target="_blank">latest version</a>.</p>
|
<a href="{{ $latest_version | safeURL }}">latest version</a>.</p>
|
||||||
{{ end }}
|
{{ end }}
|
||||||
{{ end }}
|
{{ end }}
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
Reference in New Issue
Block a user