Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: rename the extension name with no conflict #275

Merged
merged 2 commits into from
Aug 17, 2023
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
4 changes: 2 additions & 2 deletions src/ansys_sphinx_theme/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -137,7 +137,7 @@ def fix_edit_html_page_context(
see https://github.com/pyvista/pyvista/pull/4113
"""

def fix_edit_link_button(link: str) -> str:
def fix_edit_link_page(link: str) -> str:
"""Transform "edit on GitHub" links to the correct URL.

This function fixes the URL for the "edit this page" link.
Expand Down Expand Up @@ -203,7 +203,7 @@ def fix_edit_link_button(link: str) -> str:
else:
return link

context["fix_edit_link_button"] = fix_edit_link_button
context["fix_edit_link_page"] = fix_edit_link_page


def update_footer_theme(
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{% if sourcename is defined and theme_use_edit_page_button==true and
page_source_suffix %} {% set src = sourcename.split('.') %}
<div class="tocsection editthispage">
<a href="{{ fix_edit_link_button(get_edit_provider_and_url()[1]) }}">
<a href="{{ fix_edit_link_page(get_edit_provider_and_url()[1]) }}">
<i class="fa-solid fa-pencil"></i>
{% set provider = get_edit_provider_and_url()[0] %} {% block
edit_this_page_text %} {% if provider %} {% trans provider=provider %}Edit
Expand Down
Loading