mkdocs-material icon indicating copy to clipboard operation
mkdocs-material copied to clipboard

Copy to clipboard icon not showing in Material for MkDocs 9

Open hamzakilic opened this issue 3 years ago • 1 comments

Contribution guidelines

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

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

Description

when I run docker versions 9.*** code fence copy to clipboard is missing but 8.5.** is working

Expected behaviour

I expected to see copy to clipboard icon

Actual behaviour

no clipboard icon

Steps to reproduce

run with docker docker run --rm -it -p 8000:8000 -v ${PWD}:/docs squidfunk/mkdocs-material:9.0.0b4

test.md page

# test

import tensorflow as tf
apt update

Package versions

  • Python: python --version
  • MkDocs: mkdocs --version
  • Material: pip show mkdocs-material | grep -E ^Version

Configuration

site_name: My Docs
theme:
  name: material
  features:
    - navigation.tabs
    - navigation.top
    - navigation.instant
    - content.tabs.link


markdown_extensions:
  - abbr
  - admonition
  - attr_list
  - def_list
  - footnotes
  - md_in_html
  - pymdownx.superfences
  - pymdownx.highlight

System information

  • Operating system: ubuntu 18
  • Browser: chrome

hamzakilic avatar Dec 12 '22 23:12 hamzakilic

Thanks for reporting. This is a configuration error. Please read the section Changes to mkdocs.yml in the briefing for v9, which explains that you need to enable the copy to clipboard functionality explicitly now:

theme:
  features:
    - content.code.copy

Closing as configuration error.

squidfunk avatar Dec 12 '22 23:12 squidfunk