Skip to content

Commit

Permalink
Merge pull request #406 from openedx/feanil/update_to_book_theme
Browse files Browse the repository at this point in the history
Update to book theme
  • Loading branch information
Feanil Patel authored Nov 8, 2022
2 parents d899beb + 6a242f0 commit ff2efbd
Show file tree
Hide file tree
Showing 6 changed files with 102 additions and 45 deletions.
Binary file added oeps/_static/favicon.ico
Binary file not shown.
Binary file added oeps/_static/open-edx-logo-color.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
82 changes: 56 additions & 26 deletions oeps/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
import sys
import os

import edx_theme
from datetime import datetime

# If extensions (or modules to document with autodoc) are in another directory,
# add these directories to sys.path here. If the directory is relative to the
Expand All @@ -31,7 +31,6 @@
# extensions coming with Sphinx (named 'sphinx.ext.*') or your custom
# ones.
extensions = [
'edx_theme',
'sphinx.ext.intersphinx',
'sphinx.ext.todo',
'sphinx.ext.mathjax',
Expand All @@ -57,8 +56,8 @@

# General information about the project.
project = u'Open edX Proposals'
author = edx_theme.AUTHOR
copyright = edx_theme.COPYRIGHT
current_year = datetime.utcnow().year
copyright = f"{current_year}, The Center for Reimagining Learning"

html_context = {
"display_github": True, # Integrate GitHub
Expand Down Expand Up @@ -127,36 +126,67 @@

# The theme to use for HTML and HTML Help pages. See the documentation for
# a list of builtin themes.
html_theme = 'edx_theme'

# Theme options are theme-specific and customize the look and feel of a theme
# further. For a list of options available for each theme, see the
# documentation.
#html_theme_options = {}

# Add any paths that contain custom themes here, relative to this directory.
html_theme_path = [edx_theme.get_html_theme_path()]

# The name for this set of Sphinx documents.
# "<project> v<release> documentation" by default.
#html_title = u'Open edX Proposals v1.0'
html_theme = 'sphinx_book_theme'

html_theme_options = {
"repository_url": "https://github.com/openedx/open-edx-proposals",
"repository_branch": "master",
"path_to_docs": "source",
"logo_only": False,
"home_page_in_toc": True,
"use_repository_button": True,
"use_issues_button": True,
"use_edit_page_button": True,
"extra_footer": """
<a rel="license" href="https://creativecommons.org/licenses/by-sa/4.0/">
<img
alt="Creative Commons License"
style="border-width:0"
src="https://i.creativecommons.org/l/by-sa/4.0/80x15.png">
</a>
<br>
These works by
<a
xmlns:cc="https://creativecommons.org/ns#"
href="https://openedx.org"
property="cc:attributionName"
rel="cc:attributionURL"
>The Center for Reimagining Learning</a>
are licensed under a
<a
rel="license"
href="https://creativecommons.org/licenses/by-sa/4.0/"
>Creative Commons Attribution-ShareAlike 4.0 International License</a>.
"""
}

# A shorter title for the navigation bar. Default is the same as html_title.
#html_short_title = None

# The name of an image file (relative to this directory) to place at the top
# of the sidebar.
#html_logo = None
html_logo = "_static/open-edx-logo-color.png"

# The name of an image file (relative to this directory) to use as a favicon of
# the docs. This file should be a Windows icon file (.ico) being 16x16 or 32x32
# pixels large.
#html_favicon = None
html_favicon = "_static/favicon.ico"
theme_logo_only = True

# Add any paths that contain custom static files (such as style sheets) here,
# relative to this directory. They are copied after the builtin static files,
# so a file named "default.css" will overwrite the builtin "default.css".
# html_static_path = ['_static']
html_static_path = ["_static"]

# Theme options are theme-specific and customize the look and feel of a theme
# further. For a list of options available for each theme, see the
# documentation.
#html_theme_options = {}

# The name for this set of Sphinx documents.
# "<project> v<release> documentation" by default.
#html_title = u'Open edX Proposals v1.0'

# A shorter title for the navigation bar. Default is the same as html_title.
#html_short_title = None

# Add any extra paths that contain custom files (such as robots.txt or
# .htaccess) here, relative to this directory. These files are copied
Expand All @@ -166,7 +196,7 @@
# If not None, a 'Last updated on:' timestamp is inserted at every page
# bottom, using the given strftime format.
# The empty string is equivalent to '%b %d, %Y'.
#html_last_updated_fmt = None
html_last_updated_fmt = ""

# If true, SmartyPants will be used to convert quotes and dashes to
# typographically correct entities.
Expand Down Expand Up @@ -244,7 +274,7 @@
# author, documentclass [howto, manual, or own class]).
latex_documents = [
(master_doc, 'OpenedXProposals.tex', u'Open edX Proposals Documentation',
author, 'manual'),
None, 'manual'),
]

# The name of an image file (relative to this directory) to place at the top of
Expand Down Expand Up @@ -274,7 +304,7 @@
# (source start file, name, description, authors, manual section).
man_pages = [
(master_doc, 'openedxproposals', u'Open edX Proposals Documentation',
[author], 1)
[], 1)
]

