Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

GitHub Pages: How do I edit this page in markdown format, just as I created it?

I'm not too comfortable with touching the generated HTML that the site gives, I was wondering whether there is any way to change the contents of my page in markdown formatting, the same way that I did upon creating the page?

Any input as to go about doing this would be awesome.

like image 639
Louis93 Avatar asked Feb 23 '13 19:02

Louis93


People also ask

How do I Markdown a page in GitHub?

Just create a new repository on GitHub, commit the Markdown files, and enable the GitHub Pages feature. GitHub Pages uses the Jekyll static site generator to create your website, and the Markdown support is excellent.

How do I edit an MD file?

How to edit a README.md file: Open the project editor and make sure that the README.md file is selected in the file view on the left. At the top of the editing pane, click the EDIT MARKDOWN button to reveal edit mode for the file. Now you can start typing directly in the file.

How do I change a Markdown in GitHub?

Editing on GitHub Note there is an “Edit” button above the display. Clicking on this button opens the file in an in-browser editor (Ace Editor) where you can edit your Markdown source.


Video Answer


1 Answers

By default, GitHub Pages helps you generate html pages only.

But if you setup your site to use jekyll, then you can store files in markdown. For example, in the _posts section of this repo 'cboettig/labnotebook' which is generated to carlboettiger.info.

See Help page "Using Jekyll with Pages"

More specifically (as highlighted in esfandia's answer), see "The Automatic Page Generator", which allows for markdown editing.

https://help.github.com/assets/images/help/pages/pages-automatic-page-generator.png

As commented by dregad, there is a new theme chooser in Dec. 2016:

https://cloud.githubusercontent.com/assets/849592/21229008/24006df6-c2ae-11e6-94a4-ca4eb085f5f4.png

See this article by Antriksh Yadav:

http://antrikshy.com/assets/github-page-generator-edit.png


Update August 2016: Simpler GitHub Pages publishing now allows to keep your page files in a subfolder of the same branch (no more gh-pages needed):

Now you can select a source in your repository settings and GitHub Pages will look for your content there.

So you don't need multiple branch anymore.

like image 164
VonC Avatar answered Sep 22 '22 18:09

VonC