Skip to content

Commit

Permalink
upgrade doc site
Browse files Browse the repository at this point in the history
  • Loading branch information
MacHu-GWU committed Mar 27, 2022
1 parent aa73f95 commit 1d4961d
Show file tree
Hide file tree
Showing 7 changed files with 54 additions and 47 deletions.
44 changes: 24 additions & 20 deletions docs/source/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,7 @@
'sphinx.ext.viewcode',
'sphinxcontrib.jinja',
'sphinx_copybutton',
'sphinx_inline_tabs',
'docfly.directives',
]

Expand Down Expand Up @@ -87,7 +88,7 @@
exclude_patterns = []

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

# If true, `todo` and `todoList` produce output, else they produce nothing.
todo_include_todos = True
Expand All @@ -97,35 +98,43 @@
# The theme to use for HTML and HTML Help pages. See the documentation for
# a list of builtin themes.
#
html_theme = 'alabaster'
html_theme = "furo"

# 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 = {}
html_theme_options = {
"sidebar_hide_name": False,
}
pygments_dark_style = "monokai"

# 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']
html_logo = "./_static/pathlib_mate-logo.png"
html_favicon = "./_static/pathlib_mate-favicon.ico"
html_css_files = [
'css/custom-style.css',
]
html_js_files = [
'js/sorttable.js',
]
html_logo = "./_static/{}-logo.png".format(pathlib_mate.__name__)
html_favicon = "./_static/{}-favicon.ico".format(pathlib_mate.__name__)

# Custom sidebar templates, must be a dictionary that maps document names
# to template names.
#
# This is required for the alabaster theme
# refs: http://alabaster.readthedocs.io/en/latest/installation.html#sidebars
html_sidebars = {
'**': [
'about.html',
'navigation.html',
'relations.html', # needs 'show_related': True theme option to display
'searchbox.html',
'donate.html',
]
}
# html_sidebars = {
# '**': [
# 'about.html',
# 'navigation.html',
# 'relations.html', # needs 'show_related': True theme option to display
# 'searchbox.html',
# 'donate.html',
# ]
# }

# -- Options for HTMLHelp output ------------------------------------------

Expand Down Expand Up @@ -207,8 +216,3 @@
"%s.tests" % package_name,
]
).fly()


def setup(app):
app.add_stylesheet('css/custom-style.css')
app.add_javascript('js/sorttable.js')
4 changes: 4 additions & 0 deletions docs/source/index.rst
Original file line number Diff line number Diff line change
@@ -1,4 +1,8 @@
.. contents::
:class: this-will-duplicate-information-and-it-is-still-useful-here
:depth: 1
:local:


Release v\ |release| (:ref:`What's new? <release_history>`).

Expand Down
16 changes: 8 additions & 8 deletions docs/source/pathlib_mate/__init__.rst
Original file line number Diff line number Diff line change
Expand Up @@ -10,15 +10,15 @@ sub packages and modules
.. toctree::
:maxdepth: 1

mate_path_filters <mate_path_filters>
mate_tool_box_zip <mate_tool_box_zip>
mate_mutate_methods <mate_mutate_methods>
_version <_version>
hashes <hashes>
helper <helper>
mate_attr_accessor <mate_attr_accessor>
mate_tool_box <mate_tool_box>
mate_hashes_methods <mate_hashes_methods>
str_encode <str_encode>
winzip <winzip>
mate_mutate_methods <mate_mutate_methods>
mate_path_filters <mate_path_filters>
mate_tool_box <mate_tool_box>
mate_tool_box_zip <mate_tool_box_zip>
pathlib2 <pathlib2>
helper <helper>
hashes <hashes>
str_encode <str_encode>

5 changes: 5 additions & 0 deletions docs/source/pathlib_mate/_version.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
_version
========

.. automodule:: pathlib_mate._version
:members:
5 changes: 0 additions & 5 deletions docs/source/pathlib_mate/winzip.rst

This file was deleted.

4 changes: 2 additions & 2 deletions pathlib_mate/helper.py
Original file line number Diff line number Diff line change
Expand Up @@ -43,8 +43,8 @@ def ensure_list(path_or_path_list):


def repr_data_size(
size_in_bytes: int,
precision: int = 2,
size_in_bytes,
precision=2,
):
"""
Return human readable string represent of a file size. Doesn't support
Expand Down
23 changes: 11 additions & 12 deletions requirements-doc.txt
Original file line number Diff line number Diff line change
@@ -1,16 +1,15 @@
sphinx==1.8.1

# Theme

sphinx_rtd_theme
# This requirements file should only include dependencies for documentations
# sphinx doc builder
sphinx==4.3.0

# Extensions
sphinx-inline-tabs==2021.8.17b10 # allow inline tab
sphinx-jinja==1.1.1 # allow jinja2 template
sphinx-copybutton==0.4.0 # add copy to clipboard button for code block
rstobj==0.0.7 # generate list table from data

sphinx-jinja # allow jinja2 template
sphinx-copybutton # add copy to clipboard button for code block
docfly>=0.0.17 # auto API manual, auto Table of Content
rstobj>=0.0.5 # generate list table from data
# docfly # auto API manual, auto Table of Content
docfly==1.0.2 # sphinx-doc automation

# Other

pygments # live RestructuredText preview
# Theme
furo==2021.8.31 # modern doc theme

0 comments on commit 1d4961d

Please sign in to comment.