Skip to content

Instantly share code, notes, and snippets.

@picuu
Last active February 1, 2024 12:49
Show Gist options
  • Star 2 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save picuu/d4bb57cb7173edfdf9f74c3f3fe6633a to your computer and use it in GitHub Desktop.
Save picuu/d4bb57cb7173edfdf9f74c3f3fe6633a to your computer and use it in GitHub Desktop.
Markdown Tips for GitHub

Markdown tips for GitHub

  1. Annotations
  2. Key style format
  3. Badges and Shields
  4. Footnotes or References

Annotations

You can create special annotations by writing this:

> [!NOTE]
> This is a note

There are 5 diferent types wich work on GitHub. You just have to change the word between the brackets to NOTE, TIP, IMPORTANT, WARNING or CAUTION. There are them all:

Note

This is a note.

Tip

This is a tip.

Important

This is something important.

Warning

This is a warning.

Caution

This is a caution annotation.


Key style format

If you want to refer to a keyboard key you can use the html tag <kbd>text here</kbd>, wich refers to the word keyboard. This way you can get this results: this is a key


Badges and Shields

You can embed this little images that can make your markdown be so cool.

Made with ❤️ Follow on GitHub Visual Studio Code badge Markdown badge

In order to import an image in Markdown you have to write that syntaxis:

![Descriptive name of the image, for accesibility](image-url)

In case that you want to put an specific link to the image, you can select the image import (what I just showed you) and press CTRL + K, wich are the standard keybind to add a link. So next you may have something like this:

[![Descriptive name of the image, for accesibility](image-url)](your-link)

Here you have some websites in where you can find a lot of badges already created or else you can also create your own personalized badges.

  1. Badges for GitHub | A Curated List of Badges for GitHub
  2. ileriayo/markdown-badges
  3. For the Badge
  4. Shields.io
  5. badgen.net

Footnotes or references

The footnotes aren't part of the core Markdown spec, but anyways GFM supports them.

This is how you can create a footnote[^1]

Footnotes can be in-line[^2] and you can also use word to name your footnotes[^note].

[^1]: GFM refers to [GitHub Flavored Markdown Spec](https://github.github.com/gfm/).
[^2]: Give me a star ;).
[^note]: Named footnotes will still render with numbers, but they are easier to identify and write.

This is how footnotes look like1

Footnotes can be in-line2 and you can also use word to name your footnotes3.

Important

You can add as many footnotes as you want, wich will still be shown at the end of the document. In fact, this text is written below the footnotes but you see it before them anyway.

Footnotes

  1. GFM refers to GitHub Flavored Markdown Spec.

  2. Give me a star ;).

  3. Named footnotes will still render with numbers, but they are easier to identify and write.

@raimonizard
Copy link

Great work! 👍 crack

@picuu
Copy link
Author

picuu commented Jan 17, 2024

Thank you! 😉

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment