Tutorial 12: Layouts
HOME
Tutorial 12: Layouts
TIPS
- Use
HTML
for layout files. - Make a wrapper layout once, then use it in other layouts!
New _layouts folder
mkdir _layouts
File _layouts/wrapper.html
<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>Head Title</title>
<meta name="description" content="Head Meta Description">
<meta name="author" content="Head Meta Author">
</head>
<body>
<b>START WRAPPER</b> <br>
{{ content }}
<br> <b>END WRAPPER</b>
</body>
</html>
File _layouts/post.html
---
layout: "wrapper"
---
<h1>Post Layout</h1>
<hr>
{{ content }}