Skip to content

Commit

Permalink
Merge pull request #91 from Kodiologist/docs
Browse files Browse the repository at this point in the history
Overhaul rendering of the manual
  • Loading branch information
Kodiologist authored Apr 18, 2024
2 parents b246e24 + ece0bcc commit 72f876a
Show file tree
Hide file tree
Showing 2 changed files with 29 additions and 14 deletions.
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))

0 comments on commit 72f876a

Please sign in to comment.