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

add missing search page, properly link it #50

Merged
merged 2 commits into from Mar 20, 2024
Merged
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
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],
}
Comment on lines +679 to +683
Copy link
Contributor

Choose a reason for hiding this comment

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

This introduced a visual regression:

After this PR:
Screenshot 2024-03-22 at 00 40 21

Before this PR:
Screenshot 2024-03-22 at 00 40 43

Search works fine without the permalinks; consider removing them for less visual clutter.

Copy link
Contributor

Choose a reason for hiding this comment

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

Perhaps we can just style them better? Being able to link to subheadings on pages is nice.

Copy link
Contributor

Choose a reason for hiding this comment

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

Sure, that would be a nice solution. I'll create an issue for it, so it's not forgotten :)


# 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