From b8051652a5512cadf5e71278a914e948f6b7d66b Mon Sep 17 00:00:00 2001 From: An0d Date: Sat, 24 Dec 2022 12:58:31 +0100 Subject: [PATCH 1/2] Fix #37 Fix #37 Setting the homepage/enabled parameter to false in _config.yml does not give the expected result. --- _config.yml | 2 +- _layouts/Post.html | 179 ++++++++++++++++++++++----------------------- pages/index.md | 1 + 3 files changed, 91 insertions(+), 91 deletions(-) diff --git a/_config.yml b/_config.yml index 0e65e8aaf..bc650f4e0 100644 --- a/_config.yml +++ b/_config.yml @@ -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 diff --git a/_layouts/Post.html b/_layouts/Post.html index 82d084bad..2a7a5cd0a 100644 --- a/_layouts/Post.html +++ b/_layouts/Post.html @@ -75,105 +75,104 @@ {%- if page.permalink == "/" -%} -
- {%- if site.preferences.homepage.enabled -%} - - {%- include Homepage.html -%} - {%- else -%} - + {%- if site.preferences.homepage.enabled -%} + +
+ {%- include Homepage.html -%} +
+ {%- else -%} + +
+
{{page.title}}
+ {%- include Content.html -%} + {%- include Feed.html -%} +
+ {%- endif -%} + {%- else -%} + + {%- if page.feedformat -%}
-
← Home
-
{{page.title}}
- {%- include Content.html -%} - {%- include Feed.html -%} -
- {%- endif -%} -
- {%- endif -%} - - - {%- if page.feedformat -%} -
-
← Home
-
{{page.title}}
- {%- include Content.html -%} - {%- include Feed.html -%} - {%- endif -%} +
← Home
+
{{page.title}}
+ {%- include Content.html -%} + {%- include Feed.html -%} + {%- endif -%} - - {%- if page.content-type == "notes" -%} -
-
-
- {%- if site.preferences.homepage.enabled -%} - - {%- else -%} - - {%- endif -%} -
← BACK
-
+ + {%- if page.content-type == "notes" -%} +
+
+
+ {%- if site.preferences.homepage.enabled -%} + + {%- else -%} + + {%- endif -%} +
← BACK
+
+
+ + {%- if page.format == "list" -%} + + {%- endif -%} +

{{page.title}}

+ {%- include Content.html -%} + {%- include Backlinks.html -%}
- - {%- if page.format == "list" -%} - - {%- endif -%} -

{{page.title}}

- {%- include Content.html -%} - {%- include Backlinks.html -%} -
-
- {%- endif -%} - +
+ {%- endif -%} - - {%- if page.permalink == "/posts" -%} -
-
← Home
-
{{page.title}}
- {%- include Content.html -%} - {% for post in site.posts %} - - {%- endfor -%} -
-
    - - {%- endif -%} + + {%- if page.permalink == "/posts" -%} +
    +
    ← Home
    +
    {{page.title}}
    + {%- include Content.html -%} + {% for post in site.posts %} + + {%- endfor -%} +
    - - {%- if page.content-type == "post" -%} -
    -
    -
    - {%- if site.preferences.homepage.enabled -%} - - {%- else -%} - - {%- endif -%} -
    ← BACK
    -
    -
    -

    {{page.title}}

    - {%- include Content.html -%} - {%- include Backlinks.html -%} -
    -
    - {%- endif -%} +
      + + {%- endif -%} - - {%- if page.content-type == "static" -%} -
      -
      {{page.title}}
      + + {%- if page.content-type == "post" -%} +
      +
      +
      + {%- if site.preferences.homepage.enabled -%} + + {%- else -%} + + {%- endif -%} +
      ← BACK
      +
      +
      +

      {{page.title}}

      {%- include Content.html -%} + {%- include Backlinks.html -%} +
      + {%- endif -%} + + + {%- if page.content-type == "static" -%} +
      +
      {{page.title}}
      + {%- include Content.html -%} +
      + {%- endif -%} {%- endif -%}
      diff --git a/pages/index.md b/pages/index.md index 7d330b76b..7229c4a2b 100644 --- a/pages/index.md +++ b/pages/index.md @@ -5,4 +5,5 @@ layout: Post permalink: / title: Jekyll Garden +feedformat: card --- \ No newline at end of file From 59b407ef0cddd4e93acd831515c015761f89780b Mon Sep 17 00:00:00 2001 From: An0d Date: Sat, 24 Dec 2022 13:00:11 +0100 Subject: [PATCH 2/2] Update _config.yml --- _config.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/_config.yml b/_config.yml index bc650f4e0..0e65e8aaf 100644 --- a/_config.yml +++ b/_config.yml @@ -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: false ##If you need a homepage, change this to true and edit _includes/Homepage.html + enabled: true ##If you need a homepage, change this to true and edit _includes/Homepage.html encoding: utf-8