# If true, show URL addresses after external links.
Expand All @@ -288,7 +318,7 @@
# dir menu entry, description, category)
texinfo_documents = [
(master_doc, 'OpenedXProposals', u'Open edX Proposals Documentation',
author, 'OpenedXProposals', 'One line description of project.',
None, 'OpenedXProposals', 'One line description of project.',
'Miscellaneous'),
]

Expand Down
2 changes: 1 addition & 1 deletion requirements/base.in
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# Core requirements for using this application
-c constraints.txt

edx-sphinx-theme
sphinx
sphinx-book-theme
sphinx-copybutton

29 changes: 20 additions & 9 deletions requirements/base.txt
Original file line number Diff line number Diff line change
Expand Up @@ -8,14 +8,16 @@ alabaster==0.7.12
# via sphinx
babel==2.11.0
# via sphinx
beautifulsoup4==4.11.1
# via pydata-sphinx-theme
certifi==2022.9.24
# via requests
charset-normalizer==2.1.1
# via requests
docutils==0.19
# via sphinx
edx-sphinx-theme==3.0.0
# via -r requirements/base.in
docutils==0.17.1
# via
# pydata-sphinx-theme
# sphinx
idna==3.4
# via requests
imagesize==1.4.1
Expand All @@ -27,24 +29,33 @@ jinja2==3.1.2
markupsafe==2.1.1
# via jinja2
packaging==21.3
# via sphinx
# via
# pydata-sphinx-theme
# sphinx
pydata-sphinx-theme==0.8.1
# via sphinx-book-theme
pygments==2.13.0
# via sphinx
pyparsing==3.0.9
# via packaging
pytz==2022.6
# via babel
pyyaml==6.0
# via sphinx-book-theme
requests==2.28.1
# via sphinx
six==1.16.0
# via edx-sphinx-theme
snowballstemmer==2.2.0
# via sphinx
sphinx==5.3.0
soupsieve==2.3.2.post1
# via beautifulsoup4
sphinx==4.5.0
# via
# -r requirements/base.in
# edx-sphinx-theme
# pydata-sphinx-theme
# sphinx-book-theme
# sphinx-copybutton
sphinx-book-theme==0.3.3
# via -r requirements/base.in
sphinx-copybutton==0.5.0
# via -r requirements/base.in
sphinxcontrib-applehelp==1.0.2
Expand Down
34 changes: 25 additions & 9 deletions requirements/dev.txt
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,10 @@ babel==2.11.0
# via
# -r requirements/base.txt
# sphinx
beautifulsoup4==4.11.1
# via
# -r requirements/base.txt
# pydata-sphinx-theme
certifi==2022.9.24
# via
# -r requirements/base.txt
Expand All @@ -22,12 +26,11 @@ charset-normalizer==2.1.1
# requests
colorama==0.4.6
# via sphinx-autobuild
docutils==0.19
docutils==0.17.1
# via
# -r requirements/base.txt
# pydata-sphinx-theme
# sphinx
edx-sphinx-theme==3.0.0
# via -r requirements/base.txt
idna==3.4
# via
# -r requirements/base.txt
Expand All @@ -53,7 +56,12 @@ markupsafe==2.1.1
packaging==21.3
# via
# -r requirements/base.txt
# pydata-sphinx-theme
# sphinx
pydata-sphinx-theme==0.8.1
# via
# -r requirements/base.txt
# sphinx-book-theme
pygments==2.13.0
# via
# -r requirements/base.txt
Expand All @@ -66,27 +74,35 @@ pytz==2022.6
# via
# -r requirements/base.txt
# babel
pyyaml==6.0
# via
# -r requirements/base.txt
# sphinx-book-theme
requests==2.28.1
# via
# -r requirements/base.txt
# sphinx
six==1.16.0
# via
# -r requirements/base.txt
# edx-sphinx-theme
# livereload
# via livereload
snowballstemmer==2.2.0
# via
# -r requirements/base.txt
# sphinx
sphinx==5.3.0
soupsieve==2.3.2.post1
# via
# -r requirements/base.txt
# edx-sphinx-theme
# beautifulsoup4
sphinx==4.5.0
# via
# -r requirements/base.txt
# pydata-sphinx-theme
# sphinx-autobuild
# sphinx-book-theme
# sphinx-copybutton
sphinx-autobuild==2021.3.14
# via -r requirements/dev.in
sphinx-book-theme==0.3.3
# via -r requirements/base.txt
sphinx-copybutton==0.5.0
# via -r requirements/base.txt
sphinxcontrib-applehelp==1.0.2
Expand Down

0 comments on commit ff2efbd

Please sign in to comment.