Layouts
A way to creating template of page and also supporting markdown
- In root directory (`site` here) create `_layouts` and create `default.html`
In `_layouts/default.html`
```html
{{ page.title }}
{{ content }}
```
- html
```html
---
layout: default
title: Home
---
{{ "Hello World!" | downcase }}
```
- create a about.md file in root directory of site and add following
```md
---
layout: default
title: About
---
# About page
This page tells you a little bit about me.
```
Now opening `http://localhost:4000/about.html` will open this about.md with markdown content rendered
Includes
- The `include` tag allows you to include content from another file stored in an `_includes` folder.
at `_includes/navigation.html`. here `page.url` is used to detect url so that current page link will be colored as red
```html
```
Now using this in `_layouts/default.html`
```html
{{ page.title }}
{% include navigation.html %}
{{ content }}
```