6
votes

I intend to publish articles on my user page in github. I want to write my articles as markdown files and push them to a branch in my user.github.io repo and let github automatically generate HTML files for me without having to use a tool like Jekyll . Can it be done ? If so how can I do it ? I pushed a index.markdown files to gh-pages branch but couldnt find any auto-generated html files.

1
Can you post a a link to your repo? - Beni Cherniavsky-Paskin
That's a user page, so use the master branch (gh-pages branch is only used for project pages). It seems your markdown file must start with YAML front matter to be processed. - Beni Cherniavsky-Paskin

1 Answers

3
votes

No, you need to generate your html pages from your markdown code, as a static site, in order for your GitHub domain to display said html pages.

One easy way to generate such a site is through the go-based (go=golang) framework Hugo (GitHub site: https://github.com/spf13/hugo).
That means you need to install "other tools" locally to generate those pages from your markdown sources.

The Hugo documentation site itself is generated by Hugo, and published on a project page.

See also the GitHub help page "Creating Project Pages manually", to add your own html pages in the gh-pages branch of your repo.


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 now you can generate your files in a subfolder of your main branch.