Skip to content

Commit

Permalink
feat: update the copyright
Browse files Browse the repository at this point in the history
  • Loading branch information
Revathyvenugopal162 committed Aug 20, 2024
1 parent 83e7587 commit c194e3f
Show file tree
Hide file tree
Showing 3 changed files with 21 additions and 1 deletion.
10 changes: 9 additions & 1 deletion src/pyos_sphinx_theme/__init__.py
Original file line number Diff line number Diff line change
@@ -1,17 +1,22 @@
"""A lightweight theme for pyOpenSci."""

from datetime import datetime
from pathlib import Path

from pydata_sphinx_theme.utils import config_provided_by_user

# from sphinx_book_theme import hash_assets_for_files
from sphinx.util import logging

__version__ = "0.0.1dev0"
__version__ = "0.1.dev0"
current_year = datetime.now().year
organization_name = "pyOpenSci"

LOGGER = logging.getLogger(__name__)

THIS_PATH = Path(__file__).parent.resolve()
THEME_PATH = THIS_PATH / "theme" / "pyos_sphinx_theme"
TEMPLATE_PATH = THEME_PATH / "templates"
LOGO_LIGHT = str((THEME_PATH / "static" / "images" / "logo-light-mode.png").absolute()).replace(
"\\", "/"
)
Expand Down Expand Up @@ -73,6 +78,8 @@ def update_config(app):
"image": "_static/pyopensci-logo-package-guide.png",
}

app.config.copyright = f"{current_year}, {organization_name}"

# If no html_logo is set then use a stock 2i2c logo
if not config_provided_by_user(app, "html_logo") and not social_cards.get("image"):
line_color = "#6D597A"
Expand Down Expand Up @@ -112,6 +119,7 @@ def setup(app):
app.add_html_theme("pyos_sphinx_theme", THEME_PATH)
app.config.html_favicon = "https://www.pyopensci.org/images/favicon.ico"
app.connect("builder-inited", update_config)
app.config.templates_path.append(str(TEMPLATE_PATH))
# app.connect("html-page-context", redirect_from_html_to_dirhtml)
# app.add_css_file("static/styles/pyos-sphinx-theme.css")
# app.add_js_file("static/scripts/matomo.js")
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
<p>
pyOpensci is dedicated to creating a welcoming, supportive and diverse
community around the open source Python tools that drive open science. Our
<a
href="https://www.pyopensci.org/handbook/CODE_OF_CONDUCT.html"
target="_blank"
>Code of Conduct</a
>
defines expected behavior and guidelines that help create such a community.
</p>
2 changes: 2 additions & 0 deletions src/pyos_sphinx_theme/theme/pyos_sphinx_theme/theme.conf
Original file line number Diff line number Diff line change
Expand Up @@ -6,3 +6,5 @@ stylesheet = styles/pyos-sphinx-theme.css

# Myst syntax extensions
myst_enable_extensions = ["colon_fence",]
footer_start = code_of_conduct, copyright
footer_end =

0 comments on commit c194e3f

Please sign in to comment.