From 498feb9a35a5236baf8b048033162c3be9e5224c Mon Sep 17 00:00:00 2001 From: rizkikadafi Date: Mon, 8 Apr 2024 15:24:47 +0700 Subject: [PATCH] update category and global permalink for posts --- _config.yml | 7 +++ _includes/blog-post-card.html | 8 +-- _layouts/blog.html | 5 ++ _layouts/category.html | 8 ++- _layouts/default.html | 4 ++ _layouts/post.html | 10 +++- assets/js/blog-navbar.js | 8 +++ assets/js/category.js | 28 ++++++++++ assets/js/navbar.js | 8 +++ blog/category.html | 56 +++++++++++++------ ...Bersama Codepolitan dan Alibaba Cloud.html | 1 + blog/general/{general.html => index.html} | 0 blog/{blog.html => index.html} | 7 ++- blog/math/{math.html => index.html} | 0 .../{programming.html => index.html} | 0 blog/web/{web.html => index.html} | 0 16 files changed, 122 insertions(+), 28 deletions(-) create mode 100644 assets/js/category.js rename blog/general/{general.html => index.html} (100%) rename blog/{blog.html => index.html} (93%) rename blog/math/{math.html => index.html} (100%) rename blog/programming/{programming.html => index.html} (100%) rename blog/web/{web.html => index.html} (100%) diff --git a/_config.yml b/_config.yml index 0ed3376..30e50ce 100644 --- a/_config.yml +++ b/_config.yml @@ -1,5 +1,12 @@ baseurl: "" url: "" +defaults: + - scope: + path: '' + type: posts + values: + permalink: blog/:title + postcss: cache: false diff --git a/_includes/blog-post-card.html b/_includes/blog-post-card.html index 94edb15..ae984e8 100644 --- a/_includes/blog-post-card.html +++ b/_includes/blog-post-card.html @@ -5,10 +5,8 @@ {% endif %} - -
- +

{{ include.post.title }}

@@ -25,8 +23,8 @@

{{ include.post.title }}

{{ include.post.excerpt }}

- + Read more diff --git a/_layouts/blog.html b/_layouts/blog.html index ac738ba..0f47065 100644 --- a/_layouts/blog.html +++ b/_layouts/blog.html @@ -44,10 +44,15 @@ {{ content }}
+ + + diff --git a/_layouts/category.html b/_layouts/category.html index f8625e3..0db7a7a 100644 --- a/_layouts/category.html +++ b/_layouts/category.html @@ -3,12 +3,14 @@ ---
-
+
{% include blog-modal-navigation.html %}
-

{{page.category | capitalize }} Category

+

+ {{page.category | capitalize}} Category +

{{page.desc}}

diff --git a/_layouts/default.html b/_layouts/default.html index 5d8bf7e..b14f17b 100644 --- a/_layouts/default.html +++ b/_layouts/default.html @@ -19,6 +19,10 @@ {{ content }} + + diff --git a/_layouts/post.html b/_layouts/post.html index 8a90049..c80c87c 100644 --- a/_layouts/post.html +++ b/_layouts/post.html @@ -2,7 +2,7 @@ layout: blog --- -
+
{% if page.thumbnail %}
@@ -15,7 +15,7 @@

{{ page.title }}

-