diff --git a/aio/content/examples/docs-style-guide/src/app/not-great.component.ts b/aio/content/examples/docs-style-guide/src/app/not-great.component.ts new file mode 100644 index 0000000000..64f4f26492 --- /dev/null +++ b/aio/content/examples/docs-style-guide/src/app/not-great.component.ts @@ -0,0 +1,13 @@ +import { Component } from '@angular/core'; + +@Component({ + selector: 'app-not-great', +}) +// #docregion not-great +export class NotGreatComponent { + + buggyFunction() { + // things could be better here... + } +} +// #enddocregion not-great diff --git a/aio/content/guide/docs-style-guide.md b/aio/content/guide/docs-style-guide.md index 017fd92fd7..446a46848f 100644 --- a/aio/content/guide/docs-style-guide.md +++ b/aio/content/guide/docs-style-guide.md @@ -1,150 +1,69 @@ # Angular documentation style guide - -This style guide is for anyone who contributes to the Angular documentation (this site). -These guidelines should be followed by all authors. -Deviations must be approved by a documentation editor. +This style guide covers the standards for writing [Angular documentation on angular.io](https://angular.io/docs). +These standards ensure consistency in writing style, Markdown conventions, and code snippets. -The guidelines described here serve two purposes: +## Prerequisites -* To ensure a high-quality, consistent experience for Angular documentation users. +Before contributing to the Angular documentation, it is helpful if you are familiar with the following: -* To simplify the writing process for contributing authors. -This guide helps you make decisions about tone, voice, and style. -It also helps you find the right markup quickly. +* `git`: for an introduction, see GitHub's [Git Handbook](https://guides.github.com/introduction/git-handbook/) +* `GitHub`: for an introduction, see GitHub's [Hello World](https://guides.github.com/activities/hello-world/) +* Markdown: see GitHub's [Mastering Markdown](https://guides.github.com/features/mastering-markdown/) +* Angular coding style: see the [Angular Style Guide](guide/styleguide "Angular Application Code Style Guide") +* Google writing style: The [Google Developer Documentation Style Guide](https://developers.google.com/style/) is a comprehensive resource that this Angular documentation style guide builds upon. +## Kinds of Angular documentation -
item
property is `true`.
* Add the component class name to the `declarations` array.
```
-In certain cases, when you apply backticks around a term, it may auto-link to
-the API documentation. If you do not intend the term to be a link, use the following
-syntax:
+
+### Auto-linking in code snippets
+
+In certain cases, when you apply backticks around a term, it may auto-link to the API documentation.
+If you do not intend the term to be a link, use the following syntax:
```html
The item
property is `true`.
```
-For block code snippets, we generally prefer to display code with
-the Angular documentation _code-example_ component represented by the `