Giter Site home page Giter Site logo

nicolas-van / easy-markdown-to-github-pages Goto Github PK

View Code? Open in Web Editor NEW
97.0 3.0 157.0 451 KB

Convert Markdown files in Github to a full website using Github Pages

Home Page: https://nicolas-van.github.io/easy-markdown-to-github-pages/

License: MIT License

markdown jekyll github-pages

easy-markdown-to-github-pages's Introduction

Easy Markdown to Github Pages

Introduction

This little guide demonstrates how to turn any Github repository with a bunch of Markdown files into a simple website using Github Pages and Jekyll.

  • 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:

Step by step instructions

Determine the repository where you want to activate Github Pages

You can of course create a new repository if you want.

Create the _config.yml file

That file should be created on the root of your repository. Here is some content to copy-paste in it:

plugins:
  - jekyll-relative-links
relative_links:
  enabled: true
  collections: true
include:
  - 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.

Activate Github Pages in your repository configuration

On the Github page of your project go into Settings > Options > Github Pages:

In the Source option, select master branch then Save:

You must also choose a theme:

That's it! Now you can just use the link provided by Github to access your website:

Usage guide

  • 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 a README.md file. If both exists the index.md file has priority.
  • You should be able to use any Github Flavored Markdown.

Known differences between Github and Github Pages

  • 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.

Recipes

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 to you some delicious recipes instead:

Other Github Pages related projects

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:

Contributing

See the Contribution Guide.

License

See the License File.

easy-markdown-to-github-pages's People

Contributors

0xbooper avatar hugetim avatar nicolas-van avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

easy-markdown-to-github-pages's Issues

Thank you

Thank you! This repo really helped me as I was struggling with this issue for quite some time today. This is a very neat way of correctly rendering the docs on both Github as well as gh-pages!

Is there some input errors in your README.md?

Is there some input errors in your README.md?

emm,,, I wanna ask you, in your README.md, here, you write,


Create the _.config.yml file

That file should be created ,,,,


you say _.config.yml, but I find out that is _config.yml in your root repository.

Is there some input errors?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.