Skip to content

Commit

Permalink
Enable site search
Browse files Browse the repository at this point in the history
  • Loading branch information
pwhittlesea committed Dec 22, 2024
1 parent 20a1b76 commit 2a3a7ae
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 5 deletions.
8 changes: 4 additions & 4 deletions .hooks/update_last_modified.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@
# Replace `last_modified_at` timestamp with current time
# From https://mademistakes.com/notes/adding-last-modified-timestamps-with-git/

git diff --cached --name-status | egrep -i "^(A|M).*\.(md)$" | while read a b; do
cat $b | sed "/---.*/,/---.*/s/^last_modified_at:.*$/last_modified_at: $(date -u --iso-8601=seconds)/" > tmp
mv tmp $b
git add $b
git diff --cached --name-status | grep -E -i "^(A|M).*\.(md)$" | while read a b; do
sed -i.bak "/---.*/,/---.*/s/^last_modified_at:.*$/last_modified_at: $(date -u --iso-8601=seconds)/" "$b"
rm "$b.bak"
git add "$b"
done
5 changes: 5 additions & 0 deletions _config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -129,6 +129,11 @@ relative_links:
enabled: true
collections: true

# Enable site search
search: true
lunr:
search_within_pages: true

# Jekyll Reading Files
include:
- .htaccess
Expand Down
3 changes: 2 additions & 1 deletion _posts/2024-12-19-ssh-instead-of-https-for-terraform.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
---
title: "Use ssh instead of https for Terraform modules"
date: 2024-12-19 22:39:00 +0100
last_modified_at: 2024-12-19T22:46:05+00:00
last_modified_at: 2024-12-22T10:57:13+00:00
toc: false
categories: code
tags: github terraform

Expand Down

0 comments on commit 2a3a7ae

Please sign in to comment.