From 13f6f1ec6bd8707ae0b45f6d0dfde333ea179240 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Kaan=20Barmore-Gen=C3=A7?= Date: Fri, 27 Oct 2023 03:58:04 +0000 Subject: [PATCH] added search --- .devcontainer/devcontainer.json | 17 +++++++++-------- .vscode/tasks.json | 14 +++++++++++++- .woodpecker.yml | 2 +- config.toml | 2 ++ layouts/partials/header-search.html | 9 +++++++++ themes/catafalque | 2 +- 6 files changed, 35 insertions(+), 11 deletions(-) create mode 100644 layouts/partials/header-search.html diff --git a/.devcontainer/devcontainer.json b/.devcontainer/devcontainer.json index 74e1bcb..a8dab32 100644 --- a/.devcontainer/devcontainer.json +++ b/.devcontainer/devcontainer.json @@ -11,14 +11,15 @@ // Use 'forwardPorts' to make a list of ports inside the container available locally. "forwardPorts": [1313], -"onCreateCommand": "apk add git-lfs", -"customizations": { - "vscode": { - "extensions": [ - "streetsidesoftware.code-spell-checker" - ] - } -} + "onCreateCommand": { + "lfs": "apk add git-lfs", + "pagefind": "export VER=v1.0.3 && wget \"https://github.com/CloudCannon/pagefind/releases/download/${VER}/pagefind-${VER}-x86_64-unknown-linux-musl.tar.gz\" && tar -xf \"pagefind-${VER}-x86_64-unknown-linux-musl.tar.gz\" && mv pagefind /usr/bin/ && rm \"pagefind-${VER}-x86_64-unknown-linux-musl.tar.gz\"" + }, + "customizations": { + "vscode": { + "extensions": ["streetsidesoftware.code-spell-checker"] + } + } // Use 'postCreateCommand' to run commands after the container is created. // "postCreateCommand": "uname -a", diff --git a/.vscode/tasks.json b/.vscode/tasks.json index ff266e4..86bfe70 100644 --- a/.vscode/tasks.json +++ b/.vscode/tasks.json @@ -12,7 +12,19 @@ { "label": "build", "type": "shell", - "command": "hugo -D", + "command": "hugo", + "problemMatcher": [] + }, + { + "label": "pagefind", + "type": "shell", + "command": "pagefind --site public", + "problemMatcher": [] + }, + { + "label": "view", + "type": "shell", + "command": "python3 -m http.server 1313 --directory public", "problemMatcher": [] } ] diff --git a/.woodpecker.yml b/.woodpecker.yml index 6106fd9..b6225f4 100644 --- a/.woodpecker.yml +++ b/.woodpecker.yml @@ -8,7 +8,7 @@ steps: build: image: klakegg/hugo:ext-alpine commands: - - hugo -D + - hugo --minify deploy: image: minio/mc secrets: [MINIO_URL, ACCESS_KEY, SECRET_KEY] diff --git a/config.toml b/config.toml index 5886469..2c6f359 100644 --- a/config.toml +++ b/config.toml @@ -66,6 +66,8 @@ homeSubtitle = [ "My interests include building web and mobile applications, both front and back end. Over the years I learned and used many programming languages and technologies, including JavaScript, TypeScript, React, React Native, Python, Java, C, C++, Clojure, Rust, and Haskell. Pretty much everything I've worked on is open source and available on my Github page.", ] +enablePagefind = true + # Set a background for the homepage # backgroundImage = "assets/images/background.jpg" diff --git a/layouts/partials/header-search.html b/layouts/partials/header-search.html new file mode 100644 index 0000000..c94d0de --- /dev/null +++ b/layouts/partials/header-search.html @@ -0,0 +1,9 @@ + + + + + diff --git a/themes/catafalque b/themes/catafalque index 9a12bd3..9782b57 160000 --- a/themes/catafalque +++ b/themes/catafalque @@ -1 +1 @@ -Subproject commit 9a12bd312aad34529c95b5efbe3eed414704a805 +Subproject commit 9782b57a9195096534a4326c54b8289b9b4e928f