Skip to content

Commit b805165

Browse files
committed
Fix Jekyll-Garden#37 Setting the homepage/enabled parameter to false in _config.yml does not give the expected result.
1 parent 87e7c91 commit b805165

File tree

3 files changed

+91
-91
lines changed

3 files changed

+91
-91
lines changed

_config.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ preferences:
5252
# To enable a homepage, change the value to true and add content to _includes/Homepage.html
5353
# If enable : false, notes feed will be as homepage.
5454
homepage:
55-
enabled: true ##If you need a homepage, change this to true and edit _includes/Homepage.html
55+
enabled: false ##If you need a homepage, change this to true and edit _includes/Homepage.html
5656

5757
encoding: utf-8
5858

_layouts/Post.html

+89-90
Original file line numberDiff line numberDiff line change
@@ -75,105 +75,104 @@
7575

7676
<!-- Homepage Layout-->
7777
{%- if page.permalink == "/" -%}
78-
<div class="column is-8-widescreen is-8-desktop is-8-tablet is-12-mobile">
79-
{%- if site.preferences.homepage.enabled -%}
80-
<!--- Show Homepage -->
81-
{%- include Homepage.html -%}
82-
{%- else -%}
83-
<!--- Show Feed Part -->
78+
{%- if site.preferences.homepage.enabled -%}
79+
<!--- Show Homepage -->
80+
<div class="column is-8-widescreen is-8-desktop is-8-tablet is-12-mobile">
81+
{%- include Homepage.html -%}
82+
</div>
83+
{%- else -%}
84+
<!--- Show Feed Part -->
85+
<div class="column is-6-widescreen is-8-desktop is-8-tablet is-12-mobile">
86+
<div class="jumbo">{{page.title}}</div>
87+
{%- include Content.html -%}
88+
{%- include Feed.html -%}
89+
</div>
90+
{%- endif -%}
91+
{%- else -%}
92+
<!--- Notes Feed Layout-->
93+
{%- if page.feedformat -%}
8494
<div class="column is-6-widescreen is-8-desktop is-8-tablet is-12-mobile">
85-
<h5 class="meta-title"><a href="/">← Home</a></h5>
86-
<div class="jumbo">{{page.title}}</div>
87-
{%- include Content.html -%}
88-
{%- include Feed.html -%}
89-
</div>
90-
{%- endif -%}
91-
</div>
92-
{%- endif -%}
93-
94-
<!--- Notes Feed Layout-->
95-
{%- if page.feedformat -%}
96-
<div class="column is-6-widescreen is-8-desktop is-8-tablet is-12-mobile">
97-
<h5 class="meta-title"><a href="/">← Home</a></h5>
98-
<div class="jumbo">{{page.title}}</div>
99-
{%- include Content.html -%}
100-
{%- include Feed.html -%}
101-
{%- endif -%}
95+
<h5 class="meta-title"><a href="/">← Home</a></h5>
96+
<div class="jumbo">{{page.title}}</div>
97+
{%- include Content.html -%}
98+
{%- include Feed.html -%}
99+
{%- endif -%}
102100

103-
<!--- Notes Layout-->
104-
{%- if page.content-type == "notes" -%}
105-
<div class="column is-5-widescreen is-6-desktop is-8-tablet is-12-mobile">
106-
<div class="note-page-section">
107-
<div>
108-
{%- if site.preferences.homepage.enabled -%}
109-
<a onclick="window.history.back();">
110-
{%- else -%}
111-
<a onclick="window.location.assign('/');">
112-
{%- endif -%}
113-
<h5 class="meta-title">← BACK</h5>
114-
</a>
101+
<!--- Notes Layout-->
102+
{%- if page.content-type == "notes" -%}
103+
<div class="column is-5-widescreen is-6-desktop is-8-tablet is-12-mobile">
104+
<div class="note-page-section">
105+
<div>
106+
{%- if site.preferences.homepage.enabled -%}
107+
<a onclick="window.history.back();">
108+
{%- else -%}
109+
<a onclick="window.location.assign('/');">
110+
{%- endif -%}
111+
<h5 class="meta-title">← BACK</h5>
112+
</a>
113+
</div>
114+
<!--- List type Note Layout-->
115+
{%- if page.format == "list" -%}
116+
<style>
117+
li {border-bottom: 1px solid var(--color-border-light); list-style: none; padding: 0.4rem 0 0.4rem 0;}
118+
.content ul { padding-left: 0px;}
119+
h3 {padding-top: 1rem; padding-bottom: 0rem;}
120+
</style>
121+
{%- endif -%}
122+
<h1>{{page.title}}</h1>
123+
{%- include Content.html -%}
124+
{%- include Backlinks.html -%}
115125
</div>
116-
<!--- List type Note Layout-->
117-
{%- if page.format == "list" -%}
118-
<style>
119-
li {border-bottom: 1px solid var(--color-border-light); list-style: none; padding: 0.4rem 0 0.4rem 0;}
120-
.content ul { padding-left: 0px;}
121-
h3 {padding-top: 1rem; padding-bottom: 0rem;}
122-
</style>
123-
{%- endif -%}
124-
<h1>{{page.title}}</h1>
125-
{%- include Content.html -%}
126-
{%- include Backlinks.html -%}
127-
</div>
128-
</div>
129-
{%- endif -%}
130-
126+
</div>
127+
{%- endif -%}
131128

