aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLoek Le Blansch <loek@pipeframe.xyz>2024-10-05 10:56:06 +0200
committerLoek Le Blansch <loek@pipeframe.xyz>2024-10-05 10:56:06 +0200
commit2a49db8b5c2946555e7fa3a26193814ee711fb71 (patch)
tree3ffade57adc7a72c15282d1228fdc6005aaa1a8c
parent1643801e434c2c9bb09353998856210a46056f3b (diff)
add fallback (no client js) search
-rw-r--r--_config.yml5
-rw-r--r--atom.xml4
-rw-r--r--index.md4
-rw-r--r--makefile5
-rw-r--r--readme.md8
-rw-r--r--search.html7
6 files changed, 21 insertions, 12 deletions
diff --git a/_config.yml b/_config.yml
index 4f986b7..2e1ba16 100644
--- a/_config.yml
+++ b/_config.yml
@@ -1,10 +1,10 @@
title: "Loek's Blog"
-rss:
- url: https://blog.pipeframe.xyz/atom.xml
+domain: blog.pipeframe.xyz
permalink: /post/:title/
exclude:
- makefile
- license
+ - readme.md
defaults:
- scope:
type: posts
@@ -18,4 +18,5 @@ sass:
sourcemap: development
gems:
- jekyll-liquify
+nojs-search: https://google.com/search
diff --git a/atom.xml b/atom.xml
index 6b997e8..3521e33 100644
--- a/atom.xml
+++ b/atom.xml
@@ -11,8 +11,8 @@
<title>{{ site.title }}</title>
<description>{{ index_post.title }}</description>
<language>en-us</language>
- <link>{{ site.rss.url }}</link>
- <atom:link href="{{ site.rss.url }}" rel="self" type="application/rss+xml" />
+ <link>https://{{ site.domain }}/atom.xml</link>
+ <atom:link href="https://{{ site.domain }}/atom.xml" rel="self" type="application/rss+xml" />
</channel>
{% for post in site.posts %}
<item>
diff --git a/index.md b/index.md
index 6f32f84..d80d642 100644
--- a/index.md
+++ b/index.md
@@ -17,12 +17,10 @@ The page you're looking at right now is also open-source! The code for this
page can be found on [GitHub](https://github.com/lonkaars/blog), and should
also be available on [my private git server](https://git.pipeframe.xyz).
-{% if site.rss != nil %}
An rss/atom feed of this blog is also available:
```
-{{ site.rss.url }}
+https://{{ site.domain }}/atom.xml
```
-{% endif %}
---
diff --git a/makefile b/makefile
index b5f594d..46f6162 100644
--- a/makefile
+++ b/makefile
@@ -8,11 +8,12 @@ JEKYLL_BUILD_ARGS += --destination $(WEBROOT)
# Gemfile.lock is used as a proxy for checking if the required gems are
# installed
+GEMS = Gemfile.lock
-build: Gemfile.lock
+build: $(GEMS)
bundle exec jekyll build $(JEKYLL_BUILD_ARGS)
-Gemfile.lock: Gemfile
+$(GEMS): Gemfile
bundle install --quiet
clean:
diff --git a/readme.md b/readme.md
new file mode 100644
index 0000000..bc4095f
--- /dev/null
+++ b/readme.md
@@ -0,0 +1,8 @@
+# blog
+
+Live at <https://blog.pipeframe.xyz>
+
+## TODO
+
+- local search page functionality
+
diff --git a/search.html b/search.html
index 9001636..ed39150 100644
--- a/search.html
+++ b/search.html
@@ -5,12 +5,13 @@ id: search
toc: false
---
-<div class="searchBar">
- <input class="input" id="searchInput" placeholder="Search for posts..." spellcheck="false" autocomplete="off">
+<form class="searchBar" method="get" action="{{ site.nojs-search }}">
+ <input type="text" class="input" id="searchInput" name="q" placeholder="Search for posts..." spellcheck="false" autocomplete="off">
+ <input type="hidden" name="q" value="site:{{ site.domain }}">
<button class="button">
<div class="icon">{% include icon/search-round.svg %}</div>
</button>
-</div>
+</form>
<div class="searchResults"></div>