Question

I am using the 'Automatic Generator' of GitHub Pages, and I see it only generates a single index.html and other web resources.

How it works if I want to have a multi-page website generated from other markdown files?

Was it helpful?

Solution 3

You pull the generated page, make any modification and addition you like (including adding new pages and links between the pages), then commit and push.

The generated single page helps you to make you start. You can duplicate its layout to generate other similar-looking pages by hand.

See Help.

OTHER TIPS

You can get github to generate .html files from .markdown files by ensuring the top of the .markdown starts with the ---- block like this:

---
title: This will be used as the title-tag of the page head
---

hello
=====

**You are here!**

Found this here: http://xlson.com/2010/11/09/getting-started-with-github-pages.html

Github will automatically create pages for you, if you include the markdown file.

  • index.html - yourname.github.io/project-name/
  • about.md - yourname.github.io/project-name/about
  • foo.md - yourname.github.io/project-name/foo

Tested this and working.

If you want to get into the really fun stuff - you need to get into Jekyll http://jekyllrb.com/

Github Pages uses the Jekyll site generator which suports converting any number of markdown files to HTML for you, and applying the surrounding template via a layout file. See github's documentation on using Jekyll: https://help.github.com/articles/using-jekyll-with-pages

The trick is that you have to download a jekyll template/theme and include it in your gh-pages branch on your own (standard jekyll configuration), instead of just allowing Github Pages to auto-generate the one file using its own built-in themes.

  • GitHub Pages' automatic generator only generates one page.
  • You can add the new file directly, github page publishes all data (including data inside the subfolders) for you.

Just made gh-pages-generator - the utility to generate site with the navigation from multiple markdown files having links to each other.

"Github pages" hosts web page from index.md / readme.md as main page . However if you have an index.html file then it'll be hosted from html file.However , if you are trying to host a multi page website using "Jekyll themes" then Jekyll theme is not straightaway deployed in subsidiary pages .

Case 1) You are using markdowns to host your pages index.md -> main page page1.md -> page 1 of your website .. so on

To generate a multiple page website using github page just give relative path to the required page without extension i.e. make a button

<a href="./page1">Go to next page</a>

And by clicking on this button you will be directed to page1 with jekyll theme deployed

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top