Github Readme Markdown



A template for Github READMEs (Markdown) + Sublime Snippet GitHub Instantly share code, notes, and snippets. I'm struggling to add empty spaces before the string starts to make my GitHub README.md looks something like this: Right now it looks like this: I tried adding tag to fix the new string start, now it works, but I don't understand how to add spaces before the string starts without changing everything to  . Markdown files are rendered by github.com website through the use of the Ruby Redcarpet library. Redcarpet exposes some extensions (such as strikethrough, for instance) which are not part of standard Markdown syntax and provide additional 'features'.

Introduction

This little guide demonstrate how to turn any Github repository with a bunch of Markdown files into a simple website using Github Pages and Jekyll.

  • You don’t need to use the command line or anything other than your browser.
  • It doesn’t require any knowledge in Jekyll.
  • It’s completely compatible with any bunch of markdown files you already have in any existing repository without any modification to those files. That includes the basic README.md almost all repositories contain.
  • The markdown files will remain just as readable and usable in Github than in your website.

In fact this guide uses the same configuration and can be read both in Github and in Github Pages, at your preference:

Step by step instructions

Determine the repository where you want to activate Github Pages

You can of course create a new repository if you want.

Create the _config.yml file

Github Readme Markdown

That file should be created on the root of your repository. Here is some content to copy-paste in it:

It’s basically just a few tuning of Github Pages’ default configuration to have a better handling of Markdown files.

Activate Github Pages in your repository configuration

On the Github page of your project go into Settings > Options > Github Pages:

In the Source option, select master branch then Save:

You must also choose a theme:

That’s it! Now you can juste use the link provided by Github to access you website:

Usage guide

  • Any markdown file in your repository will display in your Github Pages website. You just have to use the same path to access it and replace the .md extension by .html.
  • To make links between your Markdown files just use a relative path to the other Markdown file. The configuration you copy pasted in your _config.yml provides a plugin to convert those URLs. So your Markdown files will have correct links both in Github and Github Pages.
  • The index page of your website can be a index.md file or a README.md file. If both exists the index.md file has priority.
  • You should be able to use any Github Flavored Markdown.

Known differences between Github and Github Pages

  • No automatic links with Github Pages. The Github Markdown renderer can automatically detect a simple copy-pasted link and make it a clickable link. Github Pages doesn’t propose a feature to reproduce that behavior, so you’ll have to braces your links with the []() syntax.

Recipes

Since the purpose of this guide is to demonstrate how to publish multiple Markdown files as a website but I don’t have much more to say I will propose you some delicious recipes instead:

Readme File Github

Github readme markdown free

Other Github Pages related projects

Github

I’m a fan of Github Pages for the possibilities it offers to anyone to publish a website for free. I have multiple projects that could be of interest if that’s your case too:

Contributing

See the Contribution Guide.

License

See the License File.

In this tutorial, we are going to learn about two different ways to add images to the GitHub README.md file.

First way

  1. Open your GitHub repository and navigate to the images folder or the folder where your images are placed.
  1. Click on the image you need to add to your README.md file.
  2. Now, right-click on the image and select copy image address option.
  1. At final, open your README.md file and use below markdown syntax to add an image.

In the above syntax, you need to add your copied image address inside parenthesis ().

Github Readme Markdown

Second way

  1. Open your GitHub repository and click on the Issues tab.
  1. Now, click on the New Issue button and drag and drop your image inside Leave a comment box.

Github Readme Markdown Online Editor

  1. Once the image is successfully uploaded you will get a markdown image syntax, just copy and paste it inside your README.md file.