Github Darkmode 与 lightmode 图像和 PyPi

问题描述 投票:0回答:0

GitHub 支持多种显示徽标的方式,具体取决于深色/浅色模式。不知何故,当 GitHub 存储库是上传到 PyPi 的 Python 项目时,这些选项似乎都不起作用。

这是我尝试过的,以及在 PyPi 中的效果:

![CoGuard Logo Dark](https://github.com/coguardio/coguard-cli/raw/master/logo_dark_mode.png#gh-dark-mode-only)![CoGuard_Light_Logo](https://github.com/coguardio/coguard-cli/raw/master/logo.png#gh-light-mode-only)

在 Stack overflow 上似乎显示出与此处相同的效果: CoGuard Logo DarkCoGuard_Light_Logo

即两个标志同时显示在 PyPi 页面上。

选项2:

<p align="center">
  <picture>
    <source srcset="https://github.com/coguardio/coguard-cli/raw/master/logo_dark_mode.png" media="(prefers-color-scheme: dark)">
    <img src="https://github.com/coguardio/coguard-cli/raw/master/logo.png" alt="Light mode logo" width="500">
  </picture>
</p>

这在 PyPi 中看起来像下面这样:

好的,这是我向社区提出的首要问题:拥有深色/浅色徽标并在 GitHub 和 PyPi 中正确显示它们的正确方法是什么?

github markdown pypi darkmode lightmode
© www.soinside.com 2019 - 2024. All rights reserved.