Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit 6b77cb2

Browse files
committed
search & related articles fixed
1 parent 978e005 commit 6b77cb2

File tree

2 files changed

+11
-4
lines changed

2 files changed

+11
-4
lines changed

‎_includes/related-articles.html‎

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
<div class="uk-margin-large-top">
2-
<h4>{{ site.data.translation[site.lang].related_posts | default: "Related Posts" }}</h4>
1+
<div class="uk-margin-large-top related-box">
2+
<h4>{{ site.data.translation[site.lang].related_posts | default: "Related Posts" }}</h4>
33

44
{% assign maxRelated = 4 %}
55
{% assign minCommonTags = 1 %}
@@ -28,5 +28,12 @@ <h4>{{ site.data.translation[site.lang].related_posts | default: "Related Posts"
2828
{% endif %}
2929

3030
{% endfor %}
31-
</ul>
31+
</ul>
3232
</div>
33+
<style>
34+
{%- if maxRelatedCounter == 0 -%}
35+
.related-box {
36+
display: none;
37+
}
38+
{%- endif -%}
39+
</style>

‎search.json‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
layout: null
33
---
44
[
5-
{% for post in site.posts %}
5+
{% for post in site.articles %}
66
{
77
"title" : "{{ post.title | escape }}",
88
"category" : "{{ post.category }}",

0 commit comments

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /