Skip to content

mkdocs-material & encrypted search: is it possible to leverage material's custom_dir to deploy your patched index.ts? #66

@ryran

Description

@ryran

Hey there! I'm less than 12 hours into my journey of exploring mkdocs and mkdocs-material and this awesome plugin.

I read the documentation at Search index encryption for mkdocs-material. I'm doing this all via a GitLab pipeline, so I wasn't quite sure what to do until I read about material's support for theme extension via the custom_dir option.

So here's what I did:

  1. Downloaded material_browser_request9_4p.patch
  2. Downloaded index.ts from the latest material release and saved it to my git repo as overrides/assets/javascripts/browser/request/index.ts
  3. Patched said file successfully
  4. Updated my mkdocs.yml to include custom_dir: overrides under theme
  5. Committed and pushed my changes to trigger the ci job that runs mkdocs

Oh PS: Here's my plugin config:

plugins:
  - search
  - roamlinks
  - callouts
  - encryptcontent:
      webcrypto: true
      search_index: dynamically
      encrypted_something:
        md-nav: [nav, class]
        md-footer__inner: [nav, class]
      password_inventory:
        ...

Unfortunately, search still doesn't work for encrypted pages, even after decrypting.

Since I'm so brand-new to all of this, I couldn't help but ask: do you have any suggestions about what I might be doing wrong or what a better approach might be?

Metadata

Metadata

Assignees

No one assigned

    Labels

    duplicateThis issue or pull request already exists

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions