From 1ade71a9abe89ff321715ee4cdf7c0f6182581cd Mon Sep 17 00:00:00 2001 From: Arul Kumaran <arulkumaran.devarajan@huawei.com> Date: Tue, 30 Mar 2021 20:02:57 +0530 Subject: [PATCH] building-project-documentation: Introduce new section Signed-off-by: Arul Kumaran <arulkumaran.devarajan@huawei.com> Signed-off-by: Andrei Gherzan <andrei.gherzan@huawei.com> --- building-project-documentation.rst | 58 ++++++++++++++++++++++++++++++ index.rst | 1 + 2 files changed, 59 insertions(+) create mode 100644 building-project-documentation.rst diff --git a/building-project-documentation.rst b/building-project-documentation.rst new file mode 100644 index 0000000..1cd75c8 --- /dev/null +++ b/building-project-documentation.rst @@ -0,0 +1,58 @@ +.. SPDX-FileCopyrightText: Huawei Inc. +.. +.. SPDX-License-Identifier: CC-BY-4.0 + +.. include:: definitions.rst + +Building |main_project_name| documentation +########################################## + +This topic outlines the standard way of generating the |main_project_name| +project documentation locally using the source files available in the +`git.ostc-eu.org <https://git.ostc-eu.org/OSTC/OHOS/docs>`__ repository which +aggregates documentation from multiple other components. + +Overview +******** + +The |main_project_name| documentation is written in reStructuredText markup +language (``.rst`` file extension) with Sphinx extensions to generate a +structured stand-alone website. + +To generate the HTML documentation locally, Sphinx must be installed on your +local system. Also, to build the documentation using the provided ``Makefile``, +make must also be available on your host. + +For more details on Sphinx installation, refer `Sphinx Getting Started <https://www.sphinx-doc.org/en/master/usage/quickstart.html>`__. + +Building the documentation +************************** + +To generate a local copy of |main_project_name| documentation, perform the +following steps: + +1. Create a local workspace and clone the |main_project_name| project files to + your local, refer to :ref:`setting up a repo workspace <RepoWorkspace>` + section for more information. +2. To generate output as HTML, run the following command: + +.. code-block:: console + + $ make + +The HTML output is built and can be viewed in your browser from the *<docs +repository>/build/index.html* path. + +.. note:: + + * All the local Sphinx warnings and errors generated during the build + process must be fixed and validated. + * To validate the changes, execute ``make clean && make`` command to + generate a clean HTML output. + +Reference +********* + +`<https://www.sphinx-doc.org/en/master/contents.html>`_ + +`<https://www.sphinx-doc.org/en/master/usage/restructuredtext/index.html>`_ diff --git a/index.rst b/index.rst index a3f1e11..068e523 100644 --- a/index.rst +++ b/index.rst @@ -28,6 +28,7 @@ daily life. contributing/index ci/index repos/index + building-project-documentation ip-policy/index code-of-conduct community-chat-platform -- GitLab