kyuubi/docs/contributing/doc/style.rst
dnskr c31c1a5925
[KYUUBI #6987] [DOC] Fix Unknown target name issues
### Why are the changes needed?

The PR fixes few `Unknown target name: "XYZ". [docutils]` issues and resolves the following errors messages:
```
../kyuubi/docs/contributing/doc/get_started.rst:27: ERROR: Unknown target name: "github repository". [docutils]
../kyuubi/docs/contributing/doc/get_started.rst:27: ERROR: Unknown target name: "read the docs". [docutils]

../kyuubi/docs/contributing/doc/style.rst:66: ERROR: Unknown target name: "directive rubric". [docutils]
```

### How was this patch tested?

Built documentation locally, checked there are no related error messages and doc pages are correct.

##### Page `contributing/doc/get_started.html`
Before changes
<img width="1114" alt="image" src="https://github.com/user-attachments/assets/f1a19c51-3c4c-4268-bf83-7ca0c60315b1" />

After changes
<img width="1113" alt="image" src="https://github.com/user-attachments/assets/437edef1-0fd9-43bf-bd3f-bda43035a2c9" />

##### Page `contributing/doc/style.html`
Before changes
<img width="1128" alt="image" src="https://github.com/user-attachments/assets/39666841-1155-439f-9045-06a9d78624c3" />

After changes
<img width="1117" alt="image" src="https://github.com/user-attachments/assets/2e1f8663-5c1e-4a3c-887e-5f65d01b4cf3" />

### Was this patch authored or co-authored using generative AI tooling?

No

Closes #6987 from dnskr/fix-doc-unknown-target-name.

Closes #6987

391958b4d [dnskr] [DOC] Fix Unknown target name issues

Authored-by: dnskr <dnskrv88@gmail.com>
Signed-off-by: Cheng Pan <chengpan@apache.org>
2025-03-17 16:05:18 +08:00

140 lines
4.7 KiB
ReStructuredText

.. Licensed to the Apache Software Foundation (ASF) under one or more
contributor license agreements. See the NOTICE file distributed with
this work for additional information regarding copyright ownership.
The ASF licenses this file to You under the Apache License, Version 2.0
(the "License"); you may not use this file except in compliance with
the License. You may obtain a copy of the License at
.. http://www.apache.org/licenses/LICENSE-2.0
.. Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
Documentation Style Guide
=========================
This guide contains guidelines, not rules. While guidelines are important
to follow, they are not hard and fast rules. It's important to use your
own judgement and discretion when creating content, and to depart from the
guidelines when necessary to improve the quality and effectiveness of your
content. Ultimately, the goal is to create content that is clear, concise,
and useful to your audience, and sometimes deviating from the guidelines
may be necessary to achieve that goal.
Goals
-----
- Source text files are readable and portable
- Source diagram files are editable
- Source files are maintainable over time and across community
License Header
--------------
All original documents should include the ASF license header. All reproduced
or quoted content should be authorized and attributed to the source.
If you are about to quote some from commercial materials, please refer to
`ASF 3RD PARTY LICENSE POLICY`_, or consult the Apache Kyuubi PMC to avoid
legality issues.
General Style
-------------
- Use `ReStructuredText`_ or `Markdown`_ format for text, avoid HTML hacks
- Use `draw.io`_ for drawing or editing an image, and export it as PNG for
referencing in document. A pull request should commit both of them
- Use Kyuubi for short instead of Apache Kyuubi after the first time in the
same page
- Character line limit: 78, except unbreakable ones
- Prefer lists to tables
- Prefer unordered list than ordered
ReStructuredText
----------------
Headings
~~~~~~~~
- Use **Pascal Case**, every word starts with an uppercase letter, e.g., 'Documentation Style Guide'
- Use a max of **three levels**
- Split into multiple files when there comes an H4
- Prefer `directive rubric`_ than H4
- Use underline-only adornment styles, **DO NOT** use overline
- The length of underline characters **SHOULD** match the title
- H1 should be underlined with '='
- H2 should be underlined with '-'
- H3 should be underlined with '~'
- H4 should be underlined with '^', but it's better to avoid using H4
- **DO NOT** use numbering for sections
- **DO NOT** use "Kyuubi" in titles if possible
Links
~~~~~
- Define links with short descriptive phrases, group them at the bottom of the file
.. note::
:class: dropdown, toggle
.. code-block::
:caption: Recommended
Please refer to `Apache Kyuubi Home Page`_.
.. _Apache Kyuubi Home Page: https://kyuubi.apache.org/
.. code-block::
:caption: Not recommended
Please refer to `Apache Kyuubi Home Page <https://kyuubi.apache.org/>`_.
Markdown
--------
Headings
~~~~~~~~
- Use **Pascal Case**, every word starts with an uppercase letter, e.g., 'Documentation Style Guide'
- Use a max of **three levels**
- Split into multiple files when there comes an H4
- **DO NOT** use numbering for sections
- **DO NOT** use "Kyuubi" in titles if possible
Images
------
Use images only when they provide helpful visual explanations of information
otherwise difficult to express with words
Third-party references
----------------------
If the preceding references don't provide explicit guidance, then see these
third-party references, depending on the nature of your question:
- `Google developer documentation style`_
- `Apple Style Guide`_
- `Red Hat supplementary style guide for product documentation`_
.. References
.. _ASF 3RD PARTY LICENSE POLICY: https://www.apache.org/legal/resolved.html#asf-3rd-party-license-policy
.. _directive rubric: https://www.sphinx-doc.org/en/master/usage/restructuredtext/directives.html#directive-rubric
.. _ReStructuredText: https://docutils.sourceforge.io/rst.html
.. _Markdown: https://en.wikipedia.org/wiki/Markdown
.. _draw.io: https://www.diagrams.net/
.. _Google developer documentation style: https://developers.google.com/style
.. _Apple Style Guide: https://help.apple.com/applestyleguide/
.. _Red Hat supplementary style guide for product documentation: https://redhat-documentation.github.io/supplementary-style-guide/