Now to take a longer look at working with Jekyll Theme features.
Theme and Style Concepts
Layouts | .html | _layouts | content containers, structural view |
Includes | .html | _includes | reusable fragments across layouts or pages |
Styles | .sass | _sass | source files for CSS |
Assets | images, video, pdf … | any | Jekyll happily serves any file type |
Includes can process any fragment, html, markdown or liquid. The following Liquid brings in the include:
<meta charset="utf-8" />
<meta content='text/html; charset=utf-8' http-equiv='Content-Type'>
<meta http-equiv='X-UA-Compatible' content='IE=edge'>
<meta name='viewport' content='width=device-width, initial-scale=1.0, maximum-scale=1.0'>
<meta name="description" content="Now to take a longer look at working with Jekyll Theme features.
" />
<meta property="og:description" content="Now to take a longer look at working with Jekyll Theme features.
" />
<meta name="author" content="#! /bin/brain" />
<meta property="og:title" content="Defining Your Includes" />
<meta property="twitter:title" content="Defining Your Includes" />
And this Liquid passes variables into the include scope.
<meta charset="utf-8" />
<meta content='text/html; charset=utf-8' http-equiv='Content-Type'>
<meta http-equiv='X-UA-Compatible' content='IE=edge'>
<meta name='viewport' content='width=device-width, initial-scale=1.0, maximum-scale=1.0'>
<meta name="description" content="Now to take a longer look at working with Jekyll Theme features.
" />
<meta property="og:description" content="Now to take a longer look at working with Jekyll Theme features.
" />
<meta name="author" content="#! /bin/brain" />
<meta property="og:title" content="Defining Your Includes" />
<meta property="twitter:title" content="Defining Your Includes" />
Note: includes you specify file with extension.
Open up the _includes directory and examine these files.
meta.html
- what is this doing?
- what variable scopes does it reference?
- what layout references this?
analytics.html
- A common use of includes: declaring javascript.
Notes on using includes
- source must be placed in _includes directory.
- No Front Matter