From 46d0f16dc04daf5ef6a7302a077d1ca2ea36ad2f Mon Sep 17 00:00:00 2001 From: Scott Anderson Date: Fri, 26 Feb 2021 21:54:41 -0700 Subject: [PATCH] upgraded hugo to 0.81.0, fixed isset build error, fixed formatting in grafana doc (#2218) --- .circleci/config.yml | 2 +- README.md | 18 ++++++++++++------ content/influxdb/v2.0/tools/grafana.md | 14 +++++++------- layouts/partials/topnav/product-selector.html | 4 ++-- 4 files changed, 22 insertions(+), 16 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index 9641c9f53..d57c3d395 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -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 diff --git a/README.md b/README.md index 9a026fc29..bc5e9718f 100644 --- a/README.md +++ b/README.md @@ -23,17 +23,23 @@ 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** diff --git a/content/influxdb/v2.0/tools/grafana.md b/content/influxdb/v2.0/tools/grafana.md index 2afeb4aec..ec2982b63 100644 --- a/content/influxdb/v2.0/tools/grafana.md +++ b/content/influxdb/v2.0/tools/grafana.md @@ -182,15 +182,15 @@ With **InfluxQL** selected as the query language in your InfluxDB data source se - ##### Token authentication - Under **Custom HTTP Headers**, select **Add Header**. Provide your InfluxDB authentication token: + Under **Custom HTTP Headers**, select **Add Header**. Provide your InfluxDB authentication token: - - **Header**: Enter `Authorization` - - **Value**: Use the `Token` schema and provide your [InfluxDB authentication token](/influxdb/v2.0/security/tokens/). - For example: + - **Header**: Enter `Authorization` + - **Value**: Use the `Token` schema and provide your [InfluxDB authentication token](/influxdb/v2.0/security/tokens/). + For example: - ``` - Token y0uR5uP3rSecr3tT0k3n - ``` + ``` + Token y0uR5uP3rSecr3tT0k3n + ``` - ##### Authenticate with username and password diff --git a/layouts/partials/topnav/product-selector.html b/layouts/partials/topnav/product-selector.html index 77313e182..dfd02f43a 100644 --- a/layouts/partials/topnav/product-selector.html +++ b/layouts/partials/topnav/product-selector.html @@ -12,7 +12,7 @@

{{ index .Site.Data.products.influxdb_cloud.altname }}

{{ else }} {{ $productData := (index .Site.Data.products $product) }} -

{{ cond (isset $productData "altname") $productData.altname $productData.name }}

+

{{ if $productData.altname }}{{ $productData.altname }}{{ else }}{{ $productData.name }}{{ end }}

{{ end }}