Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to create simple 2-page site using 2 markdown files in github pages?

Tags:

github-pages

I am trying to make a very simple site in github pages that will only have two pages: a homepage and an about page.

I would like each of these pages to be generated from markdown files.

The homepage is easy, I just put the homepage markdown in README.md and it shows up at myusername.github.io

Is there a simple way to add a second markdown page?

I understand github pages uses jekyll and I can do this by creating an entire jekyll blog, but that seems like overkill for what I want to do. What's the simplest way to add a markdown file to the github repo and have a working url to a rendering of it.

This is not a blog. There will never be more than these two pages

like image 749
quantumbutterfly Avatar asked May 22 '18 19:05

quantumbutterfly


2 Answers

One can create Multiple .MD Pages on GH-Pages

  1. Create a new file about.md
  2. At the top of this file, add the following:
---
title: ABOUT PAGE
layout: template
filename: about.md
--- 
  1. Link this about.md in our Readme.md file using:
Go to [about page](about.md)
  1. Commit your changes and push them to the gh-pages branch

Now, when you go to YOURGITHUBNAME.github.io/YOURPROJECTNAME/about.md, you should see the contents of your about.md formatted with the theme that you chose.

like image 117
Amit Pathak Avatar answered Oct 14 '22 04:10

Amit Pathak


I solved the issue.

The key is to include this at the top of the about markdown

---
title: Title
---

This helps github pages know the page is a markdown file that needs to be rendered.

The about page can be placed in the repo in an about.md file, and linked to from the main README.md file

like image 31
quantumbutterfly Avatar answered Oct 14 '22 03:10

quantumbutterfly