Integrate pagefind search
This commit is contained in:
parent
75a860a95a
commit
3cb659053c
4
Makefile
4
Makefile
@ -2,6 +2,10 @@
|
||||
|
||||
build:
|
||||
./build.py
|
||||
pagefind --site out/
|
||||
|
||||
clean:
|
||||
test -e out && rm -rf out
|
||||
|
||||
watch:
|
||||
while sleep 1; do find src/ build.py Makefile | entr -d make build; done
|
||||
|
5
build.py
5
build.py
@ -22,11 +22,6 @@ def main():
|
||||
md = markdown.Markdown(extensions=["attr_list", "footnotes", "md_in_html", "meta"])
|
||||
comment_md = markdown.Markdown()
|
||||
|
||||
# Clean the output directory
|
||||
if out.exists():
|
||||
print("Removing ", out)
|
||||
shutil.rmtree(out)
|
||||
|
||||
# Load the template
|
||||
template = bs4.BeautifulSoup(
|
||||
(src / ".template.html").read_text(encoding="utf8"),
|
||||
|
@ -6,4 +6,6 @@ title: Home
|
||||
|
||||
=> [Projects I've worked on](./project/).
|
||||
|
||||
=> [About this site](./about/).
|
||||
=> [About this site](./about/).
|
||||
|
||||
=> [Search this site](./search/).
|
||||
|
Loading…
Reference in New Issue
Block a user