Commit e3956e84 authored by Spencer Williams's avatar Spencer Williams
Browse files

reorganize as python projects

parent 47365304
\usepackage{lastpage} % for "page n of m" feature
\usepackage{pdfpages} % for inline inclusion of pdfs
\usepackage{pdflscape} % for making pages landscape (so included pdfs can still get figure names and header/footer)
\RequirePackage{fancyhdr} % because howtos don't require it
% remove blank pages that are a result of a twopage document class
\let\cleardoublepage\clearpage
% howtos are not fancy by default
\pagestyle{normal}
% for box drawing
\usepackage{pmboxdraw}
Copyright 2018 Rigado
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
***********************************
Rigado Sphinx Themes and Extensions
***********************************
Usage
=====
``pip install sphinx-rigado-theme``
Developing & Publishing
=======================
Setup user account on PyPI: https://packaging.python.org/tutorials/packaging-projects/
To publish:
1. make sure version is ok in ``sphinx_rigado_theme/__init__.py``
2. ``python3 setup.py sdist bdist_wheel``
3. ``twine upload dist/sphinx_rigado_theme-0.0.3*``
#!/usr/bin/env python
from io import open
from setuptools import setup
from sphinx_rigado_theme import __version__
setup(
name='sphinx_rigado_theme',
version=__version__,
author='Spencer Williams',
author_email='spencer.williams@rigado.com',
description='A Sphinx theme for Rigado',
long_description=open('README.rst', encoding='utf-8').read(),
url='https://git.rigado.com/documentation/sphinx-rigado-theme',
license='MIT',
packages=['sphinx_rigado_theme'],
package_data={'sphinx_rigado_theme': [
'theme.conf',
'*.html',
'static/css/*.css',
'static/images/*.ico',
'static/images/*.png'
]},
include_package_data=True,
# See http://www.sphinx-doc.org/en/stable/theming.html#distribute-your-theme-as-a-python-package
entry_points = {
'sphinx.html_themes': [
'sphinx_rigado_theme = sphinx_rigado_theme',
]
},
classifiers=[
'Framework :: Sphinx',
'Framework :: Sphinx :: Theme',
'Development Status :: 5 - Production/Stable',
'License :: OSI Approved :: MIT License',
'Environment :: Console',
'Environment :: Web Environment',
'Intended Audience :: Developers',
'Programming Language :: Python :: 2.7',
'Programming Language :: Python :: 3',
'Programming Language :: Python :: 3.3',
'Programming Language :: Python :: 3.4',
'Programming Language :: Python :: 3.5',
'Programming Language :: Python :: 3.6',
'Operating System :: OS Independent',
'Topic :: Documentation',
'Topic :: Software Development :: Documentation',
],
)
from os import path
__version__ = '0.0.3'
def get_html_theme_path():
"""Return list of HTML theme paths."""
cur_dir = path.abspath(path.dirname(path.dirname(__file__)))
return cur_dir
# See http://www.sphinx-doc.org/en/stable/theming.html#distribute-your-theme-as-a-python-package
def setup(app):
app.add_html_theme('sphinx_rigado_theme', path.abspath(path.dirname(__file__)))
{#
rigado/globaltoc.html
~~~~~~~~~~~~~~~~~~~~
sphinx-rigado-theme/globaltoc.html
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Sphinx sidebar template: global table of contents.
#}
......
{#
rigado/layout.html
~~~~~~~~~~~~~~~~~~~
sphinx-rigado-theme/layout.html
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Sphinx layout template for the Rigado theme.
......
{#
rigado/localtoc.html
~~~~~~~~~~~~~~~~~~~~
sphinx-rigado-theme/localtoc.html
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Sphinx sidebar template: local table of contents.
......
{#
rigado/page.html
~~~~~~~~~~~~~~~
sphinx-rigado-theme/page.html
~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Master template for simple pages.
#}
......
{#
rigado/searchbar.html
~~~~~~~~~~~~~~~~~~~~~~
sphinx-rigado-theme/searchbar.html
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Sphinx sidebar template: search bar.
#}
......
{#
rigado/sourcelink.html
~~~~~~~~~~~~~~~~~~~~~~
sphinx-rigado-theme/sourcelink.html
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Sphinx sidebar template: "show source" link.
#}
......
/*
* rigado.css_t
* ~~~~~~~~~~~~
*
* Sphinx stylesheet -- rigado theme.
*
*/
div.body a, div.body a:hover, div.body a:visited {
text-decoration: underline;
}
......@@ -200,7 +192,7 @@ div.sphinxsidebar input[type='text'] {
padding: 0.25em 0.5em;
}
div.sphinxsidebar code {
font-family: {{ theme_bodyfont }};
font-family: "Source Sans Pro", Helvetica, Arial, sans-serif;
font-weight: normal;
font-size: 1em;
padding: 0;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment