Skip to content

Commit 1ff5a17

Browse files
committed
Updates before site deployment
Updated conf.py to include baseurl. Small changes to documents and included pictures as jpg.
1 parent deb9807 commit 1ff5a17

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

65 files changed

+663
-28552
lines changed

docs/.nojekyll

Whitespace-only changes.

docs/README.md

Lines changed: 118 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,118 @@
1+
2+
# Locally Rendering Sphinx
3+
4+
Guide to rendering the documentation site using Sphinx.
5+
6+
This document includes:
7+
- The coderdata/docs directory structure
8+
- Sphinx commands
9+
- Guide to updating the documentation site
10+
- Helpful sphinx features
11+
12+
13+
## Directory Structure
14+
15+
![Directory Structure](sphinx_dir_struct.png?raw=true)
16+
17+
## Sphinx Commands
18+
19+
### Dependencies
20+
21+
Included in `coderdata/docs/requirements.txt`. Extra installations that enable various sphinx extensions.
22+
23+
- sphinx
24+
- myst-parser - adds support for markdown files
25+
- sphinx-design - provides extra design functions (i.e buttons and grids)
26+
- nbsphinx - enables rendering of .ipynb files
27+
- sphinx_tabs - adds tabbed content components
28+
29+
### Build
30+
31+
To build the Sphinx documentation locally, navigate to the `docs` directory and run the `sphinx-build` command. This command processes the content files from the `source` directory and generates the rendered HTML output in the `build` directory.
32+
33+
```sh
34+
$ cd ../coderdata/docs
35+
36+
$ python -m sphinx.cmd.build -M html <SOURCEDIR/> <OUTPUTDIR/>
37+
38+
$ python -m sphinx.cmd.build -M html source/ build/
39+
```
40+
To view the rendered site open `coderdata/docs/build/html/index.html`.
41+
42+
### Quickstart
43+
44+
To create a basic sphinx set-up in a local repository use sphinx quickstart command.
45+
46+
```sh
47+
$ cd ../repo/docs
48+
$ python -m sphinx.cmd.quickstart
49+
```
50+
Questions will follow this command and when it prompts if you'd like to separate the source and build directories select yes.
51+
52+
## Updating Documentation Site
53+
54+
The `conf.py` file is the central configuration file for Sphinx and it determines the behavior and appearance of the generated documentation. Specifically it configures extensions, defines metadata, controls output settings, and customizes sphinx behavior. The `index.rst` file is the starting page for the Sphinx documentation build process. It acts as the root file, linking all other pages and defining the document hierarchy. All other .md and .rst files are added and internally referenced within the index page or within the sidebar.
55+
56+
### Pages
57+
58+
To update pages navigate to `docs/source`, all .rst and .md files live here. Here a reference of the main pages used for the documentation site.
59+
60+
| Main Pages | File Name | Content |
61+
| -----------------| ----------------------------------------------------------------------- | ------------------------------ |
62+
| Home Page | index.rst | Introduction and Install |
63+
| Usage | usage.md | API and CLI |
64+
| API Reference | APIreference.rst | Sphinx autogenerated docstrings|
65+
| Datasets Included| datasets_included.rst | Datasets overview table |
66+
| Tutorials | tutorials.rst | Deep Learning Tutorial |
67+
| How To Contribute| contribution_guide.rst *includes contribution.md and add_code_guide.md* | Contribution Guide |
68+
69+
Note: When adding pages, reStructuredText files are the most sphinx friendly and allow for use of helpful sphinx features. However, Markdown files can be used and will render properly when the myst-parser extension is used.
70+
71+
### Images and Graphics
72+
73+
To add any new images they will live in `docs/source/_static`. The coderdata_header.png and home_page_graphic.png were made using [canva](https://www.canva.com/). The designs are shared with team members so that they can easily be edited if needed!
74+
75+
### Site Theme and Design
76+
77+
The original sphinx theme used is 'sphinxdoc', however, to change certain aspects an additional file custom.css was included to override the sphinxdoc theme. To update the custom theme navigate to `docs/source/_static/custom.css`. Changes to the sidebar can be made in `docs/source/_templates/my_custom_sidebar.html`. Any other custom templates will be added to `docs/source/_templates`.
78+
79+
Note: The sphinxdoc theme is automatically generated during the build command into `docs/build/html/_static/sphinxdoc.css`. It is regenerated everytime sphinx build runs so changes to the theme must be made in custom.css.
80+
81+
82+
## Helpful Sphinx Features
83+
84+
### Site Links
85+
86+
- [Sphinx Documentation](https://www.sphinx-doc.org/en/master/index.html)
87+
- [Sphinxdoc Sample](https://sphinx-themes.org/sample-sites/default-sphinxdoc/)
88+
- [Full List of Directives in Sphinx](https://www.sphinx-doc.org/en/master/usage/restructuredtext/basics.html#rst-directives)
89+
90+
91+
### Directives and Examples Used in CoderData Documentation
92+
93+
- .. automodule::
94+
This is used to generate documentation from the package. It is used in API reference.
95+
96+
```sh
97+
.. automodule:: <pkg>.module
98+
:members: <function>
99+
:undoc-members:
100+
:show-inheritance:
101+
```
102+
103+
- .. include::
104+
To include content from another file. Example shows how to render a markdown file when using the include call.
105+
106+
```sh
107+
.. include:: guide.md
108+
:parser: myst_parser.sphinx_
109+
```
110+
111+
- .. image::
112+
113+
```sh
114+
.. image:: _static/image.png
115+
:align: center
116+
:scale: 100%
117+
```
118+
-4.04 KB
Binary file not shown.

docs/build/doctrees/beataml.doctree

-8.23 KB
Binary file not shown.
-100 Bytes
Binary file not shown.
-18.5 KB
Binary file not shown.
-28.3 KB
Binary file not shown.
-915 Bytes
Binary file not shown.

docs/build/doctrees/index.doctree

-7.34 KB
Binary file not shown.

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy