Skip to content

Commit

Permalink
Merge pull request #50 from mattip/search
Browse files Browse the repository at this point in the history
add missing search page, properly link it
  • Loading branch information
fangerer committed Mar 20, 2024
2 parents d0499f9 + 1af035b commit 605665a
Show file tree
Hide file tree
Showing 3 changed files with 22 additions and 4 deletions.
11 changes: 8 additions & 3 deletions conf.py
Expand Up @@ -676,6 +676,11 @@
# ".js": [filters.closure_compiler],
# ".jpg": ["jpegoptim --strip-all -m75 -v %s"],
# }
from nikola import filters

FILTERS = {
".html": [filters.add_header_permalinks],
}

# Executable for the "yui_compressor" filter (defaults to 'yui-compressor').
# YUI_COMPRESSOR_EXECUTABLE = 'yui-compressor'
Expand Down Expand Up @@ -1229,7 +1234,7 @@
# BODY_END = ""

SEARCH_FORM = """
<form class="navbar-form navbar-left" action="/search.html" role="search">
<form class="navbar-form navbar-left" action="/search/index.html" role="search">
<div class="form-group">
<input type="text" class="form-control" id="tipue_search_input" name="q" placeholder="Search&hellip;" autocomplete="off">
</div>
Expand Down Expand Up @@ -1269,7 +1274,7 @@
# HIDE_REST_DOCINFO = False

# Map metadata from other formats to Nikola names.
# Supported formats: yaml, toml, rest_docinfo, markdown_metadata
# Supported formats: ${_METADATA_MAPPING_FORMATS}
# METADATA_MAPPING = {}
#
# Example for Pelican compatibility:
Expand All @@ -1280,7 +1285,7 @@
# Other examples: https://getnikola.com/handbook.html#mapping-metadata-from-other-formats

# Map metadata between types/values. (Runs after METADATA_MAPPING.)
# Supported formats: nikola, yaml, toml, rest_docinfo, markdown_metadata
# Supported formats: nikola, ${_METADATA_MAPPING_FORMATS}
# The value on the right should be a dict of callables.
# METADATA_VALUE_MAPPING = {}
# Examples:
Expand Down
13 changes: 13 additions & 0 deletions pages/search.html
@@ -0,0 +1,13 @@
<!--
.. title: Search
.. slug: search
.. date: 1970-01-01 00:00:00Z
.. tags:
.. category:
.. link:
.. description:
.. type: text
.. template: localsearch.tmpl
-->

<p style="display: none">Search results appear here.</p>
2 changes: 1 addition & 1 deletion requirements.txt
Expand Up @@ -2,6 +2,6 @@ aiohttp
feedparser
jinja2
markdown==3.2.2
nikola==8.2.2
nikola==8.2.4
ruamel.yaml
watchdog

0 comments on commit 605665a

Please sign in to comment.