Getting Started with GitHub Pages

GitHub Pages allow you to generate a website for yourself, an organization or a project based on markdown files stored in a repository. Pages is based on Jekyll and comes with a couple standard themes. Jekyll creates static pages so there is no need to update a database or anything. It’s extremely easy to get up and running with pages. You just need to setup which branch or folder to generate the website from and you’re up and running.

Markdown Files

Pages are just markdown files. Your readme.md will be your homepage unless you use an index.html. Other pages can be generated from additional markdown files. In the CodeConverter.NET SDK repository, I have two markdown files.

Markdown files

Since I’ve configured my repository for GitHub Pages, these documents are rendered as static HTML pages. The readme.md is the index while the language-tests.md becomes the following URL: https://codeconverter.github.io/sdk/language-tests

Generating Pages

There isn’t anything novel going on here. I’m using a StringBuilder to put together the contents of a markdown page while my tests execute. As each test cases passes, I append a section of markdown that lists the test description, source code and target code after the conversion.

The result is a markdown file containing all my test results.

If you want to see the result and follow the progress of the CodeConverter.SDK, visit the Language Conversion Tests page. All the source code for this is available on GitHub.