question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Privacy plugin does not download Twemoji SVGs

See original GitHub issue

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

With the privacy plugin enabled, the src for emojis points to twemoji.maxcdn.com.

Expected behaviour

I would expect Twemoji SVGs to be downloaded and bundled with the site:

The built-in privacy plugin scans the resulting HTML for links to external resources, including external scripts, style sheets, images and web fonts, and downloads them to bundle them with your documentation site.

Actual behaviour

With the privacy plugin enabled, references to emojis are inserted as images with a source pointing to MaxCDN.

Steps to reproduce

  1. Enable the !!python/name:materialx.emoji.twemoji emoji index.
  2. Enable the privacy plugin.
  3. Insert a non-bundled emoji in a doc.

Package versions

  • Python: 3.7.13
  • MkDocs: 1.3.0
  • Material: 8.2.8+insiders.4.12.0

Configuration

site_url: "https://example.com/"
site_name: My Docs

theme:
  name: material

plugins:
  - search
  - privacy:
      externals_exclude:
        - cdn.jsdelivr.net/npm/mathjax@3/*

markdown_extensions:
  - attr_list
  - pymdownx.emoji:
      emoji_index: !!python/name:materialx.emoji.twemoji
      emoji_generator: !!python/name:materialx.emoji.to_svg

System information

  • Operating system: macOS
  • Browser: Firefox

Issue Analytics

  • State:closed
  • Created a year ago
  • Comments:9 (7 by maintainers)

github_iconTop GitHub Comments

1reaction
squidfunkcommented, Apr 30, 2022

Released as part of 8.2.12+insiders-4.13.2.

1reaction
squidfunkcommented, Apr 28, 2022

Good catch! Should be doable, I’ll investigate.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Twemoji
Grab all emojis as vector artwork and use them for any commercial or personal project. Download ...
Read more >
Twemoji for Chrome
Enables Chrome to display colored emojis even if your OS does not support it. Replaces the default emojis with Twemoji (Twitter emoji ......
Read more >
Emoji script is producing errors on pages with SVG content
The error is caused by the script traversing through document nodes, going into SVG nodes and checking indexOf of their className which is...
Read more >
Get hi-res twemoji SVGs by URL - SteGriff
This is just a handy way to download an SVG so you can render it into an icon or use it in Inkscape,...
Read more >
It's 2020.... PNG or SVG files for use as emoji/smilies? - XenForo
The script does a blind copy on the Noto files and then the Twemoji images copy is doing a 'no clobber' so they...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found