GitHub Info Card¶
MDx provides support for a variety of short codes. You can use them by inserting short codes in the post. "GitHub Info Card" is one of them.
Basic Usage¶
[mdx_github attr="value"][/mdx_github]
Attributes¶
Attribute | Optional Value | Default | Description |
---|---|---|---|
author | any string | Empty | Author username |
project | any string | Empty | Repo name |
gateway | any string | https://api.github.com/ | Custom API gateway |
Example¶
[mdx_github author="yrccondor" project="mdx"][/mdx_github]
Tip
None of these attributes are required, and the default value will be used when an attribute is specified. The order of the attributes does not affect the final effect as well.
If failed to load
If the preview fails to load, an error message will be displayed in the original position of the card with a link to the project page.