- Notifications
You must be signed in to change notification settings - Fork0
Convert Markdown files in Github to a full website using Github Pages
License
AvinashKSingh018/easy-markdown-to-github-pages
Folders and files
Name | Name | Last commit message | Last commit date | |
---|---|---|---|---|
Repository files navigation
This little guide demonstrate how to turn anyGithub repository with a bunch ofMarkdown files into a simple website usingGithub Pages andJekyll.
- 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:
You can of course create a new repository if you want.
That file should be created on the root of your repository. Here is some content to copy-paste in it:
plugins: - jekyll-relative-linksrelative_links: enabled: true collections: trueinclude: - CONTRIBUTING.md - README.md - LICENSE.md - COPYING.md - CODE_OF_CONDUCT.md - CONTRIBUTING.md - ISSUE_TEMPLATE.md - PULL_REQUEST_TEMPLATE.md
It's basically just a few tuning of Github Pages' default configuration to have a better handling of Markdown files.
On the Github page of your project go intoSettings > Options > Github Pages
:
In theSource
option, selectmaster branch
thenSave
:
You must also choose a theme:
That's it! Now you can juste use the link provided by Github to access you website:
- 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 aREADME.md
file. If both exists theindex.md
file has priority. - You should be able to use anyGithub Flavored Markdown.
- 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.
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:
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:
See theContribution Guide.
See theLicense File.
About
Convert Markdown files in Github to a full website using Github Pages
Resources
License
Uh oh!
There was an error while loading.Please reload this page.