101591 Views
79842 Views
45596 Views
44332 Views
40991 Views
33419 Views
Raspberry Pi Time machine
Now Ad-Free
Guiding Light
Sync Files on your Pis, with Syncthing
NextCloud
Buddy Jr.
Introduction to FreeCAD for Beginners
Building a Robot Arm with Raspberry Pi and PCA9685
Building User Authentication for Static Sites with FastAPI
Mastering Pydantic for Robust Data Validation
Mastering Markdown for Documentation with Jekyll
Introduction to Rust
KevsRobots Learning Platform
36% Percent Complete
By Kevin McAleer, 3 Minutes
In this lesson, we’ll delve into the heart of managing content in Jekyll. You’ll learn how to create and organize posts and pages, use Markdown for easy content creation, and leverage Jekyll’s front matter and data files for advanced content management.
Jekyll simplifies the process of creating posts and pages. Here’s how you can start:
_posts
YYYY-MM-DD-title.md
Start with front matter, for example:
--- layout: post title: "My First Post" date: 2024-01-25 categories: tutorial ---
about.md
Markdown is a lightweight markup language that allows you to write using an easy-to-read, easy-to-write plain text format.
#
**bold**
*italic*
[Link text](URL)
![Alt text](image URL)
Front matter allows you to set variables for your page or post, which you can then access using Jekyll’s templating system.
Example:
--- layout: page title: "About" ---
_data
Liquid Templating Liquid is a templating language developed by Shopify. Jekyll uses it to process templates, allowing you to use variables, logic, and filters in your content. for example: {% for item in site.data.mydata %} {{ item.name }} {% endfor %} Note how the logic is wrapped in {% %} and the variables are wrapped in {{ }}.
Liquid is a templating language developed by Shopify. Jekyll uses it to process templates, allowing you to use variables, logic, and filters in your content. for example:
{% for item in site.data.mydata %} {{ item.name }} {% endfor %}
Note how the logic is wrapped in {% %} and the variables are wrapped in {{ }}.
{% %}
{{ }}
In this example, mydata is the name of the data file, and name is a variable in the data file. The for loop iterates through the data file and prints the value of the name variable.
mydata
name
for
Organizing your content helps visitors navigate your site easily.
categories: tutorial tags: jekyll markdown
You now have the knowledge to manage content in Jekyll effectively. Experiment with writing posts, using Markdown, and organizing your site’s content.
Create a blog post about a topic of your choice using Markdown. Include front matter, and categorize and tag your post.
< Previous Next >