How to use GitHub pages

GitHub pages is an easy way to host and set up a website, especially for projects. I am using it for our high-performance graph domain specific language, GraphIt.

Table of Contents

  • direct a domain to a github pages
  • set up a github pages
  • trouble shooting some issues
  • Create the webpage and view it locally
  • Edit the pages layout
  • Link Papers
  • Set up fowarding
  • Edit the links on the side of the page

Direct a domain to a github page

Register for a domain using namecheap or some other provider. And then direct the A Record to github ip address 185.199.108.153 or some other address (https://www.namecheap.com/support/knowledgebase/article.aspx/9645/2208/how-do-i-link-my-domain-to-github-pages).

Just set up the CNAME to point to the github page link.

Set up Github Pages

There are two types of pages, there are

(1) personal or organizational pages. In this case, the repository has to be created with USER_NAME.github.io. Usually there needs to be just a main branch

(2) project page, this one needs to be gh-page branch of the project branch.

trouble shooting some issues

If the page is down unexpectedly, but you think it should work fine. Just update something in the repository, and it would kick start a rebuild process of the page. That can often fix some issues.

Create the webpage and view it

First, a brief intro here (https://pages.github.com/)

Once you set up your own directory, you can access the website at

username.github.io

After you set up bundle, GEM file … ( follow the instructions here https://help.github.com/articles/setting-up-your-github-pages-site-locally-with-jekyll/). I think it is recommended not to use sudo access for the installation of Jekyll, but I did it anyways due to some permission errors. It seems to work fine.

You can then test it on your local mac using

bundle exec jekyll serve

Edit the pages layout

(for the “minimal” template https://github.com/pages-themes/minimal)

Each page share a single layout file. It is possible to edit the size of certain html elements or bounding boxes by simply editing the layout file under _layouts directory.

To edit the text, simply edit the markdown file for each page.

You can use the following to generate a table of contents

{:.no_toc}

* auto-gen TOC:

{:toc}

To link papers

Create subdirectory called _data with a file named paper.yml, and create a entry like the following

graphit:

  authors:

    – xxx

  link: https://arxiv.org/abs/xxx.yyy

Then you can add the following to the page

**GraphIt- A High-Performance DSL for Graph Analytics** &nbsp; [[arxiv]]({{site.data.papers.graphit.link}})  <br/>

 

Set up fowarding

create a CNAME file. For example, I have graphit-lang.org in the file

Edit the links on the side of the page

look for layouts in the _layouts directory. There is a post.html

 

 

Advertisements
This entry was posted in Uncategorized. Bookmark the permalink.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s