From 6783b82fd58efc996319c6534e070fc40edda74d Mon Sep 17 00:00:00 2001 From: eikek Date: Mon, 25 Oct 2021 17:21:55 +0200 Subject: [PATCH] Update zola to 0.14.1 and fix doc search Issue: #1120 --- website/shell.nix | 3 +-- website/site/config.toml | 10 +++++----- website/site/content/docs/tools/cli.md | 24 ++++++++++++------------ website/site/templates/index.html | 4 +++- website/site/templates/overview.html | 2 +- website/site/templates/page.html | 2 +- website/site/templates/pages.html | 3 ++- website/site/templates/search-head.html | 8 ++++---- 8 files changed, 29 insertions(+), 27 deletions(-) diff --git a/website/shell.nix b/website/shell.nix index 356643cf..181b4ad1 100644 --- a/website/shell.nix +++ b/website/shell.nix @@ -1,8 +1,7 @@ let nixpkgs = builtins.fetchTarball { #url = "channel:nixos-21.05"; - url = "https://github.com/NixOS/nixpkgs/archive/2d6ab6c6b92f7aaf8bc53baba9754b9bfdce56f2.tar.gz"; - #sha256 = "0l975q132x08qvw73qj391dl6qk9a661my8njcg5sl5rcmna3bmj"; + url = "https://github.com/NixOS/nixpkgs/archive/e6badb26fc0d238fda2432c45b7dd4e782eb8200.tar.gz"; }; pkgs = import nixpkgs { }; in diff --git a/website/site/config.toml b/website/site/config.toml index 6efb0447..dd5decc2 100644 --- a/website/site/config.toml +++ b/website/site/config.toml @@ -4,14 +4,14 @@ base_url = "https://docspell.org" # Whether to automatically compile all Sass files in the sass directory compile_sass = true -[markdown] -# Whether to do syntax highlighting -# Theme can be customised by setting the `highlight_theme` variable to a theme supported by Zola -highlight_code = true -highlight_theme = "gruvbox-dark" # Whether to build a search index to be used later on by a JavaScript library build_search_index = true +default_language = "en" + +[markdown] +highlight_code = true +highlight_theme = "gruvbox-dark" [link_checker] skip_prefixes = [ diff --git a/website/site/content/docs/tools/cli.md b/website/site/content/docs/tools/cli.md index 97a694bb..fcf3836c 100644 --- a/website/site/content/docs/tools/cli.md +++ b/website/site/content/docs/tools/cli.md @@ -112,7 +112,7 @@ command doesn't require to be logged in, it can also upload via a A source id can be given in the config file, then there are no additional options required. The simplest form is this: -``` shell +``` ❯ dsc upload *.pdf File already in Docspell: article-velo.pdf Adding to request: test-ocr.pdf @@ -142,7 +142,7 @@ in a separate request, so the `--single-item` option cannot be used. There are options to exclude/include files based on a [glob pattern](https://docs.rs/glob/0.3.0/glob/struct.Pattern.html). -``` shell +``` ❯ dsc upload --traverse . File already in Docspell: article-velo.pdf File already in Docspell: demo/dirc/scan.21-03-12.15-50-54.pdf @@ -175,7 +175,7 @@ It detects file creations and skips a rename within a watched folder. The flag `-r` or `--recursive` is required to recursively watch a directory. -``` shell +``` ❯ dsc watch -r . Watching directory (Recursive): . Press Ctrl-C to quit. @@ -204,7 +204,7 @@ query. It is possible to download them all flat into some directory or directly into a zip file. For example, download all files that are tagged with `todo` into a zip file: -``` shell +``` ❯ dsc download --zip 'tag:todo' Zipping 2 attachments into docspell-files.zip Downloading DOC-20191223-155707.jpg.pdf … @@ -214,7 +214,7 @@ Downloading DOC-20200803-174448.jpg.pdf … It downloads the converted PDF files by default, which can be changed via some options. -``` shell +``` ❯ dsc download --zip --original 'tag:todo' Zipping original files of 2 attachments into docspell-files.zip Downloading DOC-20191223-155707.jpg … @@ -296,7 +296,7 @@ into recursive paths (as shown in the example output above) using the resulting in `Finance-Institute`. Example run (producing output shown above): -``` shell +``` ❯ dsc export --all --date-links --folder-links --folder-delimiter "/" --tag-links --target exports Exported item: test3.zip Exported item: README.md @@ -329,7 +329,7 @@ config file or as an argument. ### Reset user password -``` shell +``` ❯ dsc admin reset-password --account demo ┌─────────┬──────────────┬──────────────────┐ │ success │ new password │ message │ @@ -340,7 +340,7 @@ config file or as an argument. ### Recreate fulltext index -``` shell +``` ❯ dsc admin --admin-secret admin123 recreate-index ┌─────────┬─────────────────────────────────────┐ │ success │ message │ @@ -350,7 +350,7 @@ config file or as an argument. ``` ### Convert all files to PDF -``` shell +``` ❯ dsc admin --admin-secret admin123 convert-all-pdf ┌─────────┬─────────────────────────────────┐ │ success │ message │ @@ -364,7 +364,7 @@ enabling it now. ### Regenerate preview images -``` shell +``` ❯ dsc admin --admin-secret admin123 convert-all-pdf ┌─────────┬───────────────────────────────────────┐ │ success │ message │ @@ -382,7 +382,7 @@ config. The `search` command takes a [query](@/docs/query/_index.md) and prints the results. -``` shell +``` ❯ dsc search 'corr:*' ┌──────────┬────────────────────────────┬───────────┬────────────┬─────┬───────────────────────────┬───────────────┬────────┬─────────────┬────────────┬───────┐ │ id │ name │ state │ date │ due │ correspondent │ concerning │ folder │ tags │ fields │ files │ @@ -399,7 +399,7 @@ prints the results. ``` The same can be formatted as json and, for example, only print the ids: -``` shell +``` ❯ dsc -f json search 'corr:*' | jq '.groups[].items[].id' "HVK7JuCFt4W-qxkcwq1cWCV-dvpGo4DpZzU-Q16Xoujojas" "3odNawKE1Ek-YJrWfPzekAq-47cjt14sexd-GK35JAEAanx" diff --git a/website/site/templates/index.html b/website/site/templates/index.html index 34d27d58..dbd2b349 100644 --- a/website/site/templates/index.html +++ b/website/site/templates/index.html @@ -4,10 +4,11 @@ {% include "meta.html" %} Docspell – Simple document organizer - + + + {% include "fathom.html" %} diff --git a/website/site/templates/overview.html b/website/site/templates/overview.html index 8436c4d5..3ebc3874 100644 --- a/website/site/templates/overview.html +++ b/website/site/templates/overview.html @@ -4,7 +4,6 @@ {% include "meta.html" %} {{ section.title }} – Docspell Documentation - {% include "search-head.html" %}
@@ -63,6 +62,7 @@ {% include "footer.html" %} + {% include "search-head.html" %} {% include "search-part.html" %} {% include "fathom.html" %} diff --git a/website/site/templates/page.html b/website/site/templates/page.html index e2d4e037..46e9ef19 100644 --- a/website/site/templates/page.html +++ b/website/site/templates/page.html @@ -4,7 +4,6 @@ {% include "meta.html" %} {{ page.title }} – Docspell Documentation - {% include "search-head.html" %}
@@ -98,6 +97,7 @@
{% include "footer.html" %} + {% include "search-head.html" %} {% include "search-part.html" %} {% include "fathom.html" %} diff --git a/website/site/templates/pages.html b/website/site/templates/pages.html index 88a81569..aad46a6b 100644 --- a/website/site/templates/pages.html +++ b/website/site/templates/pages.html @@ -4,7 +4,6 @@ {% include "meta.html" %} {{ section.title }} – Docspell Documentation - {% include "search-head.html" %}
@@ -71,6 +70,8 @@ {% include "footer.html" %} + + {% include "search-head.html" %} {% include "search-part.html" %} {% include "fathom.html" %} diff --git a/website/site/templates/search-head.html b/website/site/templates/search-head.html index 1d69d4e2..8d3d075d 100644 --- a/website/site/templates/search-head.html +++ b/website/site/templates/search-head.html @@ -1,4 +1,4 @@ - - - - + + + +