Skip to content

Commit

Permalink
sphinx structure
Browse files Browse the repository at this point in the history
  • Loading branch information
zzeppozz committed Feb 28, 2024
1 parent 6991676 commit a5a8140
Show file tree
Hide file tree
Showing 7 changed files with 141 additions and 0 deletions.
3 changes: 3 additions & 0 deletions .github/linters/.markdownlint
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"MD013": {"line_length": 88}
}
31 changes: 31 additions & 0 deletions .github/workflows/build_sphinx_docs.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
name: Sphinx to GitHub Pages
# Builds documentation residing at https://biotaphy.github.io/tutorials/
on:
push:
tags:
- '*.*.*' # Tag events matching {major}.{minor}.{patch}{whatever}
branches:
- main
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@master
with:
fetch-depth: 0
- name: Install documentation dependencies
#uses: py-actions/py-dependency-install@v2
#with:
# path: "requirements-docs.txt"
run: |
pip install -r requirements-docs.txt
- name: Build and Commit
uses: sphinx-notes/[email protected]
with:
documentation_path: _sphinx_config/
- name: Push changes to GH Pages branch
uses: ad-m/github-push-action@master
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
branch: gh-pages
5 changes: 5 additions & 0 deletions requirements-docs.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
sphinx
git+https://github.com/rtfd/recommonmark
sphinx-rtd-theme
sphinx-autoapi
myst-parser
20 changes: 20 additions & 0 deletions sphinx/Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
# Minimal makefile for Sphinx documentation
#

# You can set these variables from the command line, and also
# from the environment for the first two.
SPHINXOPTS ?=
SPHINXBUILD ?= sphinx-build
SOURCEDIR = .
BUILDDIR = _build

# Put it first so that "make" without argument is like "make help".
help:
@$(SPHINXBUILD) -M help "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O)

.PHONY: help Makefile

# Catch-all target: route all unknown targets to Sphinx using the new
# "make mode" option. $(O) is meant as a shortcut for $(SPHINXOPTS).
%: Makefile
@$(SPHINXBUILD) -M $@ "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O)
27 changes: 27 additions & 0 deletions sphinx/conf.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
# Configuration file for the Sphinx documentation builder.
#
# For the full list of built-in configuration values, see the documentation:
# https://www.sphinx-doc.org/en/master/usage/configuration.html

# -- Project information -----------------------------------------------------
# https://www.sphinx-doc.org/en/master/usage/configuration.html#project-information

project = 'Specify Developer Documentation'
copyright = '2024, Specify Team'
author = 'Specify Team'

# -- General configuration ---------------------------------------------------
# https://www.sphinx-doc.org/en/master/usage/configuration.html#general-configuration

extensions = []

templates_path = ['_templates']
exclude_patterns = ['_build', 'Thumbs.db', '.DS_Store']



# -- Options for HTML output -------------------------------------------------
# https://www.sphinx-doc.org/en/master/usage/configuration.html#options-for-html-output

html_theme = 'alabaster'
html_static_path = ['_static']
20 changes: 20 additions & 0 deletions sphinx/index.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
.. Specify Developer Documentation documentation master file, created by
sphinx-quickstart on Wed Feb 28 17:19:26 2024.
You can adapt this file completely to your liking, but it should at least
contain the root `toctree` directive.
Welcome to Specify Developer Documentation's documentation!
===========================================================

.. toctree::
:maxdepth: 2
:caption: Contents:



Indices and tables
==================

* :ref:`genindex`
* :ref:`modindex`
* :ref:`search`
35 changes: 35 additions & 0 deletions sphinx/make.bat
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
@ECHO OFF

pushd %~dp0

REM Command file for Sphinx documentation

if "%SPHINXBUILD%" == "" (
set SPHINXBUILD=sphinx-build
)
set SOURCEDIR=.
set BUILDDIR=_build

%SPHINXBUILD% >NUL 2>NUL
if errorlevel 9009 (
echo.
echo.The 'sphinx-build' command was not found. Make sure you have Sphinx
echo.installed, then set the SPHINXBUILD environment variable to point
echo.to the full path of the 'sphinx-build' executable. Alternatively you
echo.may add the Sphinx directory to PATH.
echo.
echo.If you don't have Sphinx installed, grab it from
echo.https://www.sphinx-doc.org/
exit /b 1
)

if "%1" == "" goto help

%SPHINXBUILD% -M %1 %SOURCEDIR% %BUILDDIR% %SPHINXOPTS% %O%
goto end

:help
%SPHINXBUILD% -M help %SOURCEDIR% %BUILDDIR% %SPHINXOPTS% %O%

:end
popd

0 comments on commit a5a8140

Please sign in to comment.