Skip to content

Commit

Permalink
Merge pull request #812 from aaroncameron-wk/read-the-docs-init
Browse files Browse the repository at this point in the history
  • Loading branch information
austinmatherne-wk committed Aug 3, 2023
2 parents 4ac12d4 + 54f33d7 commit c830edb
Show file tree
Hide file tree
Showing 10 changed files with 156 additions and 0 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -50,3 +50,4 @@ Pipfile.lock
Pipfile

.DS_Store
docs/_build
13 changes: 13 additions & 0 deletions .readthedocs.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
version: 2

build:
os: ubuntu-22.04
tools:
python: "3.11"

python:
install:
- requirements: requirements-docs.txt

sphinx:
fail_on_warning: true
Binary file added arelle/images/arelle-rtd.gif
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
20 changes: 20 additions & 0 deletions docs/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)
37 changes: 37 additions & 0 deletions docs/conf.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
# 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 = 'Arelle'
copyright = '2011-present Workiva, Inc.'
author = 'support@arelle.org'

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

extensions = [
'myst_parser',
]

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 = 'furo'
html_theme_options = {
"light_css_variables": {
"color-brand-primary": "#ac218e",
"color-brand-content": "#ac218e",
},
"dark_css_variables": {
"color-brand-primary": "#6ecacb",
"color-brand-content": "#6ecacb",
},
}
html_title = 'Arelle <release>'
html_logo = '../arelle/images/arelle-rtd.gif'
17 changes: 17 additions & 0 deletions docs/index.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
# Arelle Documentation

Arelle is an end-to-end open source XBRL platform, which provides the XBRL community with an easy to use set of tools.
It supports XBRL and its extension features in an extensible manner.
It does this in a compact yet robust framework that can be used as a desktop application and can be integrated with other applications and languages utilizing its web service.

```{toctree}
:hidden:
../source/build_docs.md
```

# Indices and Tables

```{eval-rst}
* :ref:`genindex`
* :ref:`search`
```
35 changes: 35 additions & 0 deletions docs/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
25 changes: 25 additions & 0 deletions docs/source/build_docs.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
# Building Documentation

```{eval-rst}
.. index:: Documentation
```

Arelle's documentation is built using Sphinx.
To build locally:

1. Install documentation dependencies from `requirements-docs.txt`. For example:
```
pip install -r requirements-docs.txt
```

2. Navigate to `/docs` directory.
```
cd docs
```

3. Build HTML
```
make html
```

4. Open `/docs/_build/html/index.html` in your browser.
5 changes: 5 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,11 @@ ESEF = [
ObjectMaker = [
'graphviz==0.*',
]
Sphinx = [
"myst-parser==2.*",
"sphinx==6.*",
"furo",
]
WebServer = [
'cheroot>=8,<11',
'CherryPy==18.*',
Expand Down
3 changes: 3 additions & 0 deletions requirements-docs.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
furo==2023.07.26
myst-parser==2.0.0
sphinx==6.2.1

0 comments on commit c830edb

Please sign in to comment.