Skip to content

Search returning entire page in search box [mkdocs-material insiders]  #3053

Closed
@albertkun

Description

Contribution guidelines

I've found a bug and checked that ...

  • ... the problem doesn't occur with the mkdocs or readthedocs themes
  • ... the problem persists when all overrides are removed, i.e. custom_dir, extra_javascript and extra_css
  • ... the documentation does not mention anything about my problem
  • ... there are no open or closed issues that are related to my problem

Description

Using mkdocs-material insiders search function seems to be returning the entire pages content alongside the paragraph symbol in the search results. This only occurs using deployment on GitHub pages, not locally.

Expected behaviour

I expect the search function to work the same on deployment as it does locally and not display the entire content of the page in the search tool, as follows:

image

Actual behaviour

The insiders version of mkdocs-material makes the search result return all of the page in its entirety.
image

Steps to reproduce

  1. Add tags to pages using mkdocs-material insiders
  2. Commit to GitHub repository
  3. Use GitHub actions to deploy:
jobs:
  deploy:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v2
      - uses: actions/setup-python@v2
        with:
          python-version: 3.x
        env:
      - run: pip install git+https://${ALBERT_KEY}@github.com/squidfunk/mkdocs-material-insiders.git
        env:
          ALBERT_KEY: ${{secrets.ALBERT_KEY}}      
  1. Test out search
  2. Search bug appears.

Package versions

  • Python: Python 3.9.5
  • MkDocs: mkdocs, version 1.2.2
  • Material: 7.2.8+insiders.3.0.1

Configuration

site_name: LA Metro Digital Services Team Docs
repo_url: https://github.com/LACMTA/digital-services-team-docs/

theme:
  palette:
    - scheme: default
      primary: black
      toggle:
        icon: material/toggle-switch-off-outline
        name: Switch to dark mode
    - scheme: slate
      primary: black
      accent: white
      toggle:
        icon: material/toggle-switch
        name: Switch to light mode  
  font:
    text: Open Sans
  favicon: assets/media/favicon.png
  logo: assets/media/favicon-reverse.png
  name: material
  features:
      - navigation.instant
      - navigation.tabs
      - content.code.annotate
      - search.highlight
      - toc.integrate
      - navigation.indexes
      - navigation.top
      - search.suggest      

  icon:
    repo: fontawesome/brands/github

markdown_extensions:
    - pymdownx.superfences
    - pymdownx.magiclink
    - smarty
    - meta
    - toc:
        permalink: True
        toc_depth: 2
    - sane_lists
    - admonition
    - footnotes
    - attr_list

edit_uri: edit/dev/docs/
plugins:
  - git-revision-date
  - autorefs
  - table-reader
  - macros
  - tags
  - search:
      lang: en

System information

  • Operating system: Windows 10
  • Browser: Firefox 92.0

Metadata

Assignees

No one assigned

    Labels

    bugIssue reports a bugresolvedIssue is resolved, yet unreleased if open

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions