crappy-reverie : fix hide the post issue
This commit is contained in:
parent
93f93b542d
commit
f5c0702d6c
@ -13,14 +13,15 @@
|
||||
|
||||
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 :
|
||||
- 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.
|
||||
- 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.
|
||||
- add gitea icon svg.
|
||||
- choice to disable/enable Twitter share on buttom.
|
||||
- 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.
|
||||
|
15
_config.yml
15
_config.yml
@ -58,8 +58,9 @@ enforce_ssl:
|
||||
# then add in the baseurl here, like this: "/repository-name"
|
||||
baseurl: ""
|
||||
|
||||
# Enable blog on index page
|
||||
index_blog: true
|
||||
|
||||
# Enable share to twitter button in posts
|
||||
twitter_blog_share: false
|
||||
|
||||
#
|
||||
@ -95,11 +96,19 @@ plugins:
|
||||
include: ['_pages']
|
||||
|
||||
paginate: 3
|
||||
paginate_path: /page:num/
|
||||
paginate_path: /blog/page_:num
|
||||
|
||||
# Sitemap configuration
|
||||
defaults:
|
||||
-
|
||||
scope:
|
||||
path: "**/*hidden_true*"
|
||||
values:
|
||||
sitemap: false
|
||||
|
||||
header_pages:
|
||||
- _pages/projects.md
|
||||
- _pages/search.md
|
||||
- _pages/search_hidden_true.md
|
||||
- _pages/archive.md
|
||||
- _pages/about.md
|
||||
|
||||
|
@ -10,7 +10,7 @@ title: Archive
|
||||
<ul class="date-order">
|
||||
<h3>Most Recent Posts</h3>
|
||||
{%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>
|
||||
{% endif %}
|
||||
{% endfor %}
|
||||
|
@ -3,7 +3,7 @@ layout: post
|
||||
title: "Crappy's Blog but this is Jekyll"
|
||||
date: 2021-06-07 12:00:00 +0000
|
||||
last_modified_at: 2022-02-12 12:00:00 +0000
|
||||
visiblity: public
|
||||
hidden: false
|
||||
categories: Blog
|
||||
---
|
||||
Hello, This is Crappy's Blog as usual, but this time with Jekyll.
|
||||
|
@ -3,7 +3,7 @@ layout: post
|
||||
title: "Crappy's Blog but moved from Cloudflare"
|
||||
date: 2021-12-25 12:00:00 +0000
|
||||
last_modified_at: 2022-02-12 12:00:00 +0000
|
||||
visiblity: public
|
||||
hidden: false
|
||||
categories: Blog
|
||||
---
|
||||
Hello, this is Crappy’s Blog as usual. I wrote this blog to say that I have moved from Cloudflare to another DNS provider now.
|
||||
|
@ -2,7 +2,7 @@
|
||||
layout: post
|
||||
title: "Back to Self Hosting"
|
||||
date: 2022-03-30 12:00:00 +0000
|
||||
visiblity: public
|
||||
hidden: false
|
||||
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!
|
||||
|
@ -2,7 +2,7 @@
|
||||
layout: post
|
||||
title: "Crappy's v4(or 3?) a new Project in a while"
|
||||
date: 2022-09-19 12:00:00 +0000
|
||||
visiblity: public
|
||||
hidden: false
|
||||
categories: Blog
|
||||
---
|
||||
|
||||
|
@ -2,7 +2,7 @@
|
||||
layout: post
|
||||
title: "farewall .one, I'm not gonna pay 15.99"
|
||||
date: 2023-04-16 12:00:00 +0000
|
||||
visiblity: hidden
|
||||
hidden: true
|
||||
categories: Blog
|
||||
---
|
||||
|
Binary file not shown.
Before Width: | Height: | Size: 65 KiB After Width: | Height: | Size: 68 KiB |
@ -5,7 +5,6 @@ layout: default
|
||||
{% if site.index_blog == true %}
|
||||
<div class="posts">
|
||||
{% for post in paginator.posts %}
|
||||
{% if post.visiblity == "public" %}
|
||||
<article class="post">
|
||||
<a href="{{ site.baseurl }}{{ post.url }}">
|
||||
<h1>{{ post.title }}</h1>
|
||||
@ -20,7 +19,6 @@ layout: default
|
||||
|
||||
<a href="{{ site.baseurl }}{{ post.url }}" class="read-more">Read More</a>
|
||||
</article>
|
||||
{% endif %}
|
||||
{% endfor %}
|
||||
|
||||
<!-- pagination -->
|
||||
|
@ -2,6 +2,7 @@
|
||||
---
|
||||
[
|
||||
{% for post in site.posts %}
|
||||
{% if post.hidden != true %}
|
||||
{
|
||||
|
||||
"title" : "{% if post.title != "" %}{{ post.title | escape }}{% else %}{{ post.excerpt | strip_html | escape | strip }}{%endif%}",
|
||||
@ -9,5 +10,6 @@
|
||||
"category" : "{{ post.categories | join: ', '}}",
|
||||
"date" : "{{ post.date | date: "%B %e, %Y" }}"
|
||||
} {% unless forloop.last %},{% endunless %}
|
||||
{% endif %}
|
||||
{% endfor %}
|
||||
]
|
Loading…
Reference in New Issue
Block a user