Questions tagged [github-flavored-markdown]

GitHub uses what they are calling "GitHub Flavored Markdown" (GFM) for messages, issues, and comments. It differs from standard Markdown (SM) in a few significant ways and adds some additional functionality.

GitHub uses what they are calling "GitHub Flavored Markdown" (GFM) for messages, issues, and comments. It differs from standard Markdown (SM) in a few significant ways and adds some additional functionality.

Newlines

The biggest difference that GFM introduces is in the handling of linebreaks. With SM you can hard wrap paragraphs of text and they will be combined into a single paragraph.

Multiple underscores in words

GFM ignores multiple underscores in words.

URL autolinking

Automatic highlighting of URL's.

Fenced code blocks

Markdown converts text with four spaces at the front of each line to code blocks. GFM supports that, but we also support fenced blocks. Just wrap your code blocks in ``` and you won't need to indent manually to trigger a code block.

Syntax highlighting

They take code blocks a step further and add syntax highlighting if you request it. In your fenced block, add an optional language identifier and we'll run it through syntax highlighting. For example, to syntax highlight Ruby code.

In addition to the changes in the previous section, certain other references are auto-linked, like SHA's.

In-depth overview

513 questions
3228
votes
44 answers

How to add images to README.md on GitHub?

Recently I joined GitHub. I hosted some projects there. I need to include some images in my README File. I don't know how to do that. I searched about this, but all I got was some links which tell me to "host images on web and specify the image path…
Midhun MP
  • 103,496
  • 31
  • 153
  • 200
770
votes
13 answers

How to draw checkbox or tick mark in GitHub Markdown table?

I am able to draw checkbox in Github README.md lists using - [ ] (for unchecked checkbox) - [x] (for checked checkbox) But this is not working in table. Does anybody know how to implement checkbox or checkmark in GitHub Markdown table?
Gaurav Bishnoi
  • 7,963
  • 2
  • 13
  • 12
545
votes
8 answers

How to highlight bash/shell commands in markdown?

How can I highlight the Bash/shell commands in Markdown files? For example, to highlight js, I write: ```js function () { return "This code is highlighted as Javascript!"} ``` To highlight HTML code I use ```html. How can we highlight Bash/shell…
Ionică Bizău
  • 109,027
  • 88
  • 289
  • 474
456
votes
26 answers

Is there a command line utility for rendering GitHub flavored Markdown?

I'm wondering if there is a command line utility for taking a GitHub flavored Markdown file and rendering it to HTML. I'm using a GitHub wiki to create website content. I've cloned the repository on my server and would then like to process it into…
McLeopold
  • 5,967
  • 5
  • 21
  • 14
446
votes
13 answers

Is there a way to add an animated GIF to a Markdown file?

I want to add this animated GIF to a GitHub flavored markdown file. If it can't be done in GitHub, is it possible to do it in another version of Markdown?
Zaynaib Giwa
  • 5,366
  • 7
  • 21
  • 26
425
votes
6 answers

New lines inside paragraph in README.md

When editing an issue and clicking Preview the following markdown source: a b c shows every letter on a new line. However, it seems to me that pushing similar markdown source structure in README.md joins all the letters on one line. I'd like the…
zoran119
  • 10,657
  • 12
  • 46
  • 88
417
votes
10 answers

How can one display images side by side in a GitHub README.md?

I'm trying to show a comparison between two photos in my README.md which is why I want to display them side-by-side. Here is how the two images are placed currently. I want to show the two Solarized color schemes side by side instead of top and…
Saad
  • 49,729
  • 21
  • 73
  • 112
369
votes
13 answers

How to add footnotes to GitHub-flavoured Markdown?

I am just trying to add footnotes in my GitHub Gist, but it doesn't work: Some long sentence. [^footnote] [^footnote]: Test, [Link](https://google.com). I am following this guide and I don't think I'm doing anything wrong. Can someone point out my…
Enrico Susatyo
  • 19,372
  • 18
  • 95
  • 156
345
votes
28 answers

How can I test what my readme.md file will look like before committing to github?

I am writing a readme for my github project in the .md format. Is there a way can I test what my readme.md file will look like before committing to github?
Usman Ismail
  • 17,999
  • 14
  • 83
  • 165
339
votes
9 answers

Get underlined text with Markdown

How can I underline text in Markdown?
Peter
  • 3,399
  • 2
  • 16
  • 3
288
votes
9 answers

How to write lists inside a markdown table?

Can one create a list (bullets, numbered or not) inside a markdown table. A table looks like this: | Tables | Are | Cool | | ------------- |:-------------:| -----:| | col 3 is | right-aligned | $1600 | | col 2 is |…
Gabriel Petrovay
  • 20,476
  • 22
  • 97
  • 168
204
votes
7 answers

Can I merge table rows in markdown

Is there a way to create merged rows in a column of table in markdown files like ReadMe.md files? Something like this:
dev-masih
  • 4,188
  • 3
  • 33
  • 55
180
votes
11 answers

How to make a styled Markdown admonition box in a GitHub Gist?

I am trying to make a Markdown admonition box such as note box, warning box for GitHub Gist. I do some search on Google I find Python markdown admonition but these admonitions don't seem to work on GitHub Gist. I have tried following Python warning…
my-lord
  • 2,453
  • 3
  • 12
  • 26
177
votes
1 answer

How do you indent a bulleted list in a README file using GitHub flavored markdown?

I know I can use asterisks to do something like this: list item1 list item2 but I was expecting something like ** to indent it one further. Is it possible?
Alaa Awad
  • 3,612
  • 6
  • 25
  • 35
1
2 3
34 35