Skip to content

Commit

Permalink
update conf.py
Browse files Browse the repository at this point in the history
  • Loading branch information
elpham6 authored and elpham6 committed May 9, 2024
1 parent c1e6663 commit d425ea8
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 17 deletions.
24 changes: 10 additions & 14 deletions README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,15 @@ Add the following to the beginning of **conf.py**:

Sphinx has many useful extensions, which you can check out `here <https://www.sphinx-doc.org/en/master/usage/extensions/index.html>`_.

For this tutorial, add the following extensions to the ``extensions`` list:
For this tutorial, add the following extensions to the ``extensions`` list in **conf.py**:

.. code-block:: python
extensions = [
"sphinx.ext.autodoc",
"sphinx.ext.napoleon",
"sphinx.ext.linkcode",
]
- ``sphinx.ext.autodoc``: automatically takes doc strings from your Python files

Expand Down Expand Up @@ -139,18 +147,6 @@ For this tutorial, add the following extensions to the ``extensions`` list:
Adjust the config according to your folder structure and names. If you would like a different type of output, refer to Sphinx's `configuration documentation <https://www.sphinx-doc.org/en/master/usage/configuration.html#options-for-html-output>`_.



The resulting ``extensions`` list should look like this:

.. code-block:: python
extensions = [
"sphinx.ext.autodoc",
"sphinx.ext.napoleon",
"sphinx.ext.linkcode",
]
5.3 Theme (Optional)
--------------------

Expand All @@ -168,7 +164,7 @@ This tutorial uses a Sphinx theme called `Read the Docs <https://sphinx-themes.o
6. Building Documentation
=========================

1. Change directory to the `docs` folder.
1. Change directory to the ``docs`` folder.

2. Run ``make html``. The result will be in **docs/_build/html**.

Expand Down
2 changes: 1 addition & 1 deletion docs/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@
"github_user": "elpham6", # Username of repo's owner
"github_repo": "sphinx_demo", # Repo name
"github_version": "main", # Version
"conf_py_path": ".", # Path in the checkout to the docs root
"conf_py_path": "/src", # Path in the checkout to the docs root
}
html_theme = 'sphinx_rtd_theme'
html_static_path = ['_static']
Expand Down
2 changes: 0 additions & 2 deletions src/calculator.py
Original file line number Diff line number Diff line change
Expand Up @@ -65,5 +65,3 @@ def divide(x, y):
ZeroDivisionError: error when the divisor is 0
"""
return x / y

a = divide(10,2)

0 comments on commit d425ea8

Please sign in to comment.