Skip to content

Commit b357804

Browse files
committed
link to html page without query string
1 parent 3423a8b commit b357804

File tree

2 files changed

+6
-13
lines changed

2 files changed

+6
-13
lines changed

tutorials/themes/tutorials-theme/layout.html

Lines changed: 5 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -48,13 +48,6 @@
4848
<meta http-equiv='X-UA-Compatible' content='IE=edge,chrome=1'>
4949
<meta name='viewport' content='width=device-width, initial-scale=1.0, maximum-scale=1'>
5050
<meta name="apple-mobile-web-app-capable" content="yes">
51-
{# this script is to redirect /tutorials.html to /tutorials.html?q=filterTutorials #}
52-
<script type="text/javascript">
53-
if( (window.location.href.search("tutorials.html") != -1) && (window.location.href.search("q=filterTutorials") == -1) ){
54-
var url = window.location.href.split("tutorials.html")[0] + "tutorials.html?q=filterTutorials";
55-
window.location.href = url;
56-
}
57-
</script>
5851
<script type="text/javascript">
5952
jQuery(function() { Search.loadIndex("{{ pathto('searchindex.js', 1) }}"); });
6053
</script>
@@ -82,24 +75,24 @@
8275
{% else %}
8376
{%- set content_card = "content-padding card" %}
8477
{% endif %}
85-
78+
8679
{% if pagename != "search" and pagename != "index" and pagename != "tutorials" and pagename != "documentation" and pagename != "examples" and pagename != "guides" %}
8780
<div class="{{ bs_span_prefix }}3">
8881
<div id="sidebar" class="bs-sidenav card" role="complementary">
8982
<h3>Table of contents</h3>
9083
{{toc}}
91-
</div>
84+
</div>
9285
</div>
9386
{%- set bs_content_width = "9" %}
9487
{% endif %}
9588

9689
<div class="{{ bs_span_prefix }}{{ bs_content_width }}">
9790
<div class="{{content_card}}">
9891
<div>{% block body %}{% endblock %}</div>
99-
</div>
92+
</div>
10093
{% if pagename == "tutorials" %}
10194
{# This is where the tutorials will be injected based on the filters #}
102-
<div id="search-results" class="tut-results"></div>
95+
<div id="search-results" class="tut-results"></div>
10396
{% endif %}
10497
</div>
10598
</div>
@@ -118,7 +111,7 @@ <h3>Table of contents</h3>
118111
</p>
119112
<p>
120113
{% trans sphinx_version=sphinx_version|e %}Created using <a href="http://sphinx-doc.org/">Sphinx</a> {{ sphinx_version }}.{% endtrans %}
121-
{% trans copyright=copyright|e %}&copy; Copyright Astropy.{% endtrans %}
114+
{% trans copyright=copyright|e %}&copy; Copyright Astropy.{% endtrans %}
122115
</p>
123116
</div>
124117
</footer>

tutorials/themes/tutorials-theme/navbar.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ <h2 class="card-title text-center"><a href="{{ pathto('guides') }}" class="text-
2020
</div>
2121
<div class="card bg-tutorial col-md-3 col-lg-2 p-0 m-2 ml-auto">
2222
<div class="card-body">
23-
<h2 class="card-title text-center"><a href="tutorials.html?q=filterTutorials" class="text-white">Tutorials</a></h2>
23+
<h2 class="card-title text-center"><a href="tutorials.html" class="text-white">Tutorials</a></h2>
2424
<p class="card-text text-center">Tutorials are step-by-step cookbooks for common activities that incorporate several packages. They are more specific and less conceptual than Guides but more extended than Examples.</p>
2525
</div>
2626
</div>

0 commit comments

Comments
 (0)