|
| 1 | +# GitHub Copilot Instructions for InfluxData Documentation |
| 2 | + |
| 3 | +GitHub Copilot should assist with writing and styling InfluxData documentation according to the following guidelines: |
| 4 | + |
| 5 | +## Documentation Overview |
| 6 | + |
| 7 | +- Documentation covers InfluxDB and associated products (Telegraf, client libraries) |
| 8 | +- Primary documentation site: https://docs.influxdata.com |
| 9 | +- Source repository: https://github.com/influxdata/docs-v2 |
| 10 | +- Hugo static site generator is used to build the documentation |
| 11 | + |
| 12 | +## Products and Query Languages |
| 13 | + |
| 14 | +When working with product-specific content, identify the appropriate product from: |
| 15 | + |
| 16 | +- InfluxDB OSS (1.x, 2.x, 3 Core) |
| 17 | +- InfluxDB Enterprise |
| 18 | +- InfluxDB Cloud variants (TSM, Dedicated, Serverless) |
| 19 | +- InfluxDB 3 Clustered |
| 20 | +- Telegraf |
| 21 | + |
| 22 | +Identify appropriate query language (SQL, InfluxQL, Flux) based on product version. |
| 23 | + |
| 24 | +## Style Standards |
| 25 | + |
| 26 | +- Follow Google Developer Documentation style guidelines |
| 27 | +- For REST API references, follow YouTube Data API style |
| 28 | +- Use semantic line feeds (one sentence per line) for easier diff comparison |
| 29 | +- Use only h2-h6 headings in content (h1 comes from frontmatter) |
| 30 | +- Image naming format: `project/version-context-description.png` |
| 31 | + |
| 32 | +## Markdown Conventions |
| 33 | + |
| 34 | +- Use standard Markdown for most content |
| 35 | +- Include proper frontmatter for each page (title, description, weight, etc.) |
| 36 | +- Use available shortcodes for notes, warnings, tabbed content, and other special formatting |
| 37 | +- Observe semantic line feeds (one sentence per line) |
| 38 | +- Use proper heading hierarchy (h2-h6 only) |
| 39 | + |
| 40 | +## Shortcodes |
| 41 | + |
| 42 | +Help use the following shortcodes appropriately: |
| 43 | + |
| 44 | +- Notes and warnings: `{{% note %}}` and `{{% warn %}}` |
| 45 | +- Product-specific content: `{{% enterprise %}}`, `{{% cloud %}}` |
| 46 | +- Tabbed content: `{{< tabs-wrapper >}}`, `{{% tabs %}}`, `{{% tab-content %}}` |
| 47 | +- Latest version links: `{{< latest >}}`, `{{< latest-patch >}}` |
| 48 | +- API endpoints: `{{< api-endpoint >}}` |
| 49 | +- Required elements: `{{< req >}}` |
| 50 | +- Navigation: `{{< page-nav >}}` |
| 51 | +- Diagrams: `{{< diagram >}}`, `{{< filesystem-diagram >}}` |
| 52 | + |
| 53 | +## Page Frontmatter |
| 54 | + |
| 55 | +Assist with creating appropriate frontmatter that includes: |
| 56 | + |
| 57 | +```yaml |
| 58 | +title: # Title of the page (h1) |
| 59 | +seotitle: # Page title for SEO |
| 60 | +list_title: # Title for article lists |
| 61 | +description: # Page description for SEO |
| 62 | +menu: |
| 63 | + product_version: |
| 64 | +weight: # Page sort order (follow level structure: 1-99, 101-199, etc.) |
| 65 | +``` |
| 66 | +
|
| 67 | +## Testing Code Blocks |
| 68 | +
|
| 69 | +When writing code examples, add appropriate testing annotations: |
| 70 | +
|
| 71 | +```python |
| 72 | +print("Hello, world!") |
| 73 | +``` |
| 74 | + |
| 75 | +<!--pytest-codeblocks:expected-output--> |
| 76 | +``` |
| 77 | +Hello, world! |
| 78 | +``` |
| 79 | + |
| 80 | +## InfluxDB-specific Conventions |
| 81 | + |
| 82 | +- Use appropriate product names and versions consistently |
| 83 | +- Link to canonical documentation where appropriate |
| 84 | +- Follow InfluxData vocabulary and terminology guidelines |
| 85 | + |
| 86 | +## Pre-commit hooks |
| 87 | + |
| 88 | +- Assist with Vale.sh linter configurations |
| 89 | +- Assist with Dockerfile and Docker Compose files |
| 90 | +- Assist with using pytest and pytest-codeblocks |
0 commit comments