Step 1: Create the collection’s directory
Under your project root, create a folder named “_connecttech2018” and add an index file
> mkdir _connecttech2018
> touch index.md
Quiz:the prefix underscore is important, why?
Indicates to Jekyll this is a file it needs to process.
Working Directly On Github?
Github will not let you create an empty directory, however if you add the directory to the filename, it will be created.
Step 2: Tell Jekyll about your Collection
- Open up _config.yml
- Add a new object called “collections”
- Add a child to collections called “connecttech2018”
- Add a property “output: true” to your connecttech2018 collection.
collections:
connecttech2018:
output: true
Working with Jekyll locally?
Restart Jekyll Server. _config.yml is the one file Jekyll doesn't watch for changes
Step 3: Add Some Content
- create file “_connecttech2018/jekyll-4-fun.md”
- add an empty jekyll front matter
- Add text into the body.
---
---
Learning To Rock Jekyll at Connect Tech!
Save and Commit your changes
Step 4: Test your collection.
- https://
.github.io/connecttech2018/ - https://
.github.io/connecttech2018/jekyll-4-fun/
Explore! How does Jekyll handle…
The layout for your index & item page?
There is none! Why not?
The title for the index and item page?
Uses the filename.
Where are files output?
_site/
connecttech2018.html
connecttech2018/
jekyll-4-fun.html