styleguide/writing.md
This guide outlines the standards and best practices for writing documentation for Deno. Following these guidelines helps ensure our documentation remains consistent, clear, and helpful for all users.
Every Markdown file should begin with front matter that includes:
---
title: "Descriptive Title"
description: "A concise summary (1-2 sentences) of the page content that will appear in search results and link previews."
oldUrl: # Optional - used for redirects from previous documentation locations
- /previous/url/path/
---
Title: Concise but descriptive, enclosed in quotes.
Description: 1-2 sentences (140-160 characters) that summarize the page content.
Begin each document with a brief introduction that explains:
Organize content in a logical progression:
ts or js language identifierstitle attribute```ts title="example.ts"
function greet(name: string): string {
return `Hello, ${name}!`;
}
console.log(greet("world"));
```
For code blocks that should be tested:
/:
/runtime/fundamentals/modules/[descriptive text](/path/to/page/)
Use admonitions sparingly to highlight important information:
:::note Important supplementary information. :::
:::info Informational content (styled like note). :::
:::tip Helpful advice for better usage. :::
:::caution Warn about potential issues or gotchas. :::
:::warning Critical warnings that require immediate attention. :::
Use tables for presenting structured data:
| Header 1 | Header 2 |
| -------- | -------- |
| Cell 1 | Cell 2 |
| Cell 3 | Cell 4 |
When documenting CLI commands:
For API documentation:
For tutorial-style documentation:
Before submitting documentation:
setup_environment.md)