Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions noxfile.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,22 +30,22 @@ def _should_install(session):
@nox.session
def compile(session):
if _should_install(session):
session.install(".")
session.install("-e", ".")
session.install("sphinx-theme-builder[cli]")
session.run("stb", "compile")


@nox.session
def docs(session):
if _should_install(session):
session.install(".[doc]")
session.install("-e", ".[doc]")
session.run("sphinx-build", "-b=html", "docs/", "docs/_build/html")


@nox.session(name="docs-live")
def docs_live(session):
if _should_install(session):
session.install(".[doc]")
session.install("-e", ".[doc]")
session.install("sphinx-theme-builder[cli]")
session.run("stb", "serve", "docs", "--open-browser")

Expand Down
8 changes: 8 additions & 0 deletions src/pydata_sphinx_theme/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,13 +20,17 @@

def update_config(app, env):
theme_options = app.config["html_theme_options"]

# DEPRECATE after v0.9
if theme_options.get("search_bar_position") == "navbar":
logger.warn(
(
"Deprecated config `search_bar_position` used."
"Use `search-field.html` in `navbar_end` template list instead."
)
)

# Validate icon links
if not isinstance(theme_options.get("icon_links", []), list):
raise ExtensionError(
(
Expand All @@ -35,6 +39,10 @@ def update_config(app, env):
)
)

# Update the anchor link (it's a tuple, so need to overwrite the whole thing)
icon_default = app.config.values["html_permalinks_icon"]
app.config.values["html_permalinks_icon"] = ("#", *icon_default[1:])


def update_templates(app, pagename, templatename, context, doctree):
"""Update template names for page build."""
Expand Down
6 changes: 4 additions & 2 deletions src/pydata_sphinx_theme/assets/styles/_base.scss
Original file line number Diff line number Diff line change
Expand Up @@ -35,13 +35,15 @@ a {

&.headerlink {
color: rgba(var(--pst-color-headerlink), 1);
opacity: 0.4;
font-size: 0.8em;
padding: 0 4px 0 4px;
margin-left: 0.2em;
text-decoration: none;
transition: all 0.3s ease-out;

&:hover {
background-color: rgba(var(--pst-color-headerlink), 1);
color: rgba(var(--pst-color-headerlink-hover), 1);
opacity: 1;
}
}
}
Expand Down