Skip to content

Commit

Permalink
Updated docs
Browse files Browse the repository at this point in the history
  • Loading branch information
marcantondahmen committed Jun 11, 2020
1 parent 4834d44 commit b83a5fd
Show file tree
Hide file tree
Showing 18 changed files with 143 additions and 49 deletions.
2 changes: 1 addition & 1 deletion docs.bat
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
set cwd=%~dp0
cd %cwd%
cd docs
sphinx-apidoc --private --ext-viewcode --ext-githubpages -e -T -M --implicit-namespaces -f -o source/ ../revitron
sphinx-apidoc --ext-viewcode --templatedir source/_templates/ -eTMf -o source/ ../revitron
call make html
cd %cwd%
19 changes: 19 additions & 0 deletions docs/source/_static/revitron.svg
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
8 changes: 8 additions & 0 deletions docs/source/_templates/module.rst_t
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
{%- if show_headings %}
{{- basename | e | heading }}

{% endif -%}
.. automodule:: {{ qualname }}
{%- for option in automodule_options %}
:{{ option }}:
{%- endfor %}
53 changes: 53 additions & 0 deletions docs/source/_templates/package.rst_t
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
{%- macro automodule(modname, options) -%}
.. automodule:: {{ modname }}
{%- for option in options %}
:{{ option }}:
{%- endfor %}
{%- endmacro %}

{%- macro toctree(docnames) -%}
.. toctree::
:maxdepth: {{ maxdepth }}
{% for docname in docnames %}
{{ docname }}
{%- endfor %}
{%- endmacro %}

{%- if is_namespace %}
{{- [pkgname, "namespace"] | join(" ") | e | heading }}
{% else %}
{{- "API Reference" | e | heading }}
{% endif %}

{%- if modulefirst and not is_namespace %}
{{ automodule(pkgname, automodule_options) }}
{% endif %}

{%- if subpackages %}
Subpackages
-----------

{{ toctree(subpackages) }}
{% endif %}

{%- if submodules %}
Submodules
----------
{% if separatemodules %}
{{ toctree(submodules) }}
{%- else %}
{%- for submodule in submodules %}
{% if show_headings %}
{{- [submodule, "module"] | join(" ") | e | heading(2) }}
{% endif %}
{{ automodule(submodule, automodule_options) }}
{% endfor %}
{%- endif %}
{% endif %}

{%- if not modulefirst and not is_namespace %}
Module contents
---------------

{{ automodule(pkgname, automodule_options) }}
{% endif %}
7 changes: 7 additions & 0 deletions docs/source/_templates/toc.rst_t
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{{ header | heading }}

.. toctree::
:maxdepth: {{ maxdepth }}
{% for docname in docnames %}
{{ docname }}
{%- endfor %}
17 changes: 16 additions & 1 deletion docs/source/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,22 @@
# The theme to use for HTML and HTML Help pages. See the documentation for
# a list of builtin themes.
#
html_theme = 'alabaster'
#html_theme = 'alabaster'


html_theme = "pydata_sphinx_theme"
html_logo = "_static/revitron.svg"

html_theme_options = {
"github_url": "https://github.com/revitron/revitron"
}

html_context = {
"github_user": "revitron",
"github_repo": "revitron",
"github_version": "master",
"doc_path": "docs"
}

# Add any paths that contain custom static files (such as style sheets) here,
# relative to this directory. They are copied after the builtin static files,
Expand Down
11 changes: 7 additions & 4 deletions docs/source/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -3,17 +3,20 @@
You can adapt this file completely to your liking, but it should at least
contain the root `toctree` directive.
Welcome to Revitron's documentation!
====================================
Revitron
========

A python wrapper for the Revit API to be used as a pyRevit extension.

.. toctree::
:maxdepth: 4
:caption: Contents:


revitron
GitHub <https://github.com/revitron/revitron>

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

* :ref:`genindex`
* :ref:`modindex`
Expand Down
7 changes: 3 additions & 4 deletions docs/source/revitron.category.rst
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
revitron.category module
========================
revitron.category
=================

.. automodule:: revitron.category
:members:
:undoc-members:
:show-inheritance:
:private-members:
:show-inheritance:
7 changes: 3 additions & 4 deletions docs/source/revitron.document.rst
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
revitron.document module
========================
revitron.document
=================

.. automodule:: revitron.document
:members:
:undoc-members:
:show-inheritance:
:private-members:
:show-inheritance:
7 changes: 3 additions & 4 deletions docs/source/revitron.element.rst
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
revitron.element module
=======================
revitron.element
================

.. automodule:: revitron.element
:members:
:undoc-members:
:show-inheritance:
:private-members:
:show-inheritance:
7 changes: 3 additions & 4 deletions docs/source/revitron.externalreference.rst
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
revitron.externalreference module
=================================
revitron.externalreference
==========================

.. automodule:: revitron.externalreference
:members:
:undoc-members:
:show-inheritance:
:private-members:
:show-inheritance:
7 changes: 3 additions & 4 deletions docs/source/revitron.filter.rst
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
revitron.filter module
======================
revitron.filter
===============

.. automodule:: revitron.filter
:members:
:undoc-members:
:show-inheritance:
:private-members:
:show-inheritance:
7 changes: 3 additions & 4 deletions docs/source/revitron.link.rst
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
revitron.link module
====================
revitron.link
=============

.. automodule:: revitron.link
:members:
:undoc-members:
:show-inheritance:
:private-members:
:show-inheritance:
7 changes: 3 additions & 4 deletions docs/source/revitron.parameter.rst
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
revitron.parameter module
=========================
revitron.parameter
==================

.. automodule:: revitron.parameter
:members:
:undoc-members:
:show-inheritance:
:private-members:
:show-inheritance:
5 changes: 2 additions & 3 deletions docs/source/revitron.rst
Original file line number Diff line number Diff line change
@@ -1,11 +1,10 @@
revitron package
================
API Reference
=============

.. automodule:: revitron
:members:
:undoc-members:
:show-inheritance:
:private-members:

Submodules
----------
Expand Down
7 changes: 3 additions & 4 deletions docs/source/revitron.selection.rst
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
revitron.selection module
=========================
revitron.selection
==================

.. automodule:: revitron.selection
:members:
:undoc-members:
:show-inheritance:
:private-members:
:show-inheritance:
7 changes: 3 additions & 4 deletions docs/source/revitron.transaction.rst
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
revitron.transaction module
===========================
revitron.transaction
====================

.. automodule:: revitron.transaction
:members:
:undoc-members:
:show-inheritance:
:private-members:
:show-inheritance:
7 changes: 3 additions & 4 deletions docs/source/revitron.transmissiondata.rst
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
revitron.transmissiondata module
================================
revitron.transmissiondata
=========================

.. automodule:: revitron.transmissiondata
:members:
:undoc-members:
:show-inheritance:
:private-members:
:show-inheritance:

0 comments on commit b83a5fd

Please sign in to comment.