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

Conversation

cudmore
Copy link

@cudmore cudmore commented Apr 15, 2016

I've added a yml variable 'include_search' to toggle the search link on and off in nav.html

what do you think?

p.s. This is the first time I have done a pull request on Github. Thus, I have NO IDEA what I am doing or if I have done this correctly.

@chrissimpkins
Copy link
Owner

Will have a look this weekend. Thank you!!

@chrissimpkins
Copy link
Owner

Sorry forgot about this! Will try to merge it this week.

<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.

@SinisterMinister
Copy link

I'd go ahead and wrap the <script data-main="{{ base_url }}/mkdocs/js/search.js" src="{{ base_url }}/mkdocs/js/require.js"></script> in base.html so that it's not doing things unnecessarily if you've disabled the search.

Also, it might be better semantically to have the field be disable_search instead since it's enabled by default in MkDocs. The way it's currently written it would default to being disabled.

@chrissimpkins
Copy link
Owner

Will require a rebase on the changes made to support MkDocs project changes in order to merge this. Feel free to reopen if you are able to do this work. Sorry...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants