-
Notifications
You must be signed in to change notification settings - Fork 976
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #1116 from vvo/docs/add-documentation-search
docs(website): add search to the website
- Loading branch information
Showing
6 changed files
with
93 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,4 @@ | ||
|
||
<div class="docs-nav"> | ||
<p class="docs-nav-item"> | ||
{% if page.prev_link %} | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
<!-- Directly extracted from https://github.com/rohanchandra/type-theme/blob/c6ec5a69ff7dfe2df193be08515193c72bd4a55d/_includes/footer.html | ||
for customization (DocSearch feature) --> | ||
|
||
{% if site.theme_settings.katex and page.id %} | ||
<script src="{{ "/assets/js/katex_init.js" | relative_url }}"></script> | ||
{% endif %} | ||
|
||
{% if site.theme_settings.footer_text %} | ||
<footer class="site-footer"> | ||
<p class="text">{{ site.theme_settings.footer_text }}</p> | ||
</footer> | ||
{% endif %} | ||
|
||
<script type="text/javascript" src="https://cdn.jsdelivr.net/npm/docsearch.js@2/dist/cdn/docsearch.min.js"></script> | ||
<script type="text/javascript"> docsearch({ | ||
apiKey: '4b20e432aa42a515b1a465b1494df8bf', | ||
indexName: 'lostisland_faraday', | ||
inputSelector: '#search-box', | ||
debug: false // Set debug to true if you want to inspect the dropdown | ||
}); | ||
</script> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,59 @@ | ||
<!-- This is extracted directly from https://github.com/rohanchandra/type-theme/blob/c6ec5a69ff7dfe2df193be08515193c72bd4a55d/_includes/header.html | ||
for customization (DocSearch feature) --> | ||
<header class="site-header"> | ||
<div class="branding"> | ||
{% if site.theme_settings.gravatar %} | ||
<a href="{{ site.baseurl }}/"> | ||
<img class="avatar" src="https://secure.gravatar.com/avatar/{{ site.theme_settings.gravatar }}?s=100" alt=""/> | ||
</a> | ||
{% elsif site.theme_settings.avatar %} | ||
<a href="{{ site.baseurl }}/"> | ||
<img class="avatar" src="{{ site.baseurl }}/{{ site.theme_settings.avatar }}" alt=""/> | ||
</a> | ||
{% endif %} | ||
<h1 class="site-title"> | ||
<a href="{{ site.baseurl }}/">{{ site.theme_settings.title }}</a> | ||
</h1> | ||
</div> | ||
<nav class="site-nav"> | ||
<ul> | ||
{% if site.theme_settings.site_navigation_sort %} | ||
{% assign site_pages = site.pages | sort: site.theme_settings.site_navigation_sort %} | ||
{% else %} | ||
{% assign site_pages = site.pages %} | ||
{% endif %} | ||
{% for page in site_pages %} | ||
{% if page.title and page.hide != true %} | ||
<li> | ||
<a class="page-link" href="{{ page.url | relative_url }}"> | ||
{{ page.title }} | ||
</a> | ||
</li> | ||
{% endif %} | ||
{% endfor %} | ||
<!-- Social icons from Font Awesome, if enabled --> | ||
{% include icons.html %} | ||
|
||
<!-- Search bar --> | ||
{% if site.theme_settings.search %} | ||
<li> | ||
<form action="{{ site.baseurl }}/search.html" method="get"> | ||
<input type="text" id="search-box" name="query" placeholder="Search" class=""> | ||
<button type="submit" class=""> | ||
<i class="fa fa-fw fa-search"></i> | ||
</button> | ||
</form> | ||
</li> | ||
{% endif %} | ||
<li> | ||
<form id="search-form"> | ||
<input type="text" id="search-box" placeholder="Search"> | ||
<button type="submit"> | ||
<i class="fa fa-fw fa-search"></i> | ||
</button> | ||
</form> | ||
</li> | ||
</ul> | ||
</nav> | ||
|
||
</header> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters