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

Overhaul rendering of the manual #91

Merged
merged 3 commits into from
Apr 18, 2024
Merged
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
4 changes: 2 additions & 2 deletions README.rst
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
Hyrule is a utility library for the `Hy <http://hylang.org>`_ 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 Read the Docs. <https://hyrule.readthedocs.io>`_
`Hyrule's documentation can be read online on Hylang.org. <http://hylang.org/hyrule/doc>`_

You can run Hyrule's test suite with the command ``pytest`` and build its documentation with ``( cd docs; sphinx-build . _build -b html )``.
39 changes: 27 additions & 12 deletions docs/conf.py
Original file line number Diff line number Diff line change
@@ -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))