How to Add Your Own Page to Our Website

January 30, 2015

This guide assumes that you already have a Github account, and that you have setup git previously on your local machine.

Get your own copy of the repository to start making changes.

  1. Go to the repository on Github.

  2. Click on the fork button on the top right. If you have multiple organizations, select which one will be the owner of this fork.

  3. At the command line of your local machine: git clone git@github.com:my_user_name/wisconsin.git (be sure to use your own Github username in place of my_user_name)

  4. Change directories into the repo: cd wisconsin

  5. In order to practice good habits with git, let’s make a branch for these changes: git checkout -b my_new_topic

Copy the Template to Start Your New Post

  1. The _drafts directory has a useful template from which to start: cp _drafts/YYYY-MM-DD-subject.md _posts/<YYYY-MM-DD-topic>.md

  2. Be sure to replace <YYYY-MM-DD-topic> with the year, month, date and title of your topic. For example, this page is 2015-01-30-add-your-own-page.

Write Your Content

This is where the fun begins!

Metadata

Our website is being processed and formatted by the jekyll processing tool. This means that some metadata is available for each page. This metadata is available to use in your page by placing it inside double curly braces like this: {{ some.metadata }}.

Some of this metadata comes from the configuration for the whole site. For example, you can access {{ site.url }} as the base URL for the site: http://thehackerwithin.github.com/wisconsin

There is also metadata that you can set for this page by changing the entries that you see at the top of the template:

---
layout: post
title: Insert your title here
author: Insert your name(s) here
category: upcoming
tags: choose some keywords as tags
---

These metadata do the following:

Formatting

In addition to this metadata, you can format the text using some very simple command. Our standard template is using a flavor of markdown to apply formatting. Markdown is intended to be a very natural and concise way to apply very simple formatting to text.

Here are some basics:


Headers are automatically bold
col 3 is right justified

(The format of the table will depend on the stylesheet.)

Feel free to consult previous posts to get some clues for other useful markdown.

Add and Commit Your Changes

You can do this frequently as you make changes.

Testing Your Changes

You can test your changes locally if you have installed jekyll locally. This means you won’t have to push the changes to Github to see how they look. I’ll leave many of the details to the jekyll documentation. Once you have jekyll installed, it is very useful to use it in server mode (serve) and have it constantly watch (-w) for changing files. In addition, we have provided a special config file (_config_dev.yml) that will set some site metadata to be good choices for local testing.

jekyll serve --config _config_dev.yml -w

Push Your Branch and Create a Pull Request

  1. When your page is ready to be published, you can push it to your clone of the repository: git push origin my_new_topic.

  2. Go to your clone of the repository on Github

  3. Initiate a pull request agains the gh-pages branch of the upstream repository.

  4. Wait for it to be approved!

Presenter: Paul Wilson

Paul Wilson is a nuclear engineering professor in the Engineering Physics department and has long been inspiring students to awaken the hacker within.

Attending

## <+ notes +>

Lightning Talks

<+ person +> : <+ topic +>

<+ person +> : <+ topic +>

Share

Discuss

comments powered by Disqus