|
| 1 | +# GitHub Copilot Instructions for InfluxData Documentation |
| 2 | + |
| 3 | +## Purpose and Scope |
| 4 | + |
| 5 | +GitHub Copilot should help document InfluxData products by creating clear, accurate technical content with proper code examples, frontmatter, and formatting. |
| 6 | + |
| 7 | +## Documentation Structure |
| 8 | + |
| 9 | +- **Product version data**: `/data/products.yml` |
| 10 | +- **Products**: |
| 11 | + - InfluxDB OSS 1.x |
| 12 | + - Documentation source path: `/content/influxdb/v1` |
| 13 | + - Code repository: https://github.com/influxdata/influxdb |
| 14 | + - InfluxDB OSS 2.x |
| 15 | + - Documentation source path: `/content/influxdb/v2` |
| 16 | + - Code repository: https://github.com/influxdata/influxdb |
| 17 | + - InfluxDB 3 Core |
| 18 | + - Documentation source path: `/content/influxdb3/core` |
| 19 | + - Code repositories: https://github.com/influxdata/influxdb, https://github.com/influxdata/influxdb3_core |
| 20 | + - InfluxDB Enterprise v1 (1.x) |
| 21 | + - Documentation source path: `/content/influxdb/enterprise_influxdb` |
| 22 | + - Code repository: https://github.com/influxdata/influxdb |
| 23 | + - InfluxDB Cloud v2 (TSM) |
| 24 | + - Documentation source path: `/content/influxdb/cloud` |
| 25 | + - Code repository: https://github.com/influxdata/idpe |
| 26 | + - InfluxDB 3 Cloud Dedicated |
| 27 | + - Documentation source path: `/content/influxdb3/cloud-dedicated` |
| 28 | + - Code repository: https://github.com/influxdata/influxdb |
| 29 | + - InfluxDB 3 Cloud Serverless |
| 30 | + - Documentation source path: `/content/influxdb3/cloud-serverless` |
| 31 | + - Code repository: https://github.com/influxdata/idpe |
| 32 | + - InfluxDB 3 Clustered |
| 33 | + - Documentation source path: `/content/influxdb3/clustered` |
| 34 | + - Code repository: https://github.com/influxdata/influxdb |
| 35 | + - Telegraf |
| 36 | + - Documentation source path: `/content/telegraf/v1` |
| 37 | + - Code repository: https://github.com/influxdata/telegraf |
| 38 | + - Kapacitor |
| 39 | + - Documentation source path: `/content/kapacitor/v1` |
| 40 | + - Code repository: https://github.com/influxdata/kapacitor |
| 41 | + - Chronograf |
| 42 | + - Documentation source path: `/content/chronograf/v1` |
| 43 | + - Code repository: https://github.com/influxdata/chronograf |
| 44 | + - Flux |
| 45 | + - Documentation source path: `/content/flux/v0` |
| 46 | + - Code repository: https://github.com/influxdata/flux |
| 47 | +- **InfluxData-supported tools**: |
| 48 | + - InfluxDB API client libraries |
| 49 | + - Code repositories: https://github.com/InfluxCommunity |
| 50 | + - InfluxDB 3 processing engine plugins |
| 51 | + - Code repository: https://github.com/influxdata/influxdb3_plugins |
| 52 | +- **Query Languages**: SQL, InfluxQL, Flux (use appropriate language per product version) |
| 53 | +- **Documentation Site**: https://docs.influxdata.com |
| 54 | +- **Repository**: https://github.com/influxdata/docs-v2 |
| 55 | +- **Framework**: Hugo static site generator |
| 56 | + |
| 57 | +## Style Guidelines |
| 58 | + |
| 59 | +- Follow Google Developer Documentation style guidelines |
| 60 | +- For API references, follow YouTube Data API style |
| 61 | +- Use semantic line feeds (one sentence per line) |
| 62 | +- Use only h2-h6 headings in content (h1 comes from frontmatter) |
| 63 | +- Use sentence case for headings |
| 64 | +- Use GitHub callout syntax |
| 65 | +- Image naming: `project/version-context-description.png` |
| 66 | +- Use appropriate product names and versions consistently |
| 67 | +- Follow InfluxData vocabulary guidelines |
| 68 | + |
| 69 | +## Markdown and Shortcodes |
| 70 | + |
| 71 | +- Include proper frontmatter for each page: |
| 72 | + |
| 73 | + ```yaml |
| 74 | + title: # Page title (h1) |
| 75 | + seotitle: # SEO title |
| 76 | + list_title: # Title for article lists |
| 77 | + description: # SEO description |
| 78 | + menu: |
| 79 | + product_version: |
| 80 | + weight: # Page order (1-99, 101-199, etc.) |
| 81 | + ``` |
| 82 | +
|
| 83 | +- Use provided shortcodes correctly: |
| 84 | + - Notes/warnings: `{{% note %}}`, `{{% warn %}}` |
| 85 | + - Product-specific: `{{% enterprise %}}`, `{{% cloud %}}` |
| 86 | + - Tabbed content: `{{< tabs-wrapper >}}`, `{{% tabs %}}`, `{{% tab-content %}}` |
| 87 | + - Version links: `{{< latest >}}`, `{{< latest-patch >}}` |
| 88 | + - API endpoints: `{{< api-endpoint >}}` |
| 89 | + - Required elements: `{{< req >}}` |
| 90 | + - Navigation: `{{< page-nav >}}` |
| 91 | + - Diagrams: `{{< diagram >}}`, `{{< filesystem-diagram >}}` |
| 92 | + |
| 93 | +## Code Examples and Testing |
| 94 | + |
| 95 | +- Provide complete, working examples with proper testing annotations: |
| 96 | + |
| 97 | +```python |
| 98 | +print("Hello, world!") |
| 99 | +``` |
| 100 | + |
| 101 | +<!--pytest-codeblocks:expected-output--> |
| 102 | + |
| 103 | +``` |
| 104 | +Hello, world! |
| 105 | +``` |
| 106 | +
|
| 107 | +- CLI command example: |
| 108 | +
|
| 109 | +```sh |
| 110 | +influx query 'from(bucket:"example") |> range(start:-1h)' |
| 111 | +``` |
| 112 | + |
| 113 | +<!--pytest-codeblocks:expected-output--> |
| 114 | + |
| 115 | +``` |
| 116 | +Table: keys: [_start, _stop, _field, _measurement] |
| 117 | + _start:time _stop:time _field:string _measurement:string _time:time _value:float |
| 118 | +------------------------------ ------------------------------ ---------------------- ---------------------- ------------------------------ ---------------------------- |
| 119 | +``` |
| 120 | + |
| 121 | +- Include necessary environment variables |
| 122 | +- Show proper credential handling for authenticated commands |
| 123 | + |
| 124 | +## API Documentation |
| 125 | + |
| 126 | +- Follow OpenAPI specification patterns |
| 127 | +- Match REST API examples to current implementation |
| 128 | +- Include complete request/response examples |
| 129 | +- Document required headers and authentication |
| 130 | + |
| 131 | +## Versioning and Product Differentiation |
| 132 | + |
| 133 | +- Clearly distinguish between different InfluxDB versions (1.x, 2.x, 3.x) |
| 134 | +- Use correct terminology for each product variant |
| 135 | +- Apply appropriate UI descriptions and screenshots |
| 136 | +- Reference appropriate query language per version |
| 137 | + |
| 138 | +## Development Tools |
| 139 | + |
| 140 | +- Vale.sh linter for style checking |
| 141 | +- Docker for local development and testing |
| 142 | +- pytest and pytest-codeblocks for validating code examples |
| 143 | +- Pre-commit hooks for quality assurance |
| 144 | + |
| 145 | +## Related repositories |
| 146 | + |
| 147 | +- **Internal dcumentation assistance requests**: https://github.com/influxdata/DAR/issues |
0 commit comments