squidfunk / mkdocs-material

Documentation that simply works
https://squidfunk.github.io/mkdocs-material/
MIT License
20.9k stars 3.54k forks source link

Search and copy to clipboard do not work correctly #2383

Closed Valdes-Tresanco-MS closed 3 years ago

Valdes-Tresanco-MS commented 3 years ago

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

Description

Version 6.8.2 worked correctly, however after upgrade to version 7.0.x the search and copy to the clipboard do not work. This is what appears in the Chrome console:

[Deprecation] ::-webkit-details-marker pseudo element selector is deprecated. Please use ::marker instead. See https://chromestatus.com/feature/6730096436051968 for more details.

index.ts:135 Uncaught TypeError: Cannot read property 'clipboard.copy' of undefined
    at K (index.ts:135)
    at to (index.tsx:41)
    at so (index.ts:171)
    at index.ts:79
    at Array.map (<anonymous>)
    at fo (index.ts:79)
    at bundle.ts:187
    at Array.map (<anonymous>)
    at bundle.ts:187
    at e._subscribe (defer.ts:53)

GET http://127.0.0.1:8000/examples/3D-RISM/undefined 404 (Not Found)

index.ts:135 Uncaught TypeError: Cannot read property 'search.config.lang' of undefined
    at K (index.ts:135)
    at Di (index.ts:64)
    at index.ts:122
    at map.ts:52
    at t.c._next (OperatorSubscriber.ts:43)
    at t.next (Subscriber.ts:69)
    at t.next (Subject.ts:59)
    at t.next (ReplaySubject.ts:65)
    at Object.next (share.ts:117)
    at t._next (Subscriber.ts:112)

Expected behavior

Actual behavior

Copy to clipboard and search does not work

Steps to reproduce the bug

  1. ...
  2. ...
  3. ...

Package versions

Project configuration

The contents of your mkdocs.yml

System information

squidfunk commented 3 years ago

Thanks for reporting. Could you please share the contents of your mkdocs.yml?

Valdes-Tresanco-MS commented 3 years ago

Hi @squidfunk. Sorry, I thought I put it. Best! Mario

# Project information
site_name: gmx_MMPBSA Documentation
site_url: https://valdes-tresanco-ms.github.io/gmx_MMPBSA/
site_author: Mario S. and Mario E. Valdes Tresanco
site_description: >-
  gmx_MMPBSA is a new tool aid to perform end-state free energy calculations based on AMBER's MMPBSA.py with GROMACS
  files

# Repository
repo_name: gmx_MMPBSA
repo_url: https://github.com/Valdes-Tresanco-MS/gmx_MMPBSA
edit_uri: ""

# Copyright
copyright: Copyright &copy; 2020 - 2021 MS. and ME. Valdes Tresanco

# Configuration
theme:
  name: material
  custom_dir: docs/overrides

  # 404 page
  static_templates:
    - 404.html

  # Don't include MkDocs' JavaScript
  include_search_page: false
  search_index_only: true

  # Default values, taken from mkdocs_theme.yml
  language: en
  features:
    # - navigation.instant
    - navigation.sections
    - navigation.tabs
  palette:
    scheme: default
    primary: black
    accent: black
  font:
    text: Roboto
    code: Roboto Mono
  favicon: assets/favicon.png
  icon:
    logo: logo

# Plugins
plugins:
  - search
#  - redirects:
#      redirect_maps:
##        extensions/admonition.md: reference/admonitions.md
##        extensions/codehilite.md: reference/code-blocks.md
##        extensions/footnotes.md: reference/footnotes.md
##        extensions/metadata.md: reference/meta-tags.md
##        extensions/permalinks.md: setup/setting-up-navigation.md #permalink
##        extensions/pymdown.md: reference/admonitions.md
##        plugins/revision-date.md: setup/adding-a-git-repository.md #revision-date
##        plugins/search.md: setup/setting-up-site-search.md
##        releases/4.md: upgrading.md #upgrading-from-4x-to-5x
##        releases/5.md: upgrading.md #upgrading-from-3x-to-4x
##        releases/changelog.md: changelog.md
##        setup/adding-social-links.md: setup/setting-up-the-footer.md
##        sponsorship.md: insiders.md
  - minify:
      minify_html: true

