crappy-reverie : fix hide the post issue

This commit is contained in:
minoplhy 2023-04-18 23:18:44 +07:00
parent 93f93b542d
commit f5c0702d6c
Signed by: minoplhy
GPG Key ID: 41D406044E2434BF
13 changed files with 23 additions and 13 deletions

View File

@ -13,14 +13,15 @@
Reverie-Crappy is a fork of [amitmerchant1990/reverie](https://github.com/amitmerchant1990/reverie) with some adjustment. Reverie-Crappy is a fork of [amitmerchant1990/reverie](https://github.com/amitmerchant1990/reverie) with some adjustment.
The following has been add/edited from the original : The following has been add/edited from the original :
- Dark Theme toggle (don't respect browser preferance) with DarkReader. - Dark Theme toggle (don't respect browser preferences) with DarkReader.
- Remove . when post author doesn't present. - Remove . when post author doesn't present.
- change file strcture. - change file strcture.
- Post 'visiblity' when not set to public, will not be listed on site. It still appear on sitemap though. - ~~Post 'visiblity' when not set to public, will not be listed on site. It still appear on sitemap though.~~ changed to 'hidden: true' for pagination compatiblity.
- More expand friendly navbar. - More expand friendly navbar.
- add gitea icon svg. - add gitea icon svg.
- choice to disable/enable Twitter share on buttom. - choice to disable/enable Twitter share on buttom.
- choice to enable/disable blog on first page. - choice to enable/disable blog on first page.
- any file contain "hidden_true" will be exclude from sitemap (via _config.yaml)
Reverie is a [Jekyll](https://jekyllrb.com/)-powered theme which is simple and opinionated. It's actually a fork of [jekyll-now](https://github.com/barryclark/jekyll-now) with some additional features and personal touches which I've implemented to suit my needs for my blog. Reverie is a [Jekyll](https://jekyllrb.com/)-powered theme which is simple and opinionated. It's actually a fork of [jekyll-now](https://github.com/barryclark/jekyll-now) with some additional features and personal touches which I've implemented to suit my needs for my blog.

View File

@ -58,8 +58,9 @@ enforce_ssl:
# then add in the baseurl here, like this: "/repository-name" # then add in the baseurl here, like this: "/repository-name"
baseurl: "" baseurl: ""
# Enable blog on index page
index_blog: true index_blog: true
# Enable share to twitter button in posts
twitter_blog_share: false twitter_blog_share: false
# #
@ -95,11 +96,19 @@ plugins:
include: ['_pages'] include: ['_pages']
paginate: 3 paginate: 3
paginate_path: /page:num/ paginate_path: /blog/page_:num
# Sitemap configuration
defaults:
-
scope:
path: "**/*hidden_true*"
values:
sitemap: false
header_pages: header_pages:
- _pages/projects.md - _pages/projects.md
- _pages/search.md - _pages/search_hidden_true.md
- _pages/archive.md - _pages/archive.md
- _pages/about.md - _pages/about.md

View File

@ -10,7 +10,7 @@ title: Archive
<ul class="date-order"> <ul class="date-order">
<h3>Most Recent Posts</h3> <h3>Most Recent Posts</h3>
{%for post in site.posts %} {%for post in site.posts %}
{% if post.visiblity == "public" %} {% if post.hidden != true %}
<p><b><a href="{{ site.baseurl }}{{ post.url }}">{% if post.title and post.title != "" %}{{post.title}}{% else %}{{post.excerpt |strip_html}}{%endif%}</a></b> - {% if post.date and post.date != "" %}{{ post.date | date: "%e %B %Y" }}{%endif%}</p> <p><b><a href="{{ site.baseurl }}{{ post.url }}">{% if post.title and post.title != "" %}{{post.title}}{% else %}{{post.excerpt |strip_html}}{%endif%}</a></b> - {% if post.date and post.date != "" %}{{ post.date | date: "%e %B %Y" }}{%endif%}</p>
{% endif %} {% endif %}
{% endfor %} {% endfor %}

View File

@ -3,7 +3,7 @@ layout: post
title: "Crappy's Blog but this is Jekyll" title: "Crappy's Blog but this is Jekyll"
date: 2021-06-07 12:00:00 +0000 date: 2021-06-07 12:00:00 +0000
last_modified_at: 2022-02-12 12:00:00 +0000 last_modified_at: 2022-02-12 12:00:00 +0000
visiblity: public hidden: false
categories: Blog categories: Blog
--- ---
Hello, This is Crappy's Blog as usual, but this time with Jekyll. Hello, This is Crappy's Blog as usual, but this time with Jekyll.

View File

@ -3,7 +3,7 @@ layout: post
title: "Crappy's Blog but moved from Cloudflare" title: "Crappy's Blog but moved from Cloudflare"
date: 2021-12-25 12:00:00 +0000 date: 2021-12-25 12:00:00 +0000
last_modified_at: 2022-02-12 12:00:00 +0000 last_modified_at: 2022-02-12 12:00:00 +0000
visiblity: public hidden: false
categories: Blog categories: Blog
--- ---
Hello, this is Crappys Blog as usual. I wrote this blog to say that I have moved from Cloudflare to another DNS provider now. Hello, this is Crappys Blog as usual. I wrote this blog to say that I have moved from Cloudflare to another DNS provider now.

View File

@ -2,7 +2,7 @@
layout: post layout: post
title: "Back to Self Hosting" title: "Back to Self Hosting"
date: 2022-03-30 12:00:00 +0000 date: 2022-03-30 12:00:00 +0000
visiblity: public hidden: false
categories: Blog categories: Blog
--- ---
Hello, I wrote this blog just to check if my script is working. Let's short this thing. I'm back to self-hosting now! Hello, I wrote this blog just to check if my script is working. Let's short this thing. I'm back to self-hosting now!

View File

@ -2,7 +2,7 @@
layout: post layout: post
title: "Crappy's v4(or 3?) a new Project in a while" title: "Crappy's v4(or 3?) a new Project in a while"
date: 2022-09-19 12:00:00 +0000 date: 2022-09-19 12:00:00 +0000
visiblity: public hidden: false
categories: Blog categories: Blog
--- ---

View File

@ -2,7 +2,7 @@
layout: post layout: post
title: "farewall .one, I'm not gonna pay 15.99" title: "farewall .one, I'm not gonna pay 15.99"
date: 2023-04-16 12:00:00 +0000 date: 2023-04-16 12:00:00 +0000
visiblity: hidden hidden: true
categories: Blog categories: Blog
--- ---

Binary file not shown.

Before

Width:  |  Height:  |  Size: 65 KiB

After

Width:  |  Height:  |  Size: 68 KiB

View File

@ -5,7 +5,6 @@ layout: default
{% if site.index_blog == true %} {% if site.index_blog == true %}
<div class="posts"> <div class="posts">
{% for post in paginator.posts %} {% for post in paginator.posts %}
{% if post.visiblity == "public" %}
<article class="post"> <article class="post">
<a href="{{ site.baseurl }}{{ post.url }}"> <a href="{{ site.baseurl }}{{ post.url }}">
<h1>{{ post.title }}</h1> <h1>{{ post.title }}</h1>
@ -20,7 +19,6 @@ layout: default
<a href="{{ site.baseurl }}{{ post.url }}" class="read-more">Read More</a> <a href="{{ site.baseurl }}{{ post.url }}" class="read-more">Read More</a>
</article> </article>
{% endif %}
{% endfor %} {% endfor %}
<!-- pagination --> <!-- pagination -->

View File

@ -2,6 +2,7 @@
--- ---
[ [
{% for post in site.posts %} {% for post in site.posts %}
{% if post.hidden != true %}
{ {
"title" : "{% if post.title != "" %}{{ post.title | escape }}{% else %}{{ post.excerpt | strip_html | escape | strip }}{%endif%}", "title" : "{% if post.title != "" %}{{ post.title | escape }}{% else %}{{ post.excerpt | strip_html | escape | strip }}{%endif%}",
@ -9,5 +10,6 @@
"category" : "{{ post.categories | join: ', '}}", "category" : "{{ post.categories | join: ', '}}",
"date" : "{{ post.date | date: "%B %e, %Y" }}" "date" : "{{ post.date | date: "%B %e, %Y" }}"
} {% unless forloop.last %},{% endunless %} } {% unless forloop.last %},{% endunless %}
{% endif %}
{% endfor %} {% endfor %}
] ]