You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Give it a descriptive name, (don't use names like template, mytemplate and so on) be sure the name doesn't contain spaces, - or other special characters. Using lowercase with underscores to separate words is recommended. Eg useful_template_name.html
A layout consists of two parts, the HTML which defines the structure of the page and the content which is written for each post / unit.
Here's a simple layout
<!DOCTYPE html><html><head><title>{{ site.title }}</title></head><body><h1>This is using a sample layout</h1><h2>The content created on {{ site.time | date_to_string }} goes below</h2><divclass="content">
{{ content }}
</div></body></html>
Notice the special markup enclosed in {{ }} which embeds a dynamic variable into the generated page.
For example {{ site.title }} embeds the title given by the author of the page in front matter
{{ content }} is the most important part of this template. It embeds the content written in markdown, html or any other markup language into the template to generate the final web page.