Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Fix Jekyll-Garden#37 Setting the homepage/enabled parameter to false in _config.yml does not give the expected result.
  • Loading branch information
An0d committed Dec 24, 2022
1 parent 87e7c91 commit b805165
Show file tree
Hide file tree
Showing 3 changed files with 91 additions and 91 deletions.
2 changes: 1 addition & 1 deletion _config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ preferences:
# To enable a homepage, change the value to true and add content to _includes/Homepage.html
# If enable : false, notes feed will be as homepage.
homepage:
enabled: true ##If you need a homepage, change this to true and edit _includes/Homepage.html
enabled: false ##If you need a homepage, change this to true and edit _includes/Homepage.html

encoding: utf-8

Expand Down
179 changes: 89 additions & 90 deletions _layouts/Post.html
Original file line number Diff line number Diff line change
Expand Up @@ -75,105 +75,104 @@

<!-- Homepage Layout-->
{%- if page.permalink == "/" -%}
<div class="column is-8-widescreen is-8-desktop is-8-tablet is-12-mobile">
{%- if site.preferences.homepage.enabled -%}
<!--- Show Homepage -->
{%- include Homepage.html -%}
{%- else -%}
<!--- Show Feed Part -->
{%- if site.preferences.homepage.enabled -%}
<!--- Show Homepage -->
<div class="column is-8-widescreen is-8-desktop is-8-tablet is-12-mobile">
{%- include Homepage.html -%}
</div>
{%- else -%}
<!--- Show Feed Part -->
<div class="column is-6-widescreen is-8-desktop is-8-tablet is-12-mobile">
<div class="jumbo">{{page.title}}</div>
{%- include Content.html -%}
{%- include Feed.html -%}
</div>
{%- endif -%}
{%- else -%}
<!--- Notes Feed Layout-->
{%- if page.feedformat -%}
<div class="column is-6-widescreen is-8-desktop is-8-tablet is-12-mobile">
<h5 class="meta-title"><a href="/">← Home</a></h5>
<div class="jumbo">{{page.title}}</div>
{%- include Content.html -%}
{%- include Feed.html -%}
</div>
{%- endif -%}
</div>
{%- endif -%}

<!--- Notes Feed Layout-->
{%- if page.feedformat -%}
<div class="column is-6-widescreen is-8-desktop is-8-tablet is-12-mobile">
<h5 class="meta-title"><a href="/">← Home</a></h5>
<div class="jumbo">{{page.title}}</div>
{%- include Content.html -%}
{%- include Feed.html -%}
{%- endif -%}
<h5 class="meta-title"><a href="/">← Home</a></h5>
<div class="jumbo">{{page.title}}</div>
{%- include Content.html -%}
{%- include Feed.html -%}
{%- endif -%}

<!--- Notes Layout-->
{%- if page.content-type == "notes" -%}
<div class="column is-5-widescreen is-6-desktop is-8-tablet is-12-mobile">
<div class="note-page-section">
<div>
{%- if site.preferences.homepage.enabled -%}
<a onclick="window.history.back();">
{%- else -%}
<a onclick="window.location.assign('/');">
{%- endif -%}
<h5 class="meta-title">← BACK</h5>
</a>
<!--- Notes Layout-->
{%- if page.content-type == "notes" -%}
<div class="column is-5-widescreen is-6-desktop is-8-tablet is-12-mobile">
<div class="note-page-section">
<div>
{%- if site.preferences.homepage.enabled -%}
<a onclick="window.history.back();">
{%- else -%}
<a onclick="window.location.assign('/');">
{%- endif -%}
<h5 class="meta-title">← BACK</h5>
</a>
</div>
<!--- List type Note Layout-->
{%- if page.format == "list" -%}
<style>
li {border-bottom: 1px solid var(--color-border-light); list-style: none; padding: 0.4rem 0 0.4rem 0;}
.content ul { padding-left: 0px;}
h3 {padding-top: 1rem; padding-bottom: 0rem;}
</style>
{%- endif -%}
<h1>{{page.title}}</h1>
{%- include Content.html -%}
{%- include Backlinks.html -%}
</div>
<!--- List type Note Layout-->
{%- if page.format == "list" -%}
<style>
li {border-bottom: 1px solid var(--color-border-light); list-style: none; padding: 0.4rem 0 0.4rem 0;}
.content ul { padding-left: 0px;}
h3 {padding-top: 1rem; padding-bottom: 0rem;}
</style>
{%- endif -%}
<h1>{{page.title}}</h1>
{%- include Content.html -%}
{%- include Backlinks.html -%}
</div>
</div>
{%- endif -%}

</div>
{%- endif -%}

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

<ul>

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

<!--- Post Layout-->
{%- if page.content-type == "post" -%}
<div class="column is-5-widescreen is-6-desktop is-8-tablet is-12-mobile">
<div class="note-page-section">
<div>
{%- if site.preferences.homepage.enabled -%}
<a onclick="window.history.back();">
{%- else -%}
<a onclick="window.location.assign('/');">
{%- endif -%}
<h5 class="meta-title">← BACK</h5>
</a>
</div>
<h1>{{page.title}}</h1>
{%- include Content.html -%}
{%- include Backlinks.html -%}
</div>
</div>
{%- endif -%}
<ul>

{%- endif -%}

<!--- Static Page Layout-->
{%- if page.content-type == "static" -%}
<div class="column is-5-widescreen is-6-desktop is-8-tablet is-12-mobile">
<div class="jumbo">{{page.title}}</div>
<!--- Post Layout-->
{%- if page.content-type == "post" -%}
<div class="column is-5-widescreen is-6-desktop is-8-tablet is-12-mobile">
<div class="note-page-section">
<div>
{%- if site.preferences.homepage.enabled -%}
<a onclick="window.history.back();">
{%- else -%}
<a onclick="window.location.assign('/');">
{%- endif -%}
<h5 class="meta-title">← BACK</h5>
</a>
</div>
<h1>{{page.title}}</h1>
{%- include Content.html -%}
{%- include Backlinks.html -%}
</div>
</div>
{%- endif -%}

<!--- Static Page Layout-->
{%- if page.content-type == "static" -%}
<div class="column is-5-widescreen is-6-desktop is-8-tablet is-12-mobile">
<div class="jumbo">{{page.title}}</div>
{%- include Content.html -%}
</div>
{%- endif -%}
{%- endif -%}
</div>
</section>
Expand Down
1 change: 1 addition & 0 deletions pages/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,5 @@
layout: Post
permalink: /
title: Jekyll Garden
feedformat: card
---

0 comments on commit b805165

Please sign in to comment.