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