6.2 KiB
| title | description | tags | test_only | |||
|---|---|---|---|---|---|---|
| Create and edit InfluxData docs | Learn how to create and edit InfluxData documentation. |
|
true |
Learn how to create and edit InfluxData documentation.
- Submit an issue to request new or updated documentation
- Edit an existing page in your browser
- Create and edit locally with the docs-v2 repository
- Helpful resources
Submit an issue to request new or updated documentation
- Public: https://github.com/influxdata/docs-v2/issues/
- Private: https://github.com/influxdata/DAR/issues/
Edit an existing page in your browser
Example: Editing a product-specific page
- Visit https://docs.influxdata.com public docs
- Search, Ask AI, or navigate to find the page to edit--for example, https://docs.influxdata.com/influxdb3/cloud-serverless/get-started/
- Click the "Edit this page" link at the bottom of the page. This opens the GitHub repository to the file that generates the page
- Click the pencil icon to edit the file in your browser
- Commit and create a pull request
Create and edit locally with the docs-v2 repository
Use docs scripts with AI agents to help you create and edit documentation locally, especially when working with shared content for multiple products.
Prerequisites:
-
Clone or fork the docs-v2 repository:
git clone https://github.com/influxdata/docs-v2.git cd docs-v2 -
Run
yarnin the repository root to install dependencies -
Optional: Set up GitHub CLI
!Tip] To run and test your changes locally, enter the following command in your terminal: ```bash yarn hugo server ``` *To refresh shared content after making changes, `touch` or edit the frontmatter file, or stop the server (Ctrl+C) and restart it.* To list all available scripts, run: ```bash yarn run ```
Edit an existing page locally
Use the yarn docs:edit command to open an existing page in your editor.
yarn docs:edit https://docs.influxdata.com/influxdb3/enterprise/get-started/
Create content locally
Use the yarn docs:create command with your AI agent tool to scaffold frontmatter and generate new content.
- The
yarn docs:createcommand generates a prompt file from a draft and your product selections. - AI agents (
claude, Copilot Agent mode,codex) can use the prompt file to generate content and frontmatter.
!Tip] `docs-v2` contains custom configuration for agents like Claude and Copilot Agent mode.
Generate content and frontmatter from a draft
{{% tabs-wrapper %}} {{% tabs %}} Claude Code Other AI agents {{% /tabs %}} {{% tab-content %}}
-
Open a Claude Code prompt:
claude code -
In the prompt, run the
docs:createcommand with the path to your draft file.yarn docs:create .context/drafts/"Upgrading Enterprise 3 (draft).md" -
When prompted, select the products to associate with the content.
The script first generates a prompt file, then the agent automatically uses it to generate content and frontmatter based on the draft and the products you select.
{{% /tab-content %}} {{% tab-content %}}
-
In your terminal, run the
docs:createcommand with the path to your draft file.yarn docs:create .context/drafts/"Upgrading Enterprise 3 (draft).md" -
When prompted, select the products to associate with the content. The script generates a prompt file and returns the file path.
-
Provide the prompt file to your preferred agent (
claude, Copilot Agent mode,codex) to generate content and frontmatter based on the draft and the products you selected. {{% /tab-content %}} {{< /tabs-wrapper >}}
Review, commit, and create a pull request
After you create or edit content, test and review your changes, and then create a pull request.
!Important] #### Check AI-generated content Always review and validate AI-generated content for accuracy. Make sure example commands are correct for the version you're documenting.
Test and review your changes
Run a local Hugo server to preview your changes:
yarn hugo server
Visit http://localhost:1313 to review your changes in the browser.
!Note] If you need to preview changes in a live production-like environment that you can also share with others, the Docs team can deploy your branch to the staging site.
Commit and create a pull request
- Commit your changes to a new branch
- Fix any issues found by automated checks
- Push the branch to your fork or to the docs-v2 repository
git add content
git commit -m "feat(product): Your commit message"
git push origin your-branch-name
Create a pull request
- Create a pull request against the
masterbranch of the docs-v2 repository - Add reviewers:
@influxdata/docs-team- team members familiar with the product area
- Optionally, assign Copilot to review
- After approval and automated checks are successful, merge the pull request (if you have permissions) or wait for the docs team to merge it.
{{< tabs-wrapper >}} {{% tabs %}} GitHub gh CLI {{% /tabs %}} {{% tab-content %}}
- Visit influxdata/docs-v2 pull requests on GitHub
- Optional: edit PR title and description
- Optional: set to draft if it needs more work
- When ready for review, assign
@influxdata/docs-teamand other reviewers
{{% /tab-content %}} {{% tab-content %}}
gh pr create \
--base master \
--head your-branch-name \
--title "Your PR title" \
--body "Your PR description" \
--reviewer influxdata/docs-team,<other-reviewers>
{{% /tab-content %}} {{< /tabs-wrapper >}}
Other resources
DOCS-*.md: Documentation standards and guidelines- http://localhost:1313/example/: View shortcode examples
- https://app.kapa.ai: Review content gaps identified from Ask AI answers