extract stork search in include
This commit is contained in:
parent
4e99152aff
commit
0308fe1056
3 changed files with 14 additions and 16 deletions
|
@ -44,7 +44,7 @@ The minimalist [Pelican](http://blog.getpelican.com/) theme.
|
|||
- [Representative image](https://github.com/getpelican/pelican-plugins/tree/master/representative_image)
|
||||
- [Neighbors](https://github.com/getpelican/pelican-plugins/tree/master/neighbors)
|
||||
- [Pelican Search](https://github.com/pelican-plugins/search)
|
||||
- [Tipue Search](https://github.com/getpelican/pelican-plugins/blob/master/tipue_search/)
|
||||
- [Tipue Search](https://github.com/getpelican/pelican-plugins/blob/master/tipue_search/) (deprecated)
|
||||
- [SEO](https://github.com/pelican-plugins/seo)
|
||||
|
||||
## Install
|
||||
|
|
|
@ -78,10 +78,7 @@
|
|||
{% endif %}
|
||||
|
||||
{% if PLUGINS and 'pelican.plugins.search' in PLUGINS %}
|
||||
{% if THEME_COLOR_AUTO_DETECT_BROWSER_PREFERENCE or not THEME_COLOR or THEME_COLOR == "light" %}
|
||||
<link rel="stylesheet" type="text/css" href="{{ SITEURL }}/{{ THEME_STATIC_DIR }}/stork/stork-dark.css" />
|
||||
{% endif %}
|
||||
|
||||
{% endif %}
|
||||
|
||||
<link rel="stylesheet" type="text/css" href="{{ SITEURL }}/{{ THEME_STATIC_DIR }}/font-awesome/css/fontawesome.css">
|
||||
|
@ -316,17 +313,6 @@
|
|||
|
||||
{% block additional_js %}{% endblock %}
|
||||
|
||||
{% if PLUGINS and 'pelican.plugins.search' in PLUGINS %}
|
||||
{% if STORK_VERSION %}
|
||||
<script src="https://files.stork-search.net/releases/v{{ STORK_VERSION }}/stork.js"></script>
|
||||
<script>
|
||||
{% else %}
|
||||
<script src="{{ SITEURL }}/static/stork.js"></script>
|
||||
<script>
|
||||
stork.initialize("{{ SITEURL }}/static/stork.wasm")
|
||||
{% endif %}
|
||||
stork.register("sitesearch", "{{ SITEURL }}/search-index.st", {showProgress: false})
|
||||
</script>
|
||||
{% endif %}
|
||||
{% include 'partial/stork_search.html' %}
|
||||
</body>
|
||||
</html>
|
||||
|
|
12
templates/partial/stork_search.html
Normal file
12
templates/partial/stork_search.html
Normal file
|
@ -0,0 +1,12 @@
|
|||
{% if PLUGINS and 'pelican.plugins.search' in PLUGINS %}
|
||||
{% if STORK_VERSION %}
|
||||
<script src="https://files.stork-search.net/releases/v{{ STORK_VERSION }}/stork.js"></script>
|
||||
<script>
|
||||
{% else %}
|
||||
<script src="{{ SITEURL }}/static/stork.js"></script>
|
||||
<script>
|
||||
stork.initialize("{{ SITEURL }}/static/stork.wasm")
|
||||
{% endif %}
|
||||
stork.register("sitesearch", "{{ SITEURL }}/search-index.st", {showProgress: false})
|
||||
</script>
|
||||
{% endif %}
|
Loading…
Reference in a new issue