Skip to content

Commit c065ff5

Browse files
george-gcasiantonelli
authored andcommitted
Added related_posts false to the announcements front matter (alshedivat#1266)
Added `related_posts: false` to the announcements front matter to avoid errors like alshedivat#1203. Also included explanation in README FAQ section.
1 parent 4cfa9e4 commit c065ff5

File tree

4 files changed

+12
-0
lines changed

4 files changed

+12
-0
lines changed

README.md

+9
Original file line numberDiff line numberDiff line change
@@ -694,6 +694,15 @@ If you have a different question, please ask using [Discussions](https://github.
694694
RSS Feed plugin works with these correctly set up fields: `title`, `url`, `description` and `author`.
695695
Make sure to fill them in an appropriate way and try again.
696696

697+
5. **Q:** My site doesn't work when I enable `related_blog_posts`. Why? <br>
698+
**A:** This is probably due to the [classifier reborn](https://github.com/jekyll/classifier-reborn) plugin, which is used to calculate
699+
related posts. If the error states `Liquid Exception: Zero vectors can not be normalized...`, it means that it could not calculate related
700+
posts for a specific post. This is usually caused by [empty or really small blog posts](https://github.com/jekyll/classifier-reborn/issues/64)
701+
without meaningful words (i.e. only [stop words](https://en.wikipedia.org/wiki/Stop_words)) or even
702+
[specific characters](https://github.com/jekyll/classifier-reborn/issues/194) you used in your posts. Also, the calculus for similar posts are
703+
made for every `post`, which means every page that uses `layout: post`, including the announcements. To change this behavior, simply add
704+
`related_posts: false` to the front matter of the page you don't want to display related posts on.
705+
697706

698707
## Features
699708

_news/announcement_1.md

+1
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
layout: post
33
date: 2015-10-22 15:59:00-0400
44
inline: true
5+
related_posts: false
56
---
67

78
A simple inline announcement.

_news/announcement_2.md

+1
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ layout: post
33
title: A long announcement with details
44
date: 2015-11-07 16:11:00-0400
55
inline: false
6+
related_posts: false
67
---
78

89
Announcements and news can be much longer than just quick inline posts. In fact, they can have all the features available for the standard blog posts. See below.

_news/announcement_3.md

+1
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
layout: post
33
date: 2016-01-15 07:59:00-0400
44
inline: true
5+
related_posts: false
56
---
67

78
A simple inline announcement with Markdown emoji! :sparkles: :smile:

0 commit comments

Comments
 (0)