-
Notifications
You must be signed in to change notification settings - Fork 11
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #91 from Kodiologist/docs
Overhaul rendering of the manual
- Loading branch information
Showing
2 changed files
with
29 additions
and
14 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 )``. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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)) |