Tag: markdown

How to write your repo README in a markup language other than markdown – 057

Markdown not your thing? GitHub supports more than just markdown for your Readme markup language. You can view the full list of supported markup languages.

For example, the following readme is written in Creole instead of markdown.

repo README written in Creole

The code used to render readmes on GitHub is an open source project called Markup which is accepting contributions.

Now if you’re like me and love to break software by trying different combinations of things, you might ask, “What happens if I add both a README.md and a README.creole or other markup language file?” It looks like the first readme file that got created wins (i.e. the readme that is displayed). If you delete the readme file being shown (e.g. README.creole as shown in my example) and you’ve already added a README.md file, the README.md file’s contents will be displayed.

How to view the diff of a markdown (.md) file as its rendered content – 031

When you’re viewing changes to a markdown file, you have the option to compare the rendered versions in the diff view.

Let’s say you wanted to view the diff of my latest commit to my README.md in my random-example repo. By default you are looking at the raw markdown contents, i.e. the “source diff.”

viewing latest diff of readme as source

But suppose you wanted to view the actual rendered markdown file as a diff. Click on the Display the Rich Diff button located in the upper right.

Display the rich diff button in upper right

Now you’ll see the diff of the README.md file as a rendered file.

display the diff of README.md as a rendered file

How to have the preview render markdown instead of plain text – #005

Sometimes I’ll create a new file, but the Preview doesn’t render the markdown and shows everything in plain text instead. And I’m left scratching my head :confused:

current-status file being edited with REM lyrics but markdown not rendering

If you find yourself in this situation, look at the file extension for your new file (or lack thereof).

current-status not having a file extension

Simply add a `.md` to your filename, and now your Preview will work!

preview now rendering markdown text

BTW if you get a “can’t edit” icon when you try to add the `.md` to the filename,

red no icon when trying to edit filename in preview mode

this is is because you are still in Preview mode. Click on the Edit new file tab to the left of the Preview and you’ll be able to edit the filename.

And Lenny Bruce is not afraid.