Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add jupyterlite-sphinx #90

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
199 changes: 19 additions & 180 deletions docs/source/conf.py
Original file line number Diff line number Diff line change
@@ -1,194 +1,33 @@
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
#
# ipylab documentation build configuration file
#
# This file is execfile()d with the current directory set to its
# containing dir.
#
# Note that not all possible configuration values are present in this
# autogenerated file.
#
# All configuration values have a default; values that are commented out
# serve to show the default.


# -- General configuration ------------------------------------------------

# If your documentation needs a minimal Sphinx version, state it here.
#
# needs_sphinx = '1.0'

# Add any Sphinx extension module names here, as strings. They can be
# extensions coming with Sphinx (named 'sphinx.ext.*') or your custom
# ones.
extensions = [
"sphinx.ext.autodoc",
"sphinx.ext.viewcode",
"sphinx.ext.intersphinx",
"sphinx.ext.napoleon",
"sphinx.ext.todo",
"nbsphinx",
'sphinx.ext.autodoc',
'sphinx.ext.napoleon',
'jupyterlite_sphinx'
]

# Ensure our extension is available:
import json
import sys
from os.path import dirname, join as pjoin

docs = dirname(dirname(__file__))
root = dirname(docs)
sys.path.insert(0, root)
sys.path.insert(0, pjoin(docs, "sphinxext"))
templates_path = ['_templates']

# Add any paths that contain templates here, relative to this directory.
templates_path = ["_templates"]
# jupyterlite_config = "jupyterlite_config.json"

# The suffix(es) of source filenames.
# You can specify multiple suffix as a list of string:
#
# source_suffix = ['.rst', '.md']
source_suffix = ".rst"

# The master toctree document.
master_doc = "index"
master_doc = 'index'
source_suffix = '.rst'

# General information about the project.
project = "ipylab"
copyright = "2019, ipylab contributors"
author = "ipylab contributors"

# The version info for the project you're documenting, acts as replacement for
# |version| and |release|, also used in various other places throughout the
# built documents.
#
# The short X.Y version.


# get version from python package:
import os

here = os.path.dirname(__file__)
repo = os.path.join(here, "..", "..")
with open(os.path.join(repo, "package.json")) as f:
package = json.load(f)
_version_js = package["version"]

# The short X.Y version.
version = "%i.%i" % tuple(int(part) for part in _version_js.split("."))[:2]
# The full version, including alpha/beta/rc tags.
release = (
_version_js.replace("-alpha.", "a").replace("-beta.", "b").replace("-rc.", "rc")
)

# The language for content autogenerated by Sphinx. Refer to documentation
# for a list of supported languages.
#
# This is also used if you do content translation via gettext catalogs.
# Usually you set "language" from the command line for these cases.
language = None

# List of patterns, relative to source directory, that match files and
# directories to ignore when looking for source files.
# This patterns also effect to html_static_path and html_extra_path
exclude_patterns = ["**.ipynb_checkpoints"]

# The name of the Pygments (syntax highlighting) style to use.
pygments_style = "sphinx"

# If true, `todo` and `todoList` produce output, else they produce nothing.
todo_include_todos = False


# -- Options for HTML output ----------------------------------------------


# Theme options are theme-specific and customize the look and feel of a theme
# further. For a list of options available for each theme, see the
# documentation.
#
# html_theme_options = {}
project = 'ipylab'
author = 'ipylab contributors'

# 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,
# so a file named "default.css" will overwrite the builtin "default.css".
html_static_path = ["_static"]


# -- Options for HTMLHelp output ------------------------------------------
exclude_patterns = []
highlight_language = 'python'
pygments_style = 'sphinx'

# Output file base name for HTML help builder.
htmlhelp_basename = "ipylabdoc"


# -- Options for LaTeX output ---------------------------------------------

latex_elements = {
# The paper size ('letterpaper' or 'a4paper').
#
# 'papersize': 'letterpaper',
# The font size ('10pt', '11pt' or '12pt').
#
# 'pointsize': '10pt',
# Additional stuff for the LaTeX preamble.
#
# 'preamble': '',
# Latex figure (float) alignment
#
# 'figure_align': 'htbp',
}

# Grouping the document tree into LaTeX files. List of tuples
# (source start file, target name, title,
# author, documentclass [howto, manual, or own class]).
latex_documents = [
(master_doc, "ipylab.tex", "ipylab Documentation", "ipylab contributors", "manual"),
]


# -- Options for manual page output ---------------------------------------

# One entry per manual page. List of tuples
# (source start file, name, description, authors, manual section).
man_pages = [(master_doc, "ipylab", "ipylab Documentation", [author], 1)]
html_theme = "pydata_sphinx_theme"
htmlhelp_basename = 'ipylabdoc'

html_theme_options = dict(
github_url='https://github.com/jtpio/ipylab'
)

# -- Options for Texinfo output -------------------------------------------

# Grouping the document tree into Texinfo files. List of tuples
# (source start file, target name, title, author,
# dir menu entry, description, category)
texinfo_documents = [
(
master_doc,
"ipylab",
"ipylab Documentation",
author,
"ipylab",
"Python bridge to JupyterLab",
"Miscellaneous",
),
]


# Example configuration for intersphinx: refer to the Python standard library.
intersphinx_mapping = {"https://docs.python.org/": None}

# Read The Docs
# on_rtd is whether we are on readthedocs.org, this line of code grabbed from
# docs.readthedocs.org
on_rtd = os.environ.get("READTHEDOCS", None) == "True"

if not on_rtd: # only import and set the theme if we're building docs locally
import sphinx_rtd_theme

html_theme = "sphinx_rtd_theme"
html_theme_path = [sphinx_rtd_theme.get_html_theme_path()]

# otherwise, readthedocs.org uses their theme by default, so no need to specify it

html_static_path = ['_static']

# Uncomment this line if you have know exceptions in your included notebooks
# that nbsphinx complains about:
#
nbsphinx_allow_errors = True # exception ipstruct.py ipython_genutils
autodoc_member_order = 'bysource'
18 changes: 0 additions & 18 deletions docs/source/examples/index.rst

This file was deleted.

3 changes: 0 additions & 3 deletions docs/source/examples/introduction.nblink

This file was deleted.

Loading