There are 3 steps to adding a new page to the Trench website.
- Create a new file in the
_pages
directory with the template<pagename>.md
. - Copy and paste the following into the top of your new file, substituting all placeholders for the particular information for the new page:
---
permalink: <<insert permalink, like /people or /tools. this is optional, you can delete this line>>
title: <<insert title>>
author_profile: true
layout: single
header:
overlay_image: assets/images/ashcroft.jpg
---
- Place the page's content as markdown-formatted text below the above content.
When you git add _pages/<newfile.md>
and commit and push, the page will be live at http://trenchproject.github.io/<<pagename>>.html
or at /<<permalink
, depending on whether you set a permalink.
The process is similar for blog posts.
- Create a new file in the
_posts
directory with the filenameYYYY-MM-DD-title-of-post.md
. - Copy and paste the following into the top of your new file, substituting all placeholders for the particular information for the new page:
---
title: <<insert title>>
excerpt: <<optional short description of the post>>
---
- Below that content, write the post as markdown-formatted text.
Adding, committing, and pushing the above file to the repository will add the post to the list of posts at http://trenchproject.github.io/news
, and the post will be accessible at /news/post-title
.