Editing your content with Markdown and YAML Front-matter
The Kelly Shires Breast Cancer Foundation Website uses a Content Management System called Grav. Unlike most Content Management Systems, Grav does not need a database to work, all the content for the site is kept in plain text files with the extension .md. MD stands for MarkDown. Markdown is a simplified way of writing content for the Internet. You can write in plain text without a lot of toolbars and buttons to get you into trouble.
The reason your old site become so cluttered looking is because you are presented with too many options and the online editors do a poor job of creating the HTML that would make the site look and perform properly.
Structured content
With this new site, I (as the developer) have implemented all the design decisions leaving you (the content editor) with very little room to make poor design choices. You will find it very hard to make large bold pink lettering in Comic Sans font. With this site most of the content is in place and I don't expect you to be adding new sections but you need to learn where the structured content is and how to edit it.
Grav File Structure
<p>Check out the image below to see where your files are located. <br>
<a rel="lightbox" data-width="600" data-height="400" href="/images/d/4/1/2/f/d412fd058a2315b57e038cbf5d48b52219bc3855-files.jpg"><img alt="File Structure" src="/images/5/7/e/5/2/57e52d59b0e0169ba38a061a44fc1e76aedb5dd6-files.jpg" /></a></p>
<p>The only place you need to familiarize yourself with is the <code>user\pages\01.home</code> folder. Inside that folder you will find a series of folders that start with an underscore character. <code>_showcase, _donate, _shop etc.</code> Each of these folders contains an <code>.md</code> file. These <code>.md</code> files contain two things: <strong>Structured data</strong> and written text using <strong>Markdown</strong> which sometimes needs bit of html code.</p>
<p>You will find different file names for the <code>.md</code> files. For the <code>_showcase</code> folder you will find <code>showcase.md</code>. The name of the file tells the CMS what template to use. In this example, the showcase template contains all the complicated code that makes the showcase function. The showcase is the large slide show at the top of the site.</p>
<p>The top of your <code>.md</code> file contains structured data called <strong>Front-matter</strong>. It is easy to make mistakes in here so be careful. Front-matter starts after the first three dashes <code>---</code> and ends after the second set of three dashes <code>---</code>. </p>
<pre><code>---
title: Name of this section
menu: What will show in the menu
class: title-section
uniqueid: ass
bgclass: whitebg
---</code></pre>
<p>The example shown above is the front matter of a simple page. The only thing you may want to change there is the <strong>title</strong>.</p>
<pre><code>---
title: Showcase
menu: Home
class: title-section text-center
slides:
- image: banner1.jpg
heading: "Helping Breast Cancer Survivors since 2002"
subheading: "And having a good time doing so."
- image: banner2.jpg
heading: "Ladies - please join us at our next event"
subheading: "Snowmobile rides, four wheeler rides, golf tournaments"
- image: banner3.jpg
heading: "Assistance is available"
subheading: "We provide assistance to women to help with the expenses of having breast cancer"
- image: banner4.jpg
heading: "Assistance is available"
subheading: "We provide assistance to women to help with the expenses of having breast cancer"
highlight:
- header: Get assistance
text: "The Snow Run for Fun Trust was established to help women who have been recently diagnosed with Breast Cancer. There are many unforseen expenses you may face, and which your health insurance program may not cover."
icon: life-saver
url: assistance
- header: Make a donation
text: "We rely on your generousity to help make the lives of breast cancer patients less challenging."
icon: money
url: donate
- header: Fundraising events
text: "The Snow Run was formed out of a passion for snowmobiling, and an equal passion for helping women who truly needed help in a time of need."
icon: heart-o
url: events
- header: Merchandise
text: "Shop for the cause... Support breast cancer survivors by purchasing items that we have had designed especially for our foundation."
icon: shopping-cart
url: shop
---
# Offering financial assistance to breast cancer patients
<span></span></code></pre>
<p>What you are seeing above is the contents of the actual <code>showcase.md</code> file. As you see, all the content that makes the top of the website work is contained in Front-matter. I know the words in there are not correct, so this is all you need to edit to fix it up. But <strong>BE CAREFUL</strong> if you put a space in the wrong place, the site will go down. Always test your changes before hitting the publish button.</p>
What is Markdown?
<p><strong>Markdown</strong> is plain text that gets parsed by the CMS and converted into HTML. HTML is what is used to display content on a web page. Everything below the second <code>---</code>three dashes is where your Markdown will go.</p>
<p>So take what we have so far on this page:</p>
<pre><code>---
title: What is Markdown?
---
**Markdown** is plain text that gets parsed by the CMS and converted into HTML. HTML is what is used to display content on a web page. Everything below the second `---`three dashes is where your Markdown will go.
So take what we have so far on this page:</code></pre>
<p><em>Above is what is making this page up until this point. Below is a full description of what it is and why we use it.</em></p>
<p>Let's face it: Writing content for the Web is tiresome. WYSIWYG editors help alleviate this task, but they generally result in horrible code, or worse yet, ugly web pages.</p>
<p><strong>Markdown</strong> is a better way to write <strong>HTML</strong>, without all the complexities and ugliness that usually accompanies it.</p>
<p>Some of the key benefits are:</p>
<ol>
<li>Markdown is simple to learn, with minimal extra characters so it's also quicker to write content.</li>
<li>Less chance of errors when writing in markdown.</li>
<li>Produces valid XHTML output.</li>
<li>Keeps the content and the visual display separate, so you cannot mess up the look of your site.</li>
<li>Write in any text editor or Markdown application you like.</li>
<li>Markdown is a joy to use!</li>
</ol>
<p>John Gruber, the author of Markdown, puts it like this:</p>
<blockquote>
<p>The overriding design goal for Markdown’s formatting syntax is to make it as readable as possible. The idea is that a Markdown-formatted document should be publishable as-is, as plain text, without looking like it’s been marked up with tags or formatting instructions. While Markdown’s syntax has been influenced by several existing text-to-HTML filters, the single biggest source of inspiration for Markdown’s syntax is the format of plain text email.
-- <cite>John Gruber</cite></p>
</blockquote>
<p>Without further delay, let us go over the main elements of Markdown and what the resulting HTML looks like:</p>
<h2>Headings</h2>
<p>Headings from <code>h1</code> through <code>h6</code> are constructed with a <code>#</code> for each level:</p>
<pre><code class="language-markdown"># h1 Heading
## h2 Heading
### h3 Heading
#### h4 Heading
##### h5 Heading
###### h6 Heading</code></pre>
<p>Renders to:</p>
<h1>h1 Heading</h1>
<h2>h2 Heading</h2>
<h3>h3 Heading</h3>
<h4>h4 Heading</h4>
<h5>h5 Heading</h5>
<h6>h6 Heading</h6>
<p>HTML:</p>
<pre><code class="language-html"><h1>h1 Heading</h1>
<h2>h2 Heading</h2>
<h3>h3 Heading</h3>
<h4>h4 Heading</h4>
<h5>h5 Heading</h5>
<h6>h6 Heading</h6></code></pre>
<p><br>
<br></p>
<h2>Horizontal Rules</h2>
<p>The HTML <code><hr></code> element is for creating a "thematic break" between paragraph-level elements. In markdown, you can create a <code><hr></code> with any of the following:</p>
<ul>
<li><code>___</code>: three consecutive underscores</li>
<li><code>---</code>: three consecutive dashes</li>
<li><code>***</code>: three consecutive asterisks</li>
</ul>
<p>renders to:</p>
<hr />
<hr />
<hr />
<p><br>
<br></p>
<h2>Body Copy</h2>
<p>Body copy written as normal, plain text will be wrapped with <code><p></p></code> tags in the rendered HTML.</p>
<p>So this body copy:</p>
<pre><code class="language-markdown">Lorem ipsum dolor sit amet, graecis denique ei vel, at duo primis mandamus. Et legere ocurreret pri, animal tacimates complectitur ad cum. Cu eum inermis inimicus efficiendi. Labore officiis his ex, soluta officiis concludaturque ei qui, vide sensibus vim ad.</code></pre>
<p>renders to this HTML:</p>
<pre><code class="language-html"><p>Lorem ipsum dolor sit amet, graecis denique ei vel, at duo primis mandamus. Et legere ocurreret pri, animal tacimates complectitur ad cum. Cu eum inermis inimicus efficiendi. Labore officiis his ex, soluta officiis concludaturque ei qui, vide sensibus vim ad.</p></code></pre>
<p><br>
<br></p>
<h2>Emphasis</h2>
<h3>Bold</h3>
<p>For emphasizing a snippet of text with a heavier font-weight.</p>
<p>The following snippet of text is <strong>rendered as bold text</strong>.</p>
<pre><code class="language-markdown">**rendered as bold text**</code></pre>
<p>renders to:</p>
<p><strong>rendered as bold text</strong></p>
<p>and this HTML</p>
<pre><code class="language-html"><strong>rendered as bold text</strong></code></pre>
<h3>Italics</h3>
<p>For emphasizing a snippet of text with italics.</p>
<p>The following snippet of text is <em>rendered as italicized text</em>.</p>
<pre><code class="language-markdown">_rendered as italicized text_</code></pre>
<p>renders to:</p>
<p><em>rendered as italicized text</em></p>
<p>and this HTML:</p>
<pre><code class="language-html"><em>rendered as italicized text</em></code></pre>
<h3>strikethrough</h3>
<p>In GFM (GitHub flavored Markdown) you can do strikethroughs.</p>
<pre><code class="language-markdown">~~Strike through this text.~~</code></pre>
<p>Which renders to:</p>
<p><del>Strike through this text.</del></p>
<p>HTML:</p>
<pre><code class="language-html"><del>Strike through this text.</del></code></pre>
<p><br>
<br></p>
<h2>Blockquotes</h2>
<p>For quoting blocks of content from another source within your document.</p>
<p>Add <code>></code> before any text you want to quote.</p>
<pre><code class="language-markdown">> **Fusion Drive** combines a hard drive with a flash storage (solid-state drive) and presents it as a single logical volume with the space of both drives combined.</code></pre>
<p>Renders to:</p>
<blockquote>
<p><strong>Fusion Drive</strong> combines a hard drive with a flash storage (solid-state drive) and presents it as a single logical volume with the space of both drives combined.</p>
</blockquote>
<p>and this HTML:</p>
<pre><code class="language-html"><blockquote>
<p><strong>Fusion Drive</strong> combines a hard drive with a flash storage (solid-state drive) and presents it as a single logical volume with the space of both drives combined.</p>
</blockquote></code></pre>
<p>Blockquotes can also be nested:</p>
<pre><code class="language-markdown">> Donec massa lacus, ultricies a ullamcorper in, fermentum sed augue.
Nunc augue augue, aliquam non hendrerit ac, commodo vel nisi.
>> Sed adipiscing elit vitae augue consectetur a gravida nunc vehicula. Donec auctor
odio non est accumsan facilisis. Aliquam id turpis in dolor tincidunt mollis ac eu diam.</code></pre>
<p>Renders to:</p>
<blockquote>
<p>Donec massa lacus, ultricies a ullamcorper in, fermentum sed augue.
Nunc augue augue, aliquam non hendrerit ac, commodo vel nisi.</p>
<blockquote>
<p>Sed adipiscing elit vitae augue consectetur a gravida nunc vehicula. Donec auctor
odio non est accumsan facilisis. Aliquam id turpis in dolor tincidunt mollis ac eu diam.</p>
</blockquote>
</blockquote>
<p><br>
<br></p>
<h2>Lists</h2>
<h3>Unordered</h3>
<p>A list of items in which the order of the items does not explicitly matter.</p>
<p>You may use any of the following symbols to denote bullets for each list item:</p>
<pre><code class="language-markdown">* valid bullet
- valid bullet
+ valid bullet</code></pre>
<p>For example</p>
<pre><code class="language-markdown">+ Lorem ipsum dolor sit amet
+ Consectetur adipiscing elit
+ Integer molestie lorem at massa
+ Facilisis in pretium nisl aliquet
+ Nulla volutpat aliquam velit
- Phasellus iaculis neque
- Purus sodales ultricies
- Vestibulum laoreet porttitor sem
- Ac tristique libero volutpat at
+ Faucibus porta lacus fringilla vel
+ Aenean sit amet erat nunc
+ Eget porttitor lorem</code></pre>
<p>Renders to:</p>
<ul>
<li>Lorem ipsum dolor sit amet</li>
<li>Consectetur adipiscing elit</li>
<li>Integer molestie lorem at massa</li>
<li>Facilisis in pretium nisl aliquet</li>
<li>Nulla volutpat aliquam velit
<ul>
<li>Phasellus iaculis neque</li>
<li>Purus sodales ultricies</li>
<li>Vestibulum laoreet porttitor sem</li>
<li>Ac tristique libero volutpat at</li>
</ul></li>
<li>Faucibus porta lacus fringilla vel</li>
<li>Aenean sit amet erat nunc</li>
<li>Eget porttitor lorem</li>
</ul>
<p>And this HTML</p>
<pre><code class="language-html"><ul>
<li>Lorem ipsum dolor sit amet</li>
<li>Consectetur adipiscing elit</li>
<li>Integer molestie lorem at massa</li>
<li>Facilisis in pretium nisl aliquet</li>
<li>Nulla volutpat aliquam velit
<ul>
<li>Phasellus iaculis neque</li>
<li>Purus sodales ultricies</li>
<li>Vestibulum laoreet porttitor sem</li>
<li>Ac tristique libero volutpat at</li>
</ul>
</li>
<li>Faucibus porta lacus fringilla vel</li>
<li>Aenean sit amet erat nunc</li>
<li>Eget porttitor lorem</li>
</ul></code></pre>
<h3>Ordered</h3>
<p>A list of items in which the order of items does explicitly matter.</p>
<pre><code class="language-markdown">1. Lorem ipsum dolor sit amet
2. Consectetur adipiscing elit
3. Integer molestie lorem at massa
4. Facilisis in pretium nisl aliquet
5. Nulla volutpat aliquam velit
6. Faucibus porta lacus fringilla vel
7. Aenean sit amet erat nunc
8. Eget porttitor lorem</code></pre>
<p>Renders to:</p>
<ol>
<li>Lorem ipsum dolor sit amet</li>
<li>Consectetur adipiscing elit</li>
<li>Integer molestie lorem at massa</li>
<li>Facilisis in pretium nisl aliquet</li>
<li>Nulla volutpat aliquam velit</li>
<li>Faucibus porta lacus fringilla vel</li>
<li>Aenean sit amet erat nunc</li>
<li>Eget porttitor lorem</li>
</ol>
<p>And this HTML:</p>
<pre><code class="language-html"><ol>
<li>Lorem ipsum dolor sit amet</li>
<li>Consectetur adipiscing elit</li>
<li>Integer molestie lorem at massa</li>
<li>Facilisis in pretium nisl aliquet</li>
<li>Nulla volutpat aliquam velit</li>
<li>Faucibus porta lacus fringilla vel</li>
<li>Aenean sit amet erat nunc</li>
<li>Eget porttitor lorem</li>
</ol></code></pre>
<p><strong>TIP</strong>: If you just use <code>1.</code> for each number, Markdown will automatically number each item. For example:</p>
<pre><code class="language-markdown">1. Lorem ipsum dolor sit amet
1. Consectetur adipiscing elit
1. Integer molestie lorem at massa
1. Facilisis in pretium nisl aliquet
1. Nulla volutpat aliquam velit
1. Faucibus porta lacus fringilla vel
1. Aenean sit amet erat nunc
1. Eget porttitor lorem</code></pre>
<p>Renders to:</p>
<ol>
<li>Lorem ipsum dolor sit amet</li>
<li>Consectetur adipiscing elit</li>
<li>Integer molestie lorem at massa</li>
<li>Facilisis in pretium nisl aliquet</li>
<li>Nulla volutpat aliquam velit</li>
<li>Faucibus porta lacus fringilla vel</li>
<li>Aenean sit amet erat nunc</li>
<li>Eget porttitor lorem</li>
</ol>
<p><br>
<br></p>
<h2>Code</h2>
<h3>Inline code</h3>
<p>Wrap inline snippets of code with <code>`</code>.</p>
<pre><code class="language-markdown">In this example, `<section></section>` should be wrapped as **code**.</code></pre>
<p>Renders to:</p>
<p>In this example, <code><section></section></code> should be wrapped with <strong>code</strong>.</p>
<p>HTML:</p>
<pre><code class="language-html"><p>In this example, <code>&lt;section&gt;&lt;/section&gt;</code> should be wrapped with <strong>code</strong>.</p></code></pre>
<h3>Indented code</h3>
<p>Or indent several lines of code by at least four spaces, as in:</p>
<pre>
// Some comments
line 1 of code
line 2 of code
line 3 of code
</pre>
<p>Renders to:</p>
<pre><code>// Some comments
line 1 of code
line 2 of code
line 3 of code</code></pre>
<p>HTML:</p>
<pre><code class="language-html"><pre>
<code>
// Some comments
line 1 of code
line 2 of code
line 3 of code
</code>
</pre></code></pre>
<h3>Block code "fences"</h3>
<p>Use "fences" <code>```</code> to block in multiple lines of code.</p>
<pre>
``` markup
Sample text here...
```
</pre>
<pre><code>Sample text here...</code></pre>
<p>HTML:</p>
<pre><code class="language-html"><pre>
<code>Sample text here...</code>
</pre></code></pre>
<p><br>
<br></p>
<h2>Tables</h2>
<p>Tables are created by adding pipes as dividers between each cell, and by adding a line of dashes (also separated by bars) beneath the header. Note that the pipes do not need to be vertically aligned.</p>
<pre><code class="language-markdown">| Option | Description |
| ------ | ----------- |
| data | path to data files to supply the data that will be passed into templates. |
| engine | engine to be used for processing templates. Handlebars is the default. |
| ext | extension to be used for dest files. |</code></pre>
<p>Renders to:</p>
<table>
<thead>
<tr>
<th>Option</th>
<th>Description</th>
</tr>
</thead>
<tbody>
<tr>
<td>data</td>
<td>path to data files to supply the data that will be passed into templates.</td>
</tr>
<tr>
<td>engine</td>
<td>engine to be used for processing templates. Handlebars is the default.</td>
</tr>
<tr>
<td>ext</td>
<td>extension to be used for dest files.</td>
</tr>
</tbody>
</table>
<p>And this HTML:</p>
<pre><code class="language-html"><table>
<tr>
<th>Option</th>
<th>Description</th>
</tr>
<tr>
<td>data</td>
<td>path to data files to supply the data that will be passed into templates.</td>
</tr>
<tr>
<td>engine</td>
<td>engine to be used for processing templates. Handlebars is the default.</td>
</tr>
<tr>
<td>ext</td>
<td>extension to be used for dest files.</td>
</tr>
</table></code></pre>
<h3>Right aligned text</h3>
<p>Adding a colon on the right side of the dashes below any heading will right align text for that column.</p>
<pre><code class="language-markdown">| Option | Description |
| ------:| -----------:|
| data | path to data files to supply the data that will be passed into templates. |
| engine | engine to be used for processing templates. Handlebars is the default. |
| ext | extension to be used for dest files. |</code></pre>
<table>
<thead>
<tr>
<th style="text-align: right;">Option</th>
<th style="text-align: right;">Description</th>
</tr>
</thead>
<tbody>
<tr>
<td style="text-align: right;">data</td>
<td style="text-align: right;">path to data files to supply the data that will be passed into templates.</td>
</tr>
<tr>
<td style="text-align: right;">engine</td>
<td style="text-align: right;">engine to be used for processing templates. Handlebars is the default.</td>
</tr>
<tr>
<td style="text-align: right;">ext</td>
<td style="text-align: right;">extension to be used for dest files.</td>
</tr>
</tbody>
</table>
<p><br>
<br>
<br></p>
<h2>Links</h2>
<h3>Basic link</h3>
<pre><code class="language-markdown">[Assemble](http://assemble.io)</code></pre>
<p>Renders to (hover over the link, there is no tooltip):</p>
<p><a href="http://assemble.io">Assemble</a></p>
<p>HTML:</p>
<pre><code class="language-html"><a href="http://assemble.io">Assemble</a></code></pre>
<h3>Add a title</h3>
<pre><code class="language-markdown">[Upstage](https://github.com/upstage/ "Visit Upstage!")</code></pre>
<p>Renders to (hover over the link, there should be a tooltip):</p>
<p><a href="https://github.com/upstage/" title="Visit Upstage!">Upstage</a></p>
<p>HTML:</p>
<pre><code class="language-html"><a href="https://github.com/upstage/" title="Visit Upstage!">Upstage</a></code></pre>
<h3>Named Anchors</h3>
<p>Named anchors enable you to jump to the specified anchor point on the same page. For example, each of these chapters:</p>
<pre><code class="language-markdown"># Table of Contents
* [Chapter 1](#chapter-1)
* [Chapter 2](#chapter-2)
* [Chapter 3](#chapter-3)</code></pre>
<p>will jump to these sections:</p>
<pre><code class="language-markdown">## Chapter 1 <a id="chapter-1"></a>
Content for chapter one.
## Chapter 2 <a id="chapter-2"></a>
Content for chapter one.
## Chapter 3 <a id="chapter-3"></a>
Content for chapter one.</code></pre>
<p><strong>NOTE</strong> that specific placement of the anchor tag seems to be arbitrary. They are placed inline here since it seems to be unobtrusive, and it works.</p>
<p><br>
<br>
<br></p>
<h2>Images</h2>
<p>Images have a similar syntax to links but include a preceding exclamation point.</p>
<pre><code class="language-markdown"></code></pre>
<p><img src="http://octodex.github.com/images/minion.png" alt="Minion" /></p>
<p>or</p>
<pre><code class="language-markdown"></code></pre>
<p><img src="http://octodex.github.com/images/stormtroopocat.jpg" alt="Alt text" title="The Stormtroopocat" /></p>
<p>Like links, Images also have a footnote style syntax</p>
<pre><code class="language-markdown">![Alt text][id]</code></pre>
<p><img src="http://octodex.github.com/images/dojocat.jpg" alt="Alt text" title="The Dojocat" /></p>
<p>With a reference later in the document defining the URL location:</p>
<pre><code>[id]: http://octodex.github.com/images/dojocat.jpg "The Dojocat"</code></pre>