Skip to content

Commit

Permalink
Removal of 'Edit on Github' link for API pages of KQC documentation - F…
Browse files Browse the repository at this point in the history
…ixes #92 (#93)

* added breadcrumbs.html to manage 'github_url' meta

* added github_url meta to relevant files preventing undesired github link rendering
  • Loading branch information
f-martini authored May 31, 2024
1 parent 097fb6f commit 08d7d8a
Show file tree
Hide file tree
Showing 4 changed files with 16 additions and 0 deletions.
7 changes: 7 additions & 0 deletions docs/_templates/breadcrumbs.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{%- extends "sphinx_rtd_theme/breadcrumbs.html" %}

{% block breadcrumbs_aside %}
{% if not meta or meta.get('github_url') != 'hide' %}
{{ super() }}
{% endif %}
{% endblock %}
3 changes: 3 additions & 0 deletions docs/templates/apidoc/module.rst_t
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
:github_url: hide
{{"\n"}}

{%- if show_headings %}
{{- basename | e | heading }}

Expand Down
3 changes: 3 additions & 0 deletions docs/templates/apidoc/package.rst_t
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
:github_url: hide
{{"\n"}}

{%- macro automodule(modname, options) -%}
.. automodule:: {{ modname }}
{%- for option in options %}
Expand Down
3 changes: 3 additions & 0 deletions docs/templates/apidoc/toc.rst_t
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
:github_url: hide
{{"\n"}}

{{ header | heading }}

.. toctree::
Expand Down

0 comments on commit 08d7d8a

Please sign in to comment.