chore(instruction): content/shared instructions: (#6493)
* chore(instruction): content/shared instructions: * Apply suggestion from @jstirnamanpull/6494/head
parent
e3bfd39489
commit
56c173ec33
|
|
@ -1,25 +1,27 @@
|
||||||
# Shared content
|
# Shared content
|
||||||
|
|
||||||
This section is for content shared across multiple products and versions.
|
This section is for content shared across multiple products and versions.
|
||||||
The `/shared/_index.md` frontmatter, marks the `/shared` directory and its
|
The `/shared/_index.md` frontmatter marks the `/shared` directory (`/content/shared`) and its
|
||||||
children as draft so they
|
children as draft so they don't get rendered independently when the site is built.
|
||||||
don't get rendered when the site is built, but the contents of each shared
|
The content of each shared document is included and rendered in pages that reference the
|
||||||
documented is included in pages that use the file as a `source` in their
|
file as a `source` in their frontmatter.
|
||||||
frontmatter.
|
|
||||||
|
|
||||||
## Use shared content
|
## Use shared content
|
||||||
|
|
||||||
1. Create a new folder for the content in the `content/shared/` directory.
|
1. Create a new folder for the content in the `/content/shared/` directory.
|
||||||
2. Copy the markdown files into the new folder.
|
2. Copy the markdown files into the new folder.
|
||||||
3. Remove the frontmatter from the markdown files in the shared directory. If the first line starts with a shortcode, add an HTML comment before the first line, otherwise hugo will err.
|
3. Remove any frontmatter from the markdown files in the shared directory. If the first line starts with a shortcode, add an HTML comment before the first line, otherwise Hugo will err.
|
||||||
4. In each of the files that use the shared content, add a source to the frontmatter that points to the shared markdown file—for example:
|
4. In each of the files that use the shared content, add a source to the frontmatter that points to the shared markdown file—for example:
|
||||||
|
|
||||||
```markdown
|
```markdown
|
||||||
source: /shared/influxql-v3-reference/regular-expressions.md
|
source: /shared/influxql-v3-reference/regular-expressions.md
|
||||||
```
|
```
|
||||||
|
|
||||||
5. In the doc body, remove the shared Markdown text and add a comment that points to the shared file, in case someone happens upon the page in the repo--for example, in `/content/3/core/reference/influxql/regular-expressions.md`, add the following:
|
5. In the doc body, remove the shared Markdown text and add a comment that points to the shared file, in case someone happens upon the page in the repo--for example, in `/content/influxdb3/core/reference/influxql/regular-expressions.md`, add the following:
|
||||||
|
|
||||||
<!--
|
<!--
|
||||||
The content of this page is at /content/shared/influxql-v3-reference/regular-expressions.md
|
//SOURCE - /content/shared/influxql-v3-reference/regular-expressions.md
|
||||||
-->
|
-->
|
||||||
|
|
||||||
|
`//SOURCE` is a comment anchor (recognized by the Comment Anchors editor extension)
|
||||||
|
to make the file path clickable.
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue