Bug 1618910 - Set up Firefox on Glean documentation r=janerik

Differential Revision: https://phabricator.services.mozilla.com/D66574

--HG--
extra : moz-landing-system : lando
This commit is contained in:
Chris H-C 2020-03-12 13:56:47 +00:00
parent 956aa760bd
commit 07ac967613
5 changed files with 105 additions and 0 deletions

View File

@ -0,0 +1,32 @@
# Firefox on Glean (FOG)
Firefox on Glean (FOG) is the name of the layer that integrates the
[Glean SDK][glean-sdk] into
[Firefox Desktop](https://www.firefox.com/).
It is currently being designed and implemented.
The [Glean SDK][glean-sdk]
is a data collection library built by Mozilla for use in its products.
Like [Telemetry][telemetry], it can be used to
(in accordance with our [Privacy Policy][privacy-policy])
send anonymous usage statistics to Mozilla in order to make better decisions.
If you have any questions, please reach out to the team on
[#glean:mozilla.org][glean-matrix].
```eval_rst
.. toctree::
:titlesonly:
:maxdepth: 1
:glob:
Glean SDK Source <https://github.com/mozilla/glean/>
Glean SDK Documentation <https://mozilla.github.io/glean/book/index.html>
*
```
[telemetry]: ../telemetry
[glean-sdk]: https://github.com/mozilla/glean/
[book-of-glean]: https://mozilla.github.io/glean/book/index.html
[privacy-policy]: https://www.mozilla.org/privacy/
[glean-matrix]: https://chat.mozilla.org/#/room/#glean:mozilla.org

View File

@ -0,0 +1,58 @@
# FOG Documentation Style Guide
FOG's Documentation is written in Markdown.
You can find its source at `toolkit/components/glean/docs`.
## Line breaks
We will use [semantic linefeeds]:
* Break anywhere before 80-100 characters
* Break after any punctuation when it makes sense
* Break before or after any markdown when it makes sense
**Tip:** To keep lines narrow, use markdown's [reference link]
feature whenever it makes sense (or all the time. Up to you.).
## Linking to other documentation
Linking to other external documentation is [easy][reference link].
Linking to other pieces of documentation in the source docs might not be.
To link to another markdown page in FOG's documentation, you can use
```md
[link text](page_name.md)
```
Sphinx will automagically transform that to an
appropriately-base-url'd url with a `.html` suffix.
Unfortunately, this doesn't work for linking to
`.rst` files like those in use in [Telemetry]'s documentation.
(Follow [bug 1621950] for updates).
In those cases you have to link it like it's html.
For example, to link to [Telemetry] you can use either of
```md
[Telemetry](../telemetry)
[Telemetry](../telemetry/index.html)
```
Both will work. Both will generate warnings.
For example, the first form will generate this:
```console
None:any reference target not found: ../telemetry
```
But it will still work because linking to a directory in html links to its
`index.html` (which is where `index.rst` ends up).
We can suppress this by putting a fake anchor
(like `#https://`) on the end to fool Sphinx into not checking it.
But that seems like a hack more unseemly than the warnings,
so let's not.
[semantic linefeeds]: https://rhodesmill.org/brandon/2012/one-sentence-per-line/
[reference link]: https://spec.commonmark.org/0.29/#reference-link
[Telemetry]: ../telemetry
[#firefox-source-docs:mozilla.org]: https://chat.mozilla.org/#/room/#firefox-source-docs:mozilla.org
[bug 1621950]: https://bugzilla.mozilla.org/show_bug.cgi?id=1621950

View File

@ -0,0 +1,13 @@
# -*- Mode: python; indent-tabs-mode: nil; tab-width: 40 -*-
# vim: set filetype=python:
# This Source Code Form is subject to the terms of the Mozilla Public
# License, v. 2.0. If a copy of the MPL was not distributed with this
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
SPHINX_TREES['/toolkit/components/glean'] = 'docs'
with Files('docs/**'):
SCHEDULES.exclusive = ['docs']
with Files('**'):
BUG_COMPONENT = ('Toolkit', 'Telemetry')

View File

@ -40,6 +40,7 @@ DIRS += [
'finalizationwitness',
'find',
'fuzzyfox',
'glean',
'jsoncpp/src/lib_json',
'kvstore',
'lz4',

View File

@ -15,6 +15,7 @@ This is the nascent documentation of the Toolkit code that is shared across Fire
components/normandy/normandy/index
modules/subprocess/toolkit_modules/subprocess/index
components/telemetry/index
components/glean/index
modules/toolkit_modules/index
content/toolkit_widgets/index
components/url-classifier/url-classifier/index