upgraded hugo to 0.81.0, fixed isset build error, fixed formatting in grafana doc (#2218)

pull/2222/head
Scott Anderson 2021-02-26 21:54:41 -07:00 committed by GitHub
parent 368dd4ebc4
commit 46d0f16dc0
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 22 additions and 16 deletions

View File

@ -4,7 +4,7 @@ jobs:
docker:
- image: circleci/node:erbium
environment:
HUGO_VERSION: "0.59.1"
HUGO_VERSION: "0.81.0"
S3DEPLOY_VERSION: "2.3.5"
steps:
- checkout

View File

@ -23,16 +23,22 @@ including our GPG key, can be found at https://www.influxdata.com/how-to-report-
2. **Install Hugo**
The InfluxData documentation uses [Hugo](https://gohugo.io/), a static site generator built in Go.
The InfluxData documentation utilizes Hugo's asset pipeline and requires the extended version of Hugo.
See the Hugo documentation for information about how to [download and install Hugo](https://gohugo.io/getting-started/installing/).
3. **Install NodeJS & Asset Pipeline Tools**
_**Note:** The most recent version of Hugo tested with this documentation is **0.81.0**._
3. **Install NodeJS, Yarn, & Asset Pipeline Tools**
This project uses tools written in NodeJS to build and process stylesheets and javascript.
In order for assets to build correctly, [install NodeJS](https://nodejs.org/en/download/)
and run the following command to install the necessary tools:
To successfully build assets:
```
npm i -g postcss-cli autoprefixer
1. [Install NodeJS](https://nodejs.org/en/download/)
2. [Install Yarn](https://classic.yarnpkg.com/en/docs/install/)
3. Run the following command to install the necessary tools:
```sh
sudo yarn global add postcss-cli@8.3.0 autoprefixer@9.8.6
```
4. **Start the Hugo server**

View File

@ -12,7 +12,7 @@
<p class="selected">{{ index .Site.Data.products.influxdb_cloud.altname }}</p>
{{ else }}
{{ $productData := (index .Site.Data.products $product) }}
<p class="selected">{{ cond (isset $productData "altname") $productData.altname $productData.name }}</p>
<p class="selected">{{ if $productData.altname }}{{ $productData.altname }}{{ else }}{{ $productData.name }}{{ end }}</p>
{{ end }}
<ul class="item-list">
{{ range sort .Site.Data.products "list_order" "desc" }}
@ -30,7 +30,7 @@
{{ end }}
{{ $link := $scratch.Get "link" }}
<li>
<a href='{{ $link }}' {{ if and (eq .namespace $product) (in .versions $currentVersion) }}class="active"{{ end }}>{{ cond (isset . "altname") .altname .name }}</a>
<a href='{{ $link }}' {{ if and (eq .namespace $product) (in .versions $currentVersion) }}class="active"{{ end }}>{{ if .altname }}{{.altname}}{{ else }}{{ .name }}{{ end }}</a>
</li>
{{ end }}
</ul>