# Customization
extra:
  social:
    - icon: fontawesome/brands/github
      link: https://github.com/Valdes-Tresanco-MS

# Extensions
markdown_extensions:
  - admonition
  - abbr
  - attr_list
  - def_list
  - footnotes
  - meta
  - md_in_html
  - toc:
      permalink: true
  - pymdownx.arithmatex:
      generic: true
  - pymdownx.betterem:
      smart_enable: all
  - pymdownx.caret
  - pymdownx.critic
  - pymdownx.details
  - pymdownx.emoji:
      emoji_index: !!python/name:materialx.emoji.twemoji
      emoji_generator: !!python/name:materialx.emoji.to_svg
  - pymdownx.highlight
  - pymdownx.inlinehilite
  - pymdownx.keys
  - pymdownx.magiclink:
      repo_url_shorthand: true
      user: squidfunk
      repo: mkdocs-material
  - pymdownx.mark
  - pymdownx.smartsymbols
  - pymdownx.superfences:
      custom_fences:
        - name: mermaid
          class: mermaid
          format: !!python/name:pymdownx.superfences.fence_code_format
  - pymdownx.tabbed
  - pymdownx.tasklist:
      custom_checkbox: true
  - pymdownx.tilde

# Page tree
nav:
  - Home: index.md
  - Getting started:
    - Overview: getting-started.md
    - Introduction: introduction.md
    - gmx_MMPBSA in a nutshell: summary.md
    - gmx_MMPBSA vs other programs: versus.md
    - Installation: installation.md
    - Command-line: command-line.md
  - Hands to work:
    - How gmx_MMPBSA works: howworks.md
    - The input file: input_file.md
    - Output Files: output.md
    - Advanced Options: advanced.md
    - Python API: api.md
    - gmx_MMPBSA_ana: analyzer.md
  - Examples:
    - Analysis:
      - 3D-RISM: examples/3D-RISM/README.md
      - Alanine scanning: examples/Alanine_scanning/README.md
      - Decomposition analysis: examples/Decomposition_analysis/README.md
      - Protein-Ligand (MT): examples/Protein_ligand/MT/README.md
      - Stability calculations: examples/Stability/README.md
      - Entropy calculation:
        - Interaction Entropy: examples/Entropy_calculations/Interaction_Entropy/README.md
        - nmode Entropy: examples/Entropy_calculations/nmode/README.md
    - Systems:
      - Protein-protein: examples/Protein_protein/README.md
      - Protein-Ligand (ST): examples/Protein_ligand/ST/README.md
      - Protein-DNA: examples/Protein_DNA/README.md
      - Metalloprotein-peptide: examples/Metalloprotein_peptide/README.md
      - Protein-DNA-RNA-Ions-Ligand: examples/Protein_DNA_RNA_Ion_ligand/README.md
      - Protein-glycan: examples/Protein_glycan/README.md
      - Membrane proteins: examples/Protein_membrane/README.md
    - Charmm Support:
        - Charmm and MM(PB/GB)SA: charmm.md
        - Protein-Ligand (ST): examples/Protein_ligand_CHARMMff/README.md
  - Support:
    - Information: information.md
    - Changelog: changelog.md
squidfunk commented 3 years ago

Thanks! My best guess is that the error is in your overrides. Have you followed the upgrade guide? The configuration changed, so it's likely that you need to adjust the config block in base.html if you've overridden it.

Valdes-Tresanco-MS commented 3 years ago

Thanks @squidfunk You were definitely right, I already fixed the references in the HTML, CSS, and js and everything works perfectly.