-
-
Notifications
You must be signed in to change notification settings - Fork 490
Commit
Add blog post series
- Loading branch information
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
title: Bulma Clean Theme Series | ||
description: This post is part of a series all about Bulma Clean Theme. | ||
sections: | ||
- label: Getting Started | ||
items: | ||
- title: Why use a static site generator | ||
- title: Getting started with Bulma Clean Theme for Jekyll | ||
- label: Advanced Features | ||
items: | ||
- title: Introducing some new layouts to Bulma Clean Theme | ||
- title: Creating a docs site with Bulma Clean Theme | ||
- title: Creating a post series |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
{% assign series = site.data.[page.series] %} | ||
{% assign posts = site.posts %} | ||
|
||
<p class="title is-5 is-spaced">{{ series.title }}</p> | ||
|
||
{% if series.description %} | ||
<p>{{ series.description }}</p> | ||
{% endif %} | ||
|
||
{% for section in series.sections %} | ||
|
||
{% if section.label %} | ||
<p class="title is-6">{{ section.label }}</p> | ||
{% endif %} | ||
|
||
<ul class="block-list is-small is-outlined"> | ||
{% for item in section.items %} | ||
{% assign post = posts | where: "title", item.title %} | ||
|
||
{% if page.url == post[0].url %} | ||
<li class="is-highlighted is-dark"> | ||
<p>{{ item.title }}</p> | ||
</li> | ||
{% else %} | ||
<li> | ||
<a href="{{ site.baseurl }}{{ post[0].url }}" class="is-flex" >{{ item.title }}</a> | ||
</li> | ||
{% endif %} | ||
|
||
{% endfor %} | ||
</ul> | ||
{% endfor %} |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,59 @@ | ||
--- | ||
layout: post | ||
title: Creating a post series | ||
description: How to create a post series with Bulma Clean Theme | ||
date: 2021-10-30 09:00:07 | ||
hero_image: /bulma-clean-theme/img/blog-post-series.jpg | ||
image: /bulma-clean-theme/img/blog-post-series.jpg | ||
hero_height: is-large | ||
hero_darken: true | ||
tags: bulma-clean-theme jekyll blog | ||
series: example_blog_series | ||
--- | ||
|
||
From version 0.12, you can now make a post a part of a series of posts, linking to the other posts in the series, by creating a `series` data file and then setting the series in each of the post's front matter. | ||
|
||
The current post in the list is highlighted to help give context of where you are in the series. | ||
|
||
## Blog Series Data File | ||
|
||
Start by creating a yml file in the _data directory, for example `my_blog_series.yml`. Give the series a title and, optionally, a description. | ||
|
||
## Sections | ||
|
||
Next add sections. Each section can have a label (optional) and items. Each item is the title of an existing blog post. If the title is not found then the link will be empty. | ||
|
||
If you just want one list without labels, then omit the label and just add the items. | ||
|
||
```yaml | ||
title: The series title | ||
sections: | ||
- items: | ||
- title: Why use a static site generator | ||
- title: Getting started with Bulma Clean Theme for Jekyll | ||
``` | ||
Here is a full example with multiple sections with labels. | ||
```yaml | ||
title: The series title | ||
description: The series description text | ||
sections: | ||
- label: The first section | ||
items: | ||
- title: Why use a static site generator | ||
- title: Getting started with Bulma Clean Theme for Jekyll | ||
- label: Another section | ||
items: | ||
- title: Introducing some new layouts to Bulma Clean Theme | ||
- title: Creating a docs site with Bulma Clean Theme | ||
- title: Creating a post series | ||
``` | ||
## Update your posts | ||
Finally, add the series setting to your front matter in each post you want the series to show in. | ||
```yaml | ||
series: my_blog_series | ||
``` |
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,7 +2,7 @@ | |
|
||
Gem::Specification.new do |spec| | ||
spec.name = "bulma-clean-theme" | ||
spec.version = "0.11.2" | ||
spec.version = "0.12" | ||
spec.authors = ["chrisrhymes"] | ||
spec.email = ["[email protected]"] | ||
|
||
|
@@ -16,7 +16,7 @@ Gem::Specification.new do |spec| | |
spec.add_runtime_dependency "jekyll-feed", "~> 0.15" | ||
spec.add_runtime_dependency "jekyll-sitemap", "~> 1.4" | ||
spec.add_runtime_dependency "jekyll-paginate", "~> 1.1" | ||
spec.add_runtime_dependency "jekyll-seo-tag", "~> 2.6" | ||
spec.add_runtime_dependency "jekyll-seo-tag", "~> 2.7" | ||
spec.add_runtime_dependency "kramdown-parser-gfm", "~> 1.1" | ||
|
||
spec.add_development_dependency "bundler", "~> 2.0" | ||
|
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.