132-
<!--- Post Feed Layout-->
133-
{%- if page.permalink == "/posts" -%}
134-
<div class="column is-6-widescreen is-8-desktop is-8-tablet is-12-mobile">
135-
<h5 class="meta-title"><a href="/">← Home</a></h5>
136-
<div class="jumbo">{{page.title}}</div>
137-
{%- include Content.html -%}
138-
{% for post in site.posts %}
139-
<div class="list-feed">
140-
<a href="{{ site.baseurl }}{{post.url}}" style="text-decoration: none;display: flex;justify-content: space-between;flex-direction: row;width: 100%;">
141-
<div class="writinglist-title">{{post.title }}</div>
142-
</a>
143-
</div>
144-
{%- endfor -%}
145-
</div>
146129

147-
<ul>
148-
149-
{%- endif -%}
130+
<!--- Post Feed Layout-->
131+
{%- if page.permalink == "/posts" -%}
132+
<div class="column is-6-widescreen is-8-desktop is-8-tablet is-12-mobile">
133+
<h5 class="meta-title"><a href="/">← Home</a></h5>
134+
<div class="jumbo">{{page.title}}</div>
135+
{%- include Content.html -%}
136+
{% for post in site.posts %}
137+
<div class="list-feed">
138+
<a href="{{ site.baseurl }}{{post.url}}" style="text-decoration: none;display: flex;justify-content: space-between;flex-direction: row;width: 100%;">
139+
<div class="writinglist-title">{{post.title }}</div>
140+
</a>
141+
</div>
142+
{%- endfor -%}
143+
</div>
150144

151-
<!--- Post Layout-->
152-
{%- if page.content-type == "post" -%}
153-
<div class="column is-5-widescreen is-6-desktop is-8-tablet is-12-mobile">
154-
<div class="note-page-section">
155-
<div>
156-
{%- if site.preferences.homepage.enabled -%}
157-
<a onclick="window.history.back();">
158-
{%- else -%}
159-
<a onclick="window.location.assign('/');">
160-
{%- endif -%}
161-
<h5 class="meta-title">← BACK</h5>
162-
</a>
163-
</div>
164-
<h1>{{page.title}}</h1>
165-
{%- include Content.html -%}
166-
{%- include Backlinks.html -%}
167-
</div>
168-
</div>
169-
{%- endif -%}
145+
<ul>
146+
147+
{%- endif -%}
170148

171-
<!--- Static Page Layout-->
172-
{%- if page.content-type == "static" -%}
173-
<div class="column is-5-widescreen is-6-desktop is-8-tablet is-12-mobile">
174-
<div class="jumbo">{{page.title}}</div>
149+
<!--- Post Layout-->
150+
{%- if page.content-type == "post" -%}
151+
<div class="column is-5-widescreen is-6-desktop is-8-tablet is-12-mobile">
152+
<div class="note-page-section">
153+
<div>
154+
{%- if site.preferences.homepage.enabled -%}
155+
<a onclick="window.history.back();">
156+
{%- else -%}
157+
<a onclick="window.location.assign('/');">
158+
{%- endif -%}
159+
<h5 class="meta-title">← BACK</h5>
160+
</a>
161+
</div>
162+
<h1>{{page.title}}</h1>
175163
{%- include Content.html -%}
164+
{%- include Backlinks.html -%}
165+
</div>
176166
</div>
167+
{%- endif -%}
168+
169+
<!--- Static Page Layout-->
170+
{%- if page.content-type == "static" -%}
171+
<div class="column is-5-widescreen is-6-desktop is-8-tablet is-12-mobile">
172+
<div class="jumbo">{{page.title}}</div>
173+
{%- include Content.html -%}
174+
</div>
175+
{%- endif -%}
177176
{%- endif -%}
178177
</div>
179178
</section>

pages/index.md

+1
Original file line numberDiff line numberDiff line change
@@ -5,4 +5,5 @@
55
layout: Post
66
permalink: /
77
title: Jekyll Garden
8+
feedformat: card
89
---

0 commit comments

Comments
 (0)