Closed coke closed 1 month ago
@coke oops. Not sure when this stopped working. However,
I have found it useful myself over the past few weeks.
when did it stop working? I do not remember changing FilteredToc
We don't have automated testing on it, so I don't know. We would probably have to do a git bisect with a locally running copy of the site to find out. I can try this if it would help.
@coke some git magic would be appreciated
Need some help from @dontlaugh - I have instructions for running the site locally, but it's always using latest, not the checked out version (so doing a git bisect doesn't help in that case)
@coke @finanalyst Here is a way to do it. After ./rendered_html has been generated by the build process, run the following from the root of the repo
podman run \
-v $PWD/rendered_html:/usr/share/caddy \ # mount host_path:container_path (dir)
-v $PWD/Caddyfile:/etc/caddy/Caddyfile \ # mount host_path:container_path (single file)
-p 8080:80 \ # map host port 8080 to container 80
docker.io/caddy:latest # use the upstream caddy image
I use podman
, but you can replace it with docker
and the rest of the parameters are the same.
Normally, when we build a docs site container, we pack all these files in, so all we need to do is ship a container to the server.
But in this case, we mount the config file and the static assets into the container at the default paths. That's /etc/caddy/Caddyfile and /usr/share/caddy, respectively.
Leave this running in a terminal, and you should be able to update the rendered html static assets, reload the webpage, and see your changes.
Let me know if it doesn't work. I think it should be pretty portable as long as you have docker or podman installed.
@finanalyst can you link to the fuzzysort repo here, for posterity?
For the record. The ToC filter uses fuzzysort, and ver 3.0.1 changed the API. Previously, the library was sourced from git, so we got the latest version. A cdn with link src="https://cdn.jsdelivr.net/npm/fuzzysort@2.0.4/fuzzysort.min.js
has the old API, which allows us to pin the library to a working version.
Trying to search in the TOC, typing anything throws this error:
and the search does not function.