Add cloud note to schema package (#2404)
* added cloud note to schema package, closes influxdata/DAR#181 * Apply suggestions from code review Co-authored-by: pierwill <19642016+pierwill@users.noreply.github.com> * Apply suggestions from code review Co-authored-by: kelseiv <47797004+kelseiv@users.noreply.github.com> * fixed frontmatter formatting Co-authored-by: pierwill <19642016+pierwill@users.noreply.github.com> Co-authored-by: kelseiv <47797004+kelseiv@users.noreply.github.com>pull/2407/head
parent
225b17bf1c
commit
6ff54ae15a
|
|
@ -86,9 +86,14 @@ list_note: # Used in children shortcode type="list" to add a small note next to
|
|||
list_code_example: # Code example included with article descriptions in children type="articles" shortcode
|
||||
list_query_example: # Code examples included with article descriptions in children type="articles" shortcode,
|
||||
# References to examples in data/query_examples
|
||||
products: # List of products that the page specifically applies to: [oss, cloud, enterprise]
|
||||
canonical: # Path to canonical page, overrides auto-gen'd canonical URL
|
||||
v2: # Path to v2 equivalent page
|
||||
prepend: # Prepend markdown content to an article (especially powerful with cascade)
|
||||
block: # (Optional) Wrap content in a block style (note, warn, cloud)
|
||||
content: # Content to prepend to article
|
||||
append: # Append markdown content to an article (especially powerful with cascade)
|
||||
block: # (Optional) Wrap content in a block style (note, warn, cloud)
|
||||
content: # Content to append to article
|
||||
```
|
||||
|
||||
### Title usage
|
||||
|
|
@ -155,7 +160,7 @@ canonical: /path/to/canonical/doc/
|
|||
canonical: /{{< latest "influxdb" "v2" >}}/path/to/canonical/doc/
|
||||
```
|
||||
|
||||
## v2 equivalent documentation
|
||||
### v2 equivalent documentation
|
||||
To display a notice on a 1.x page that links to an equivalent 2.0 page,
|
||||
add the following frontmatter to the 1.x page:
|
||||
|
||||
|
|
@ -163,6 +168,33 @@ add the following frontmatter to the 1.x page:
|
|||
v2: /influxdb/v2.0/get-started/
|
||||
```
|
||||
|
||||
### Prepend and append content to a page
|
||||
Use the `prepend` and `append` frontmatter to add content to the top or bottom of a page.
|
||||
Each has the following fields:
|
||||
|
||||
- **block:** _(Optional)_ block style to wrap content in (note, warn, cloud, or enterprise)
|
||||
- **content:** _**(Required)**_ markdown content to add.
|
||||
|
||||
```yaml
|
||||
append:
|
||||
block: note
|
||||
content: |
|
||||
#### This is example markdown content
|
||||
This is just an example note block that gets appended to the article.
|
||||
```
|
||||
|
||||
Use this frontmatter with [cascade](#cascade) to add the same content to
|
||||
all children pages as well.
|
||||
|
||||
```yaml
|
||||
cascade:
|
||||
append:
|
||||
block: note
|
||||
content: |
|
||||
#### This is example markdown content
|
||||
This is just an example note block that gets appended to the article.
|
||||
```
|
||||
|
||||
### Cascade
|
||||
To automatically apply frontmatter to a page and all of its children, use the
|
||||
[`cascade` frontmatter](https://gohugo.io/content-management/front-matter/#front-matter-cascade)
|
||||
|
|
@ -176,7 +208,7 @@ cascade:
|
|||
```
|
||||
|
||||
`cascade` applies the frontmatter to all children unless the child already includes
|
||||
those frontmatter keys. Frontmaatter defined on the page overrides fronmattered
|
||||
those frontmatter keys. Frontmatter defined on the page overrides frontmatter
|
||||
"cascaded" from a parent.
|
||||
|
||||
## Shortcodes
|
||||
|
|
|
|||
|
|
@ -13,6 +13,13 @@ menu:
|
|||
weight: 202
|
||||
influxdb/v2.0/tags: [functions, schema, package]
|
||||
introduced: 0.88.0
|
||||
cascade:
|
||||
append:
|
||||
block: cloud
|
||||
content: |
|
||||
#### Supported in the InfluxDB Cloud UI
|
||||
The `schema` package can retrieve schema information from the InfluxDB
|
||||
Cloud user interface (UI), but **not** from the [Flux REPL](/influxdb/cloud/tools/repl/).
|
||||
---
|
||||
|
||||
The Flux InfluxDB schema package provides functions for exploring your InfluxDB data schema.
|
||||
|
|
|
|||
|
|
@ -4,7 +4,9 @@
|
|||
{{ partial "article/stable-version.html" . }}
|
||||
{{ partial "article/flux-experimental.html" . }}
|
||||
{{ partial "article/flux-contrib.html" . }}
|
||||
{{ partial "article/prepend.html" . }}
|
||||
{{ .Content }}
|
||||
{{ partial "article/append.html" . }}
|
||||
{{ partial "article/related.html" . }}
|
||||
{{ partial "article/tags.html" . }}
|
||||
{{ partial "article/feedback.html" . }}
|
||||
|
|
|
|||
|
|
@ -0,0 +1,11 @@
|
|||
{{ $p := .Page }}
|
||||
{{ $optBlock := dict "display" "block" }}
|
||||
{{ if .Params.append }}
|
||||
{{ if .Params.append.block }}
|
||||
<div class="block {{ .Params.append.block }}">
|
||||
{{ .Params.append.content | $p.RenderString $optBlock }}
|
||||
</div>
|
||||
{{ else }}
|
||||
{{ .Params.append.content | $p.RenderString $optBlock }}
|
||||
{{ end }}
|
||||
{{ end }}
|
||||
|
|
@ -0,0 +1,11 @@
|
|||
{{ $p := .Page }}
|
||||
{{ $optBlock := dict "display" "block" }}
|
||||
{{ if .Params.prepend }}
|
||||
{{ if .Params.prepend.block }}
|
||||
<div class="block {{ .Params.prepend.block }}">
|
||||
{{ .Params.prepend.content | $p.RenderString $optBlock }}
|
||||
</div>
|
||||
{{ else }}
|
||||
{{ .Params.prepend.content | $p.RenderString $optBlock }}
|
||||
{{ end }}
|
||||
{{ end }}
|
||||
Loading…
Reference in New Issue