{
"info": {
"author": "Linxi (Jim) Fan",
"author_email": "jimfan@cs.stanford.edu",
"bugtrack_url": null,
"classifiers": [
"Development Status :: 5 - Production/Stable",
"Environment :: Console",
"Environment :: Web Environment",
"Operating System :: OS Independent",
"Programming Language :: Python :: 2.7",
"Programming Language :: Python :: 3",
"Topic :: Documentation",
"Topic :: Software Development :: Documentation"
],
"description": "Stanford theme for Sphinx\n=========================\n\nAdditions\n---------\n\nDesign\n~~~~~~\n\nOnline demo of the theme:\n`linxifan.github.io/Sphinx-demo/ `__\n\nStanford web color specification:\n`[1] `__ and\n`[2] `__\n\nAdd new fonts\n~~~~~~~~~~~~~\n\n1. Edit ``bower.json``, add ``ubuntumono-googlefont`` to dependency\n list.\n2. Edit ``Gruntfile.js``, add font paths like the others.\n3. Edit ``sass/_theme_font_local.sass``, note that ``font-weight: 400``\n corresponds to normal font while ``700`` correspoonds to bold.\n4. Make sure the font files are copied to\n ``stanford_theme/static/fonts/``\n\nSASS\n~~~~\n\n- ``bower_components/wyrm`` contains the SASS for the original WYRM\n core. You can override variables in it to use customized color.\n- ``sass/_theme_variables.sass`` defines most of the colors.\n- ``sass/_theme_rst.sass`` defines how to render any reStructuredText\n file. All customizations are marked with ``mydef`` in the code\n comment.\n- ``sass/_theme_layout.css`` defines how to render menu, navigation\n bars, etc.\n\nInstallation\n------------\n\nVia package\n~~~~~~~~~~~\n\nDownload the package or add it to your ``requirements.txt`` file:\n\n.. code:: bash\n\n $ pip install stanford_theme\n\nIn your ``conf.py`` file:\n\n.. code:: python\n\n import stanford_theme\n html_theme = \"stanford_theme\"\n html_theme_path = [stanford_theme.get_html_theme_path()]\n\nVia git or download\n~~~~~~~~~~~~~~~~~~~\n\nSymlink or subtree the ``stanford_theme/stanford_theme`` repository into\nyour documentation at ``docs/_themes/stanford_theme`` then add the\nfollowing two settings to your Sphinx conf.py file:\n\n.. code:: python\n\n html_theme = \"stanford_theme\"\n html_theme_path = [\"_themes\", ]\n\nConfiguration\n-------------\n\nYou can configure different parts of the theme.\n\nProject-wide configuration\n~~~~~~~~~~~~~~~~~~~~~~~~~~\n\nThe theme's project-wide options are defined in the\n``stanford_theme/theme.conf`` file of this repository, and can be\ndefined in your project's ``conf.py`` via ``html_theme_options``. For\nexample:\n\n.. code:: python\n\n html_theme_options = {\n 'collapse_navigation': False,\n 'display_version': False,\n 'navigation_depth': 3,\n }\n\nPage-level configuration\n~~~~~~~~~~~~~~~~~~~~~~~~\n\nPages support metadata that changes how the theme renders. You can\ncurrently add the following:\n\n- ``:github_url:`` This will force the \"Edit on GitHub\" to the\n configured URL\n- ``:bitbucket_url:`` This will force the \"Edit on Bitbucket\" to the\n configured URL\n- ``:gitlab_url:`` This will force the \"Edit on GitLab\" to the\n configured URL\n\nHow the Table of Contents builds\n~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\n\nCurrently the left menu will build based upon any ``toctree(s)`` defined\nin your index.rst file. It outputs 2 levels of depth, which should give\nyour visitors a high level of access to your docs. If no toctrees are\nset the theme reverts to sphinx's usual local toctree.\n\nIt's important to note that if you don't follow the same styling for\nyour rST headers across your documents, the toctree will misbuild, and\nthe resulting menu might not show the correct depth when it renders.\n\nAlso note that the table of contents is set with ``includehidden=true``.\nThis allows you to set a hidden toc in your index file with the\n`hidden `__ property that\nwill allow you to build a toc without it rendering in your index.\n\nBy default, the navigation will \"stick\" to the screen as you scroll.\nHowever if your toc is vertically too large, it will revert to static\npositioning. To disable the sticky nav altogether change the setting in\n``conf.py``.\n\nMake the theme compatible with ReadTheDocs\n~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\n\nCurrently if you import stanford\\_theme in your local sphinx build, then\npass that same config to Read the Docs, it will fail, since RTD gets\nconfused. If you want to run this theme locally and then also have it\nbuild on RTD, then you can add something like this to your config.\nThanks to Daniel Oaks for this.\n\n.. code:: python\n\n # on_rtd is whether we are on readthedocs.org, this line of code grabbed from docs.readthedocs.org\n on_rtd = os.environ.get('READTHEDOCS', None) == 'True'\n\n if not on_rtd: # only import and set the theme if we're building docs locally\n import stanford_theme\n html_theme = 'stanford_theme'\n html_theme_path = [stanford_theme.get_html_theme_path()]\n\n # otherwise, readthedocs.org uses their theme by default, so no need to specify it\n\nEditing the theme\n-----------------\n\nThe theme is primarily a `sass `__ project\nthat requires a few other sass libraries. I'm using\n`bower `__ to manage these dependencies and\n`sass `__ to build the css. The good news is I\nhave a very nice set of `grunt `__ operations\nthat will not only load these dependencies, but watch for changes,\nrebuild the sphinx demo docs and build a distributable version of the\ntheme. The bad news is this means you'll need to set up your environment\nsimilar to that of a front-end developer (vs. that of a python\ndeveloper). That means installing node and ruby.\n\nSet up your environment\n~~~~~~~~~~~~~~~~~~~~~~~\n\n1. Install `sphinx `__ into a virtual\n environment.\n\n::\n\n pip install sphinx\n\n2. Install sass\n\n::\n\n gem install sass\n\n2. Install node, bower and grunt.\n\n::\n\n // Install node\n brew install node\n\n // Install bower and grunt\n npm install -g bower grunt-cli\n\n // Now that everything is installed, let's install the theme dependecies.\n npm install\n\nNow that our environment is set up, make sure you're in your virtual\nenvironment, go to this repository in your terminal and run grunt:\n\n::\n\n grunt\n\nThis default task will do the following **very cool things that make it\nworth the trouble**.\n\n1. It'll install and update any bower dependencies.\n2. It'll run sphinx and build new docs.\n3. It'll watch for changes to the sass files and build css from the\n changes.\n4. It'll rebuild the sphinx docs anytime it notices a change to .rst,\n .html, .js or .css files.\n\n\n",
"description_content_type": null,
"docs_url": null,
"download_url": "",
"downloads": {
"last_day": -1,
"last_month": -1,
"last_week": -1
},
"home_page": "https://github.com/LinxiFan/Stanford-theme/",
"keywords": "",
"license": "MIT",
"maintainer": "",
"maintainer_email": "",
"name": "stanford-theme",
"package_url": "https://pypi.org/project/stanford-theme/",
"platform": "",
"project_url": "https://pypi.org/project/stanford-theme/",
"project_urls": {
"Homepage": "https://github.com/LinxiFan/Stanford-theme/"
},
"release_url": "https://pypi.org/project/stanford-theme/1.0/",
"requires_dist": null,
"requires_python": "",
"summary": "Stanford theme for Sphinx documentation generator and ReadTheDoc.org",
"version": "1.0"
},
"last_serial": 2553716,
"releases": {
"1.0": [
{
"comment_text": "",
"digests": {
"md5": "3a9ba8be71e84f1275007e386b86be27",
"sha256": "632e3ba301f108f44fc29abd849575f887f363ed0b112d1673f842a392bd0595"
},
"downloads": -1,
"filename": "stanford_theme-1.0-py2.py3-none-any.whl",
"has_sig": false,
"md5_digest": "3a9ba8be71e84f1275007e386b86be27",
"packagetype": "bdist_wheel",
"python_version": "py2.py3",
"requires_python": null,
"size": 1855025,
"upload_time": "2017-01-04T14:36:31",
"url": "https://files.pythonhosted.org/packages/91/c1/e8d116ff3d9dfa03fdd907324e24016e2a47981a322a974a051a0d16b929/stanford_theme-1.0-py2.py3-none-any.whl"
},
{
"comment_text": "",
"digests": {
"md5": "a99e73a3a1a8dd98dd3737e9ff11dceb",
"sha256": "07f86a3e035f2dfd575894a885551ed18a39e120bf30d2bea7a38ce8f6e99694"
},
"downloads": -1,
"filename": "stanford_theme-1.0.tar.gz",
"has_sig": false,
"md5_digest": "a99e73a3a1a8dd98dd3737e9ff11dceb",
"packagetype": "sdist",
"python_version": "source",
"requires_python": null,
"size": 1848812,
"upload_time": "2017-01-04T14:36:45",
"url": "https://files.pythonhosted.org/packages/19/10/f9c739b9945968c9725712a6c9737d9d08ba40b06a99234accec7dcd85bb/stanford_theme-1.0.tar.gz"
}
]
},
"urls": [
{
"comment_text": "",
"digests": {
"md5": "3a9ba8be71e84f1275007e386b86be27",
"sha256": "632e3ba301f108f44fc29abd849575f887f363ed0b112d1673f842a392bd0595"
},
"downloads": -1,
"filename": "stanford_theme-1.0-py2.py3-none-any.whl",
"has_sig": false,
"md5_digest": "3a9ba8be71e84f1275007e386b86be27",
"packagetype": "bdist_wheel",
"python_version": "py2.py3",
"requires_python": null,
"size": 1855025,
"upload_time": "2017-01-04T14:36:31",
"url": "https://files.pythonhosted.org/packages/91/c1/e8d116ff3d9dfa03fdd907324e24016e2a47981a322a974a051a0d16b929/stanford_theme-1.0-py2.py3-none-any.whl"
},
{
"comment_text": "",
"digests": {
"md5": "a99e73a3a1a8dd98dd3737e9ff11dceb",
"sha256": "07f86a3e035f2dfd575894a885551ed18a39e120bf30d2bea7a38ce8f6e99694"
},
"downloads": -1,
"filename": "stanford_theme-1.0.tar.gz",
"has_sig": false,
"md5_digest": "a99e73a3a1a8dd98dd3737e9ff11dceb",
"packagetype": "sdist",
"python_version": "source",
"requires_python": null,
"size": 1848812,
"upload_time": "2017-01-04T14:36:45",
"url": "https://files.pythonhosted.org/packages/19/10/f9c739b9945968c9725712a6c9737d9d08ba40b06a99234accec7dcd85bb/stanford_theme-1.0.tar.gz"
}
]
}