GithubHelp home page GithubHelp logo

six-two / mkdocs-badges Goto Github PK

View Code? Open in Web Editor NEW
9.0 2.0 1.0 194 KB

Add badges to your mkdocs page

Home Page: https://mkdocs-badges.six-two.dev

License: MIT License

Python 85.74% CSS 4.07% JavaScript 8.15% Shell 2.04%
badges mkdocs mkdocs-plugin

mkdocs-badges's Introduction

Hello, World!

I am six-two, a pentester who also loves to write small scripts and programs.

You can find my projects on Github, Gitlab, and PyPI.

mkdocs-badges's People

Contributors

six-two avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

Forkers

snaeil

mkdocs-badges's Issues

How to properly use inline svg?

It is possible to use inline svg with your plugin as in this example:

|<svg width="35" height="35"><circle cx="10" cy="10" r="9" stroke="green" stroke-width="2" fill="yellow" /></svg>|circle|

Nevertheless it not rendered in an appropriate way:

2022-10-22-141608_121x72_scrot

Is it possible to appropriately use inline svg without further hacking?
Compatibility with this would be great to be able to include even more symbols than provided through unicode.

PS: Really appreciate your plugin!

How to work with reference styled hyperlinks?

We adopt the reference styled hyperlinks for certain reasons. I would like to know how mkdocs-badges plugin can be used with such referenced styled links.

See the example below.

|t:More Info|v:See more info|l:more_info|

[more_info]: https://www.example.com

Please provide the working example.

Thanks
Jayesh

P.S. The example does not work.

Conflicts when parsing tables

Hi,

I use badges and tables in my documentation:

|badge_name|value|class_name|
| ๐Ÿ”— | information (count) | grouping |
| - | ------------------- | :------: |
| [๐Ÿ”—](#foo) | server |

When the site builds, the above results in the following warnings:

WARNING -  [badges] [a.md:1] Parsing error: Unknown attribute: ' grouping '
WARNING -  [badges] [a:2] Parsing error: Unknown attribute: ' :------: '

Is there any way to make parsing more robust, and avoid producing those false negatives?

Note that the same warnings show up when the table has more than 3 columns, which is an easier case to handle in my opinion.

Further: handling badges in tables.

Thanks!

Compatibiity with markdown extensions for emoji and icons

I love mkdocs-badges. I have started to use it for our documentation at ringcentral.com. I also have been using material-mkdocs, which comes with a nice feature where I can use a simple markdown syntax to embed an icon.

https://squidfunk.github.io/mkdocs-material/reference/icons-emojis/

I want to use this in my badges, so that I can have something like this:

| :fontawesome-regular-face-laugh-wink: | byrnereese |

However, mkdocs-badges prevents the emoji text from being parsed and it is output literally.

One possible fix is to include an option of somekind that will add "markdown" to the outputted HTML so that the md_in_html plugin can do its thing. For example:

<span class="badge-group" markdown>
    <span class="badge badge-normal"><span class="sep"> [</span><span class="title">:fontawesome-regular-face-laugh-wink:</span><span class="sep"> | </span><span class="value">1.x</span><span class="sep">] </span></span>
</span>

Alternatively, you could implement this as a markdown extension, which arguably is the better option - as I think the utility of this plugin is great, and that would give this solution a much large audience.

How to set background color of custom badge?

I wanted to try out custom badges and tried to set a different background color.
I failed and don't know why.

My documentation contains:

|Styled differently|by custom HTML classes|class:myclass|

My docs/overrides/extra.css contains

.myclass {
  background-color: #FF0000;
  color: black;
}

My mkdocs.yml contains the theme attribute custom_dir: docs/overrides.

But still my badge doesn't change:

2022-10-22-143446_342x53_scrot

What am I doing wrong?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.