diff --git a/pelicanconf.py b/pelicanconf.py index 256acc52d..c9995e6a6 100644 --- a/pelicanconf.py +++ b/pelicanconf.py @@ -57,12 +57,6 @@ PLUGINS = ['webassets'] else: PLUGINS = ['webassets', 'neighbors'] - """ - Search functionality disabled while troubleshooting performance issues - for non-desktop readers. See https://github.com/rust-lang/this-week-in-rust/issues/4271 - PLUGINS = ['webassets', 'neighbors', 'search'] - SEARCH_HTML_SELECTOR = "article" - """ MARKDOWN = { 'extension_configs': { diff --git a/publishing/Dockerfile b/publishing/Dockerfile index eca286ed9..99669a69f 100644 --- a/publishing/Dockerfile +++ b/publishing/Dockerfile @@ -19,16 +19,14 @@ ENV LANGUAGE=en_US.UTF-8 COPY requirements.txt . RUN pip3 install -r requirements.txt -# install Stork -RUN curl https://files.stork-search.net/releases/v1.5.0/stork-ubuntu-20-04 -o stork \ - && chmod +x stork \ - && mv ./stork /usr/bin/stork - # install sass/juice RUN curl -fsSL https://deb.nodesource.com/setup_20.x | bash - RUN apt-get install -y nodejs RUN npm install -g sass juice +RUN curl -L -o pagefind.tar.gz https://github.com/Pagefind/pagefind/releases/download/v1.4.0/pagefind_extended-v1.4.0-aarch64-unknown-linux-musl.tar.gz +RUN tar -xvf pagefind.tar.gz + # pelican setup COPY content content COPY plugins plugins diff --git a/publishing/justfile b/publishing/justfile index 030228194..62aacb4eb 100644 --- a/publishing/justfile +++ b/publishing/justfile @@ -64,6 +64,10 @@ generate-website: docker-build clean-website docker run -it \ -v {{justfile_directory()}}/output-website:/usr/twir/output \ twir:latest + docker run -it \ + -v {{justfile_directory()}}/output-website:/usr/twir/output \ + twir:latest \ + python3 -m pagefind --site /usr/twir/output @echo "Finished generating website." # Host website locally on port 8000 diff --git a/requirements.txt b/requirements.txt index a8cce492f..c1616af7f 100644 --- a/requirements.txt +++ b/requirements.txt @@ -5,5 +5,4 @@ libsass==0.21.0 Markdown==3.3.7 markupsafe==2.0.1 pelican==4.7.1 -pelican-webassets==2.0.0 -pelican-search==1.0.1 \ No newline at end of file +pelican-webassets==2.0.0 \ No newline at end of file diff --git a/themes/rusted/templates/_post-title.html b/themes/rusted/templates/_post-title.html index b1dc63b43..a2c07fed2 100644 --- a/themes/rusted/templates/_post-title.html +++ b/themes/rusted/templates/_post-title.html @@ -1,10 +1,10 @@
diff --git a/themes/rusted/templates/_search-bar.html b/themes/rusted/templates/_search-bar.html new file mode 100644 index 000000000..fb9d18f7f --- /dev/null +++ b/themes/rusted/templates/_search-bar.html @@ -0,0 +1,19 @@ +