blob: 258416aab0428798ded461d0e27b743bd7b6c1b9 [file] [log] [blame] [view]
Daniel Eratc10be9e2017-03-07 01:51:491# Chromium OS docs
2
Daniel Eratdd609d32017-04-06 15:23:033This directory contains public [Chromium OS] project documentation that is
4automatically [rendered by Gitiles]. The docs are written in [Gitiles-flavored
5Markdown].
Daniel Eratc10be9e2017-03-07 01:51:496
7## General guidelines
8
9See the [Chromium documentation guidelines] and [Chromium documentation best
10practices].
11
12## Style guide
13
14Markdown documents must follow the [style guide].
15
Daniel Erat6bc26782017-06-27 22:59:2216## Making changes
17
18This repository is managed by the [repo] tool, so you can make changes to it
19using the same techniques that you'd use for any other repositories in the
Mike Frysinger57ef0072018-10-05 22:49:4620project.
Daniel Erat6bc26782017-06-27 22:59:2221
Mike Frysinger3aac9b52018-11-15 21:43:3222See the [Contributing] guide for more details.
23
Satoru Takabayashi38520822017-06-28 05:01:0724## Making changes without repo
25
26You can also make changes to this repository without using the [repo] tool. This
27comes in handy when you don't have a Chromium OS checkout:
28
29```
30git clone https://chromium.googlesource.com/chromiumos/docs
Evan Benn39db7b22019-10-28 06:05:4131cd docs
Satoru Takabayashi38520822017-06-28 05:01:0732curl -Lo .git/hooks/commit-msg https://gerrit-review.googlesource.com/tools/hooks/commit-msg
33chmod +x .git/hooks/commit-msg
Satoru Takabayashi38520822017-06-28 05:01:0734git checkout -b changes
35(make some changes)
36git commit -a
37git push origin HEAD:refs/for/master
38```
39
40The above steps will upload a patch to [chromium-review.googlesource.com] where
41you can get your patch reviewed, and submit.
42
Daniel Eratc10be9e2017-03-07 01:51:4943## Previewing changes
44
Mike Frysingere5a66892019-02-21 23:10:1145You can preview your local changes using `scripts/preview_docs` which utilizes
46[Gerrit sandbox branches]:
Lann Martinba704b82018-07-19 16:29:0347
48```bash
49scripts/preview_docs README.md
50```
51
52You can also use [md_browser], which is entirely local and does not require
53refs/sandbox/ push permission, but has somewhat inaccurate rendering:
Daniel Eratc10be9e2017-03-07 01:51:4954
55```bash
56# at top of Chromium OS checkout
Mike Frysingerd1cbd282019-03-07 06:27:1357./src/chromium/src/tools/md_browser/md_browser.py -d docs
Daniel Eratc10be9e2017-03-07 01:51:4958```
59
60Then browse to e.g.
61[http://localhost:8080/README.md](http://localhost:8080/README.md).
62
Daniel Erat6bc26782017-06-27 22:59:2263To review someone else's changes, apply them locally first, or just click the
64`gitiles` link near the top of a Gerrit file diff page.
Daniel Eratc10be9e2017-03-07 01:51:4965
Daniel Eratdd609d32017-04-06 15:23:0366[Chromium OS]: https://www.chromium.org/chromium-os
Mike Frysinger3aac9b52018-11-15 21:43:3267[Contributing]: contributing.md
Mike Frysinger9fc0fc02020-09-05 05:18:5768[rendered by Gitiles]: https://chromium.googlesource.com/chromiumos/docs/+/HEAD/
Mike Frysingere5a66892019-02-21 23:10:1169[Gerrit sandbox branches]: contributing.md#sandbox
Mike Frysinger9fc0fc02020-09-05 05:18:5770[Gitiles-flavored Markdown]: https://gerrit.googlesource.com/gitiles/+/HEAD/Documentation/markdown.md
71[Chromium documentation guidelines]: https://chromium.googlesource.com/chromium/src/+/HEAD/docs/documentation_guidelines.md
72[Chromium documentation best practices]: https://chromium.googlesource.com/chromium/src/+/HEAD/docs/documentation_best_practices.md
Daniel Eratc10be9e2017-03-07 01:51:4973[style guide]: https://github.com/google/styleguide/tree/gh-pages/docguide
Daniel Erat6bc26782017-06-27 22:59:2274[repo]: https://source.android.com/source/using-repo
Satoru Takabayashi38520822017-06-28 05:01:0775[chromium-review.googlesource.com]: https://chromium-review.googlesource.com/
Mike Frysinger9fc0fc02020-09-05 05:18:5776[md_browser]: https://chromium.googlesource.com/chromium/src/tools/md_browser/