Skip to content

Commit f35c026

Browse files
committed
Add docs directory
Add docs directory
1 parent f7e4255 commit f35c026

11 files changed

Lines changed: 328 additions & 2 deletions

File tree

.github/workflows/build-docs.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ jobs:
3434
if: github.actor != 'pdsen-ci'
3535
steps:
3636
- name: Checkout
37-
uses: actions/checkout@v5
37+
uses: actions/checkout@v6
3838
with:
3939
token: ${{ secrets.ADMIN_GITHUB_TOKEN || github.token }}
4040

@@ -73,7 +73,7 @@ jobs:
7373
if: github.actor != 'pdsen-ci'
7474

7575
steps:
76-
- uses: actions/checkout@v5
76+
- uses: actions/checkout@v6
7777
with:
7878
token: ${{ secrets.ADMIN_GITHUB_TOKEN || github.token }}
7979

docs/Makefile

Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
# Minimal makefile for Sphinx documentation
2+
#
3+
4+
# You can set these variables from the command line, and also
5+
# from the environment for the first two.
6+
SPHINXOPTS ?=
7+
SPHINXBUILD ?= sphinx-build
8+
SOURCEDIR = source
9+
BUILDDIR = build
10+
11+
# Put it first so that "make" without argument is like "make help".
12+
help:
13+
@$(SPHINXBUILD) -M help "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O)
14+
15+
github:
16+
@make clean checklinks html
17+
@find .. -mindepth 1 -maxdepth 1 -type d -not -name "*git*" -not -name "*docs" -exec rm -fr {} \;
18+
@cp -a build/html/. ..
19+
20+
cleaner:
21+
@make clean
22+
@find .. -mindepth 1 -maxdepth 1 -type d -not -name "*git*" -not -name "*docs" -exec rm -fr {} \;
23+
24+
.PHONY: help Makefile checklinks
25+
26+
# Catch-all target: route all unknown targets to Sphinx using the new
27+
# "make mode" option. $(O) is meant as a shortcut for $(SPHINXOPTS).
28+
%: Makefile
29+
@$(SPHINXBUILD) -M $@ "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O)
30+
31+
32+
# LINKCHECKDIR = build/linkcheck
33+
34+
# .PHONY: checklinks
35+
# checklinks:
36+
# $(SPHINXBUILD) -b linkcheck $(ALLSPHINXOPTS) $(LINKCHECKDIR)
37+
# @echo
38+
# @echo "Check finished. Report is in $(LINKCHECKDIR)."

docs/make.bat

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
@ECHO OFF
2+
3+
pushd %~dp0
4+
5+
REM Command file for Sphinx documentation
6+
7+
if "%SPHINXBUILD%" == "" (
8+
set SPHINXBUILD=sphinx-build
9+
)
10+
set SOURCEDIR=source
11+
set BUILDDIR=build
12+
13+
if "%1" == "" goto help
14+
15+
%SPHINXBUILD% >NUL 2>NUL
16+
if errorlevel 9009 (
17+
echo.
18+
echo.The 'sphinx-build' command was not found. Make sure you have Sphinx
19+
echo.installed, then set the SPHINXBUILD environment variable to point
20+
echo.to the full path of the 'sphinx-build' executable. Alternatively you
21+
echo.may add the Sphinx directory to PATH.
22+
echo.
23+
echo.If you don't have Sphinx installed, grab it from
24+
echo.http://sphinx-doc.org/
25+
exit /b 1
26+
)
27+
28+
%SPHINXBUILD% -M %1 %SOURCEDIR% %BUILDDIR% %SPHINXOPTS% %O%
29+
goto end
30+
31+
:help
32+
%SPHINXBUILD% -M help %SOURCEDIR% %BUILDDIR% %SPHINXOPTS% %O%
33+
34+
:end
35+
popd

docs/requirements.txt

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
sphinx==7.2.6
2+
sphinx-rtd-theme==2.0.0
3+
gitpython==3.1.43
4+
sphinxemoji==0.3.1
5+
myst-parser==2.0.0
92.5 KB
Loading
Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
/* override table width restrictions */
2+
@media screen and (min-width: 767px) {
3+
4+
.wy-table-responsive table td {
5+
/* !important prevents the common CSS stylesheets from overriding
6+
this as on RTD they are loaded after this stylesheet */
7+
white-space: normal !important;
8+
}
9+
10+
.wy-table-responsive {
11+
overflow: visible !important;
12+
}
13+
}
14+
15+
/* replace the copyright to eliminate the copyright symbol enforced by
16+
the ReadTheDocs theme but eschewed by our legal team */
17+
div[role=contentinfo] {
18+
visibility: hidden;
19+
position: relative;
20+
}
21+
22+
div[role=contentinfo]:after {
23+
visibility: visible;
24+
position: absolute;
25+
top: 0;
26+
left: 0;
27+
content: "This is a work of the U.S. Government and is not subject to copyright pursuant to 17 USC 105.";
28+
}

docs/source/conf.py

Lines changed: 100 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,100 @@
1+
# Configuration file for the Sphinx documentation builder.
2+
#
3+
# This file only contains a selection of the most common options. For a full
4+
# list see the documentation:
5+
# https://www.sphinx-doc.org/en/master/usage/configuration.html
6+
7+
# -- Path setup --------------------------------------------------------------
8+
9+
# If extensions (or modules to document with autodoc) are in another directory,
10+
# add these directories to sys.path here. If the directory is relative to the
11+
# documentation root, use os.path.abspath to make it absolute, like shown here.
12+
#
13+
# import os
14+
# import sys
15+
# sys.path.insert(0, os.path.abspath('.'))
16+
17+
18+
# -- Project information -----------------------------------------------------
19+
20+
project = 'Example Namespace'
21+
# copyright = overidden by CSS specified below
22+
author = 'NASA Planetary Data System'
23+
24+
25+
# -- General configuration ---------------------------------------------------
26+
27+
# Add any Sphinx extension module names here, as strings. They can be
28+
# extensions coming with Sphinx (named 'sphinx.ext.*') or your custom
29+
# ones.
30+
extensions = [
31+
'sphinx.ext.autodoc',
32+
'sphinx.ext.doctest',
33+
'sphinx.ext.todo',
34+
'sphinx.ext.viewcode',
35+
'sphinx.ext.githubpages',
36+
'sphinx.ext.autosummary',
37+
'sphinx.ext.autosectionlabel',
38+
'sphinx_rtd_theme',
39+
'sphinxemoji.sphinxemoji',
40+
'myst_parser'
41+
]
42+
43+
# Add any paths that contain templates here, relative to this directory.
44+
templates_path = ['_templates']
45+
46+
# List of patterns, relative to source directory, that match files and
47+
# directories to ignore when looking for source files.
48+
# This pattern also affects html_static_path and html_extra_path.
49+
exclude_patterns = []
50+
51+
52+
# -- Options for HTML output -------------------------------------------------
53+
54+
# The theme to use for HTML and HTML Help pages. See the documentation for
55+
# a list of builtin themes.
56+
#
57+
html_theme = 'sphinx_rtd_theme'
58+
59+
# Add any paths that contain custom static files (such as style sheets) here,
60+
# relative to this directory. They are copied after the builtin static files,
61+
# so a file named "default.css" will overwrite the builtin "default.css".
62+
html_static_path = ['_static']
63+
64+
# -- Read the docs config -------
65+
66+
html_logo = '_static/images/PDS_Planets.png'
67+
68+
html_context = {
69+
'display_github': True,
70+
"github_user": "pds-data-dictionaries",
71+
"github_repo": "ldd-template",
72+
"github_version": "main/docs/source/"
73+
}
74+
75+
html_css_files = [
76+
'theme_overrides.css',
77+
]
78+
79+
html_theme_options = {
80+
'canonical_url': '',
81+
'logo_only': False,
82+
'display_version': True,
83+
'prev_next_buttons_location': 'bottom',
84+
'style_external_links': False,
85+
# Toc options
86+
'collapse_navigation': True,
87+
'sticky_navigation': True,
88+
'navigation_depth': 4,
89+
'includehidden': True,
90+
'titles_only': False
91+
}
92+
93+
myst_enable_extensions = [
94+
"deflist",
95+
"fieldlist"
96+
]
97+
98+
latex_elements = {
99+
'maxlistdepth': '10'
100+
}

docs/source/detailed/example.md

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
# <My_First_LDD>
2+
**REQUIRED**
3+
4+
Submitter: Jane Doe
5+
6+
My first class
7+
8+
## <my_first_attribute>
9+
**REQUIRED**
10+
11+
Submitter: Jane Doe
12+
13+
My first attribute
14+
15+
### Subheader 3
16+
17+
More details
18+
19+
#### Subheader 4
20+
21+
More Details

docs/source/index.rst

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
.. PDS Local Data Dictionaries documentation master file, created by
2+
sphinx-quickstart on Thu Jul 2 18:01:19 2020.
3+
You can adapt this file completely to your liking, but it should at least
4+
contain the root `toctree` directive.
5+
6+
Example Namespace Documentation
7+
===================================
8+
9+
.. include:: intro.md
10+
11+
12+
.. toctree::
13+
:maxdepth: 3
14+
:caption: User Guide
15+
16+
user/user-guide
17+
18+
19+
.. toctree::
20+
:maxdepth: 3
21+
:caption: Detailed Documentation
22+
23+
detailed/example

docs/source/intro.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
Short abstract for the namespace should go here.

0 commit comments

Comments
 (0)