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

Toggle search link in header with include_search #11

Closed
wants to merge 3 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
12 changes: 7 additions & 5 deletions cinder/nav.html
Expand Up @@ -42,11 +42,13 @@
{% endif %}

<ul class="nav navbar-nav navbar-right">
<li>
<a href="#" data-toggle="modal" data-target="#mkdocs_search_modal">
<i class="fa fa-search"></i> Search
</a>
</li>
{% if include_search %}

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Has this been tested? Looking at the MkDocs documentation, it should be if config.extra.include_search.

<li>
<a href="#" data-toggle="modal" data-target="#mkdocs_search_modal">
<i class="fa fa-search"></i> Search
</a>
</li>
{% endif %}
{% if include_next_prev %}
<li {% if not previous_page %}class="disabled"{% endif %}>
<a rel="next" {% if previous_page %}href="{{ previous_page.url }}"{% endif %}>
Expand Down
7 changes: 7 additions & 0 deletions docs/index.md
Expand Up @@ -176,6 +176,13 @@ pages:

The link appears at the upper right hand corner of your site.

### Toggle The Search Link

A search link is show in the header by default. Toggle the search link on and off by including 'include_search' in the 'mkdocs.yml' file

<pre><code class="yaml">extra:
include_search: false</code></pre>

### License Declaration and Link

The Cinder theme displays your license declaration in the footer if you include a `copyright` field and define it with the text (and optionally the HTML link) that you would like to display:
Expand Down