From 41a938e94d2dc2d41d9be9218656c511f6959751 Mon Sep 17 00:00:00 2001 From: Kodi Arfer Date: Wed, 17 Apr 2024 10:16:42 -0400 Subject: [PATCH 1/3] Rewrite Sphinx `conf.py` per Hy --- docs/conf.py | 39 +++++++++++++++++++++++++++------------ 1 file changed, 27 insertions(+), 12 deletions(-) diff --git a/docs/conf.py b/docs/conf.py index b71656f8..819be9bf 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -1,25 +1,40 @@ -import sys, os; sys.path.insert(0, os.path.abspath('..')) - # Read the Docs needs this bit to import Hyrule. - -import warnings; import sphinx.deprecation -warnings.filterwarnings('ignore', category = sphinx.deprecation.RemovedInSphinx60Warning) -warnings.filterwarnings('ignore', category = sphinx.deprecation.RemovedInSphinx70Warning) - -html_title = 'The Hyrule manual' +import time extensions = [ 'sphinx.ext.napoleon', - 'sphinx.ext.autodoc', 'sphinx.ext.intersphinx', + 'sphinx.ext.autodoc', 'sphinxcontrib.hydomain'] +import warnings; import sphinx.deprecation as SD +for c in (SD.RemovedInSphinx60Warning, SD.RemovedInSphinx70Warning): + warnings.filterwarnings('ignore', category = c) + +import hyrule + +project = 'Hy' +copyright = '%s the authors' % time.strftime('%Y') +html_title = f'Hyrule {hyrule.__version__} manual' + +hy_version = 'v0.28.0' + exclude_patterns = ['_build'] -smartquotes = False +html_theme = 'nature' +html_theme_options = dict( + nosidebar = True, + body_min_width = 0, + body_max_width = 'none') +html_css_files = [f'https://hylang.org/hy/doc/{hy_version}/_static/custom.css'] +html_copy_source = False +html_show_sphinx = False + nitpicky = True +add_module_names = False +smartquotes = False -highlight_language = "hylang" +highlight_language = 'hylang' intersphinx_mapping = dict( py = ('https://docs.python.org/3/', None), - hy = ('https://docs.hylang.org/en/master', None)) + hy = (f'https://hylang.org/hy/doc/{hy_version}/', None)) From 520632317932e26b65c4bdb4e21ae2d0bfc886a5 Mon Sep 17 00:00:00 2001 From: Kodi Arfer Date: Sun, 14 Apr 2024 16:53:40 -0400 Subject: [PATCH 2/3] Update the documentation link in the README --- README.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.rst b/README.rst index b7a4499e..e4b5ea09 100644 --- a/README.rst +++ b/README.rst @@ -2,6 +2,6 @@ Hyrule is a utility library for the `Hy `_ programming langua All of Hyrule's contents can be imported or required directly from the top-level module ``hyrule``. -`Hyrule's documentation can be read online on Read the Docs. `_ +`Hyrule's documentation can be read online on Hylang.org. `_ You can run Hyrule's test suite with the command ``pytest`` and build its documentation with ``( cd docs; sphinx-build . _build -b html )``. From ece0bcc13cab3f8a617f6da64dc3077a797bb513 Mon Sep 17 00:00:00 2001 From: Kodi Arfer Date: Mon, 15 Apr 2024 14:25:07 -0400 Subject: [PATCH 3/3] Expand a paragraph in the README --- README.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.rst b/README.rst index e4b5ea09..b8dc3be3 100644 --- a/README.rst +++ b/README.rst @@ -1,6 +1,6 @@ Hyrule is a utility library for the `Hy `_ programming language. It can be thought of as the Hy equivalent, or addition, to Python's standard library. While intended primarily for Hy programs, its functions and classes can be used in Python as with any other Python library; just ``import hyrule``. Hyrule's macros, on the other hand, are only really usable in Hy. -All of Hyrule's contents can be imported or required directly from the top-level module ``hyrule``. +All of Hyrule's contents can be imported or required directly from the top-level module ``hyrule``, as in ``(require hyrule [branch])``. The specific submodule an object belongs to may not be stable between releases. `Hyrule's documentation can be read online on Hylang.org. `_