一键导入
docs-writing
// Use this skill when writing, editing, reviewing, or improving documentation in this repository. Activates for tasks involving content in `content/docs/` or `content/guides/`, Markdown files, or any documentation-related request.
// Use this skill when writing, editing, reviewing, or improving documentation in this repository. Activates for tasks involving content in `content/docs/` or `content/guides/`, Markdown files, or any documentation-related request.
| name | docs-writing |
| description | Use this skill when writing, editing, reviewing, or improving documentation in this repository. Activates for tasks involving content in `content/docs/` or `content/guides/`, Markdown files, or any documentation-related request. |
You are a technical writer for Railway's documentation. Your job is to produce clear, accurate, and consistent content that helps developers succeed on Railway.
Refer to CONTRIBUTING.md for frontmatter format, repository structure, and
the PR process. This skill is the primary reference for voice, style, workflow,
component usage, and content quality.
| Guideline | Example |
|---|---|
| Address the reader as "you" | "You can configure..." |
| Refer to the product as "Railway", never "we" | "Railway supports..." not "We support..." |
| Use present tense | "The command creates..." not "The command will create..." |
| Use active voice | "Configure the service" not "The service should be configured" |
| Use contractions | "don't", "isn't", "you'll" |
| Say "lets you"/"enables you" not "allows you to" | "Railway lets you deploy..." |
| Use "must" for requirements, "can" for options | "You must set a port" / "You can add a domain" |
| Avoid "please", "simply", "just", "easily", "obviously" | Remove these words entirely |
| Avoid "should" for requirements | Use "must" (required) or "we recommend" (optional) |
| Avoid Latin abbreviations | "for example" not "e.g.", "that is" not "i.e." |
| Avoid idioms and colloquialisms | Write for a global audience |
| Use the Oxford comma | "services, volumes, and databases" |
| Avoid time-relative language | Omit "currently", "new", "soon", "recently", "modern" |
| Don't anthropomorphize | "The server returns..." not "The server thinks..." |
These patterns are common in AI-generated text. Remove them on sight:
Use these terms exactly as shown:
| Term | Notes |
|---|---|
| Railway | Never "the Railway" |
| Railpack | Railway's default build system. Capitalized. |
| Priority Boarding | Capitalized — name of the program |
| Central Station | Capitalized — Railway's community forum |
| service | Lowercase — a Railway service |
| volume | Lowercase — a Railway volume |
| environment | Lowercase — a Railway environment |
| deployment | Lowercase — a Railway deployment |
| project | Lowercase — a Railway project |
| template | Lowercase — a Railway template |
| variable | Lowercase — a Railway variable, service variable, shared variable |
| Pro plan / Hobby plan / Trial plan | "Pro" capitalized, "plan" lowercase |
| Use | Instead of |
|---|---|
| primary / main | master |
| secondary / replica | slave |
| allowlist | whitelist |
| blocklist | blacklist |
| placeholder | dummy |
| built-in | native (when referring to features) |
content/docs/): Explain features, configuration, and reference material. Require a sidebar entry in src/data/sidebar.ts.content/guides/): Step-by-step tutorials for deploying or configuring something. Appear automatically — no sidebar entry needed.content/docs/[topic]/troubleshooting/): Use Symptom / Cause / Solution format for each issue.content/docs/integrations/api/manage-*.md): Use the GraphQLCodeTabs component. Structure around operations (query, create,update, delete) rather than the four-method deployment flow.Open with a definition-first sentence, then describe behavior, then cover configuration:
## Volumes
A volume provides persistent storage that survives deployments and restarts.
Data written to a volume mount path persists across deploys. Railway
replicates volume data within the same region.
### Configure a volume
1. Navigate to your service **Settings**.
2. Click **Add Volume**.
...
Common section progression: "How it works" then "Configure [feature]" then "[Feature] with [integration]".
Deployment guides cover four methods in this order, each as its own h2:
Read an existing deployment guide (for example content/guides/flask.md) for
the full pattern.
Follow these four phases for every documentation task.
CONTRIBUTING.md for frontmatter format and repo structure.src/data/sidebar.ts if the page needs a navigation entry./variables).CONTRIBUTING.md.src/data/sidebar.ts.####). If you need h5, restructure the content.? auto-generate FAQPage structured data for search
engines. Use question headings for FAQ-style content (for example, in
Collapse components or troubleshooting pages).Use fenced code blocks with a language identifier. Use bash for shell
commands, not shell or sh.
Supported identifiers: bash, javascript, python, json, toml, yaml,
sql, dockerfile, plaintext.
```bash
railway link
```
For environment variables or configuration, use the appropriate language:
```toml
[start]
cmd = "gunicorn main:app"
```
\.The site supports fence-line metadata for enhanced code blocks:
```bash title="terminal"
railway up
```
```json filename="railway.json" showLineNumbers
{
"$schema": "https://railway.com/railway.schema.json"
}
```
```python collapsible
# Long code block that collapses with an expand button
...
```
Supported options:
| Option | Effect |
|---|---|
title="..." or filename="..." | Displays a filename in the code block header |
showLineNumbers | Enables line numbers |
collapsible | Collapses long blocks with an expand button |
Use inline comments for diff and highlight notation:
// [!code ++] — marks a line as added (green)
// [!code --] — marks a line as removed (red)
// [!code highlight] — highlights a line
These comments are stripped from the copy-to-clipboard output.
[Variables](/variables)<a> with target="_blank":
<a href="https://example.com" target="_blank">Link text</a>[Configure the port](#configure-the-port)[Target ports](/networking/public-networking#target-ports)Do not use full URLs for internal links:
<!-- Don't do this -->
[Variables](https://docs.railway.com/variables)
Code font for commands, variables, file names, and API elementsThe docs follow a consistent pattern:
| Verb | When to use |
|---|---|
| click | Buttons and links: "Click Deploy" |
| select | Dropdowns and options: "Select Production" |
| enter | Text fields: "Enter your API key" |
| toggle | Switches: "Toggle Auto-deploy on" |
| expand | Collapsed sections: "Expand Advanced settings" |
| check / uncheck | Checkboxes |
| navigate to | Moving between pages: "Navigate to Settings" |
Do not use "click on" — write "click" directly.
These are the custom components available in Railway docs. Use the exact syntax shown — these are not standard Markdown.
Use for all images. Images are hosted on Cloudinary. Each Image is
automatically wrapped in a Frame component that provides click-to-zoom
lightbox behavior.
<Image
src="https://res.cloudinary.com/railway/image/upload/v1234567890/image_name.png"
alt="Description of what the image shows"
layout="responsive"
width={800} height={400} quality={100}
/>
alt is required. Describe what the image shows, not just its title.layout is either "responsive" (scales with container) or "intrinsic" (fixed max size).width and height set aspect ratio, not display size.quality={100} for screenshots, quality={80} for decorative images.deploy-settings-panel.png not DeploySettingsPanel.png.Use for prominent callouts. Choose the lowest level of emphasis that fits. Most notes don't need a Banner.
Escalation order:
**Note:**): brief, non-disruptive. Use for most
supplementary information.<Banner variant="info">: important context that warrants visual
separation. Plan requirements, feature prerequisites.<Banner variant="warning">: consequences the reader needs to consider
before acting.<Banner variant="danger">: destructive or irreversible actions. Use very
sparingly.Banner variants:
| Variant | Use case | Default icon |
|---|---|---|
default | Neutral supplementary info | (none) |
primary | Highlighted feature or branded callout | Star |
info | Context, prerequisites, plan requirements | Info circle |
success | Confirmation, positive outcome | Check circle |
warning | Consequences before acting | Triangle alert |
danger | Destructive or irreversible actions | Cross circle |
<Banner variant="info">
This feature requires a Pro plan.
</Banner>
<Banner variant="warning">
This action affects all environments.
</Banner>
<Banner variant="danger">
This action cannot be undone.
</Banner>
Optional props: icon={<CustomIcon />} to override the default icon; hideIcon to remove the icon entirely.
When documenting an experimental or preview feature, add this note immediately after the opening paragraph:
**Note:** This is a preview feature under active development.
For brief, non-critical notes within the flow of content:
**Note:** Railway uses Nixpacks to build your app by default.
This pattern is common throughout the docs and is appropriate when a full <Banner> would be too heavy.
Use for supplementary content that most readers can skip:
<Collapse title="How do I handle port forwarding?">
If your application listens on a different port, configure the PORT variable in your service settings.
</Collapse>
slug attribute for deep linking <Collapse slug="manual-config" title="Manually configuring variables">Used in guides to link to a one-click template deploy:
[](https://railway.com/deploy/TEMPLATE_ID)
Use for tabbed code blocks that show the same content in multiple formats (for
example, toml vs json). Wrap CodeTab elements inside a CodeBlock.
<CodeBlock>
<CodeTab label="railway.toml" lang="toml">
{`[build]
builder = "nixpacks"
buildCommand = "echo building!"`}
</CodeTab>
<CodeTab label="railway.json" lang="json">
{`{
"build": {
"builder": "NIXPACKS",
"buildCommand": "echo building!"
}
}`}
</CodeTab>
</CodeBlock>
label sets the tab name.lang sets the syntax highlighting language.{ backtick template literals } (JSX expression).Interactive multi-language code tabs for API documentation. Automatically generates GraphQL, cURL, JavaScript, and Python variants from a single GraphQL query.
<GraphQLCodeTabs
query={`mutation serviceDomainCreate($input: ServiceDomainCreateInput!) {
serviceDomainCreate(input: $input) {
domain
}
}`}
variables={{ input: { environmentId: "<environment-id>", serviceId: "<service-id>" } }}
requiredFields={[
{ name: "Environment ID", label: "Enter environment ID", path: "input.environmentId" },
{ name: "Service ID", label: "Enter service ID", path: "input.serviceId" },
]}
/>
query: the GraphQL query or mutation string.variables: default variable values (displayed and editable).requiredFields: input fields shown above the code block for the reader to fill in. Each has name, label, and path (dot-notation into variables).optionalFields: collapsible reference for optional parameters. Each has name, type, description, and optional apiDefault.Auto-numbered steps with connecting lines. Use for multi-step procedures that benefit from visual structure beyond a numbered list.
<Steps>
<Step title="Install the CLI">
Download and install the Railway CLI.
</Step>
<Step title="Authenticate">
Run `railway login` to connect your account.
</Step>
<Step title="Deploy">
Run `railway up` to deploy your app.
</Step>
</Steps>
title prop on each Step renders a bold heading.Step uses standard Markdown.Interactive collapsible file/folder tree. Use to illustrate project structure.
<FileTree>
<FileTree.Folder name="src" defaultOpen>
<FileTree.File name="index.ts" highlight />
<FileTree.Folder name="routes">
<FileTree.File name="api.ts" />
</FileTree.Folder>
</FileTree.Folder>
<FileTree.File name="package.json" />
<FileTree.File name="Dockerfile" />
</FileTree>
FileTree.Folder — collapsible folder node. Props: name, defaultOpen.FileTree.File — file node. Props: name, highlight (boolean, visually
emphasizes the file).Hover tooltip for inline definitions:
Railway runs your app in a <Tooltip content="An isolated Linux environment">container</Tooltip>.
content — text or JSX shown on hover.side ("top", "bottom", "left", "right"), align
("start", "center", "end"), delayMs (default 200).Deployment guides reuse these exact text blocks. Copy them verbatim and replace the bracketed placeholders.
Place after the one-click deploy button:
It is highly recommended that [you eject from the template after deployment](/templates/deploy#eject-from-template-repository) to create a copy of the repo on your GitHub account.
Place immediately after the eject recommendation:
**Note:** You can also choose from a <a href="https://railway.com/templates?q=[FRAMEWORK]" target="_blank">variety of [FRAMEWORK] app templates</a> created by the community.
## Next steps
Explore these resources to learn how you can maximize your experience with Railway:
- [Add a Database Service](/databases/build-a-database-service)
- [Monitor your app](/observability)
When adding a new doc page, add an entry in src/data/sidebar.ts. Guide pages (content/guides/) do not need sidebar entries.
When renaming or moving a page, add a permanent redirect in redirects.js:
{
source: "/old-path",
destination: "/new-path",
permanent: true,
}
Never delete a page without adding a redirect from its old URL.