diff --git a/aio/README.md b/aio/README.md index 15c818c4fc6..f2eee035140 100644 --- a/aio/README.md +++ b/aio/README.md @@ -60,6 +60,9 @@ More specifically, there are sub-folders that contain particular types of conten We use the [dgeni](https://github.com/angular/dgeni) tool to convert these files into docs that can be viewed in the doc-viewer. +The [Authors Style Guide](https://angular.io/guide/docs-style-guide) prescribes guidelines for +writing guide pages, explains how to use the documentation classes and components, and how to markup sample source code to produce code snippets. + ### Generating the complete docs The main task for generating the docs is `yarn docs`. This will process all the source files (API and other), diff --git a/aio/content/guide/docs-style-guide.md b/aio/content/guide/docs-style-guide.md index 0b3cbe5b278..29942b4d233 100644 --- a/aio/content/guide/docs-style-guide.md +++ b/aio/content/guide/docs-style-guide.md @@ -2,12 +2,35 @@ This page presents design and layout guidelines for Angular documentation pages. These guidelines should be followed by all guide page authors. Deviations must be approved by the documentation editor. -For clarity and precision, every guideline on this page is illustrated with a working example -followed by the page markup for that example. +Most guide pages should have [accompanying sample code](#from-code-samples) with +[special markup](#source-code-markup) for the code snippets on the page. +Code samples should adhere to the +[style guide for Angular applications](guide/styleguide "Application Code Style Guide") +because readers expect consistency. + +For clarity and precision, every guideline on _this_ page is illustrated with a working example, +followed by the page markup for that example ... as shown here. ```html - ... followed by the page markup for that example. + followed by the page markup for that example ... as shown here. ``` + +## Doc generation and tooling + +To make changes to the documentation pages and sample code, clone the [Angular github repository](https://github.com/angular/angular "Angular repo") and go to the `aio/` folder. + +The [aio/README.md](https://github.com/angular/angular/blob/master/aio/README.md "AIO ReadMe") explains how to install and use the tools to edit and test your changes. + +Here are a few essential commands for guide page authors. + +1. `yarn setup` — installs packages; builds docs, plunkers, and zips. + +1. `yarn docs-watch -- --watch-only` — watches for saved content changes and refreshes the browser. The (optional) `--watch-only` flag skips the initial docs rebuild. + +1. `yarn start` — starts the doc viewer application so you can see your local changes in the browser. + +1. http://localhost:4200/ — browse to the app running locally. + ## Guide pages All but a few guide pages are [markdown](https://daringfireball.net/projects/markdown/syntax "markdown") files with an `.md` extension. @@ -254,7 +277,7 @@ Whatever the source, the doc viewer renders them as "code snippets", either indi {@a code-example} -