diff --git a/config.toml b/config.toml index 5a3300d..1c1298c 100644 --- a/config.toml +++ b/config.toml @@ -138,9 +138,9 @@ favicon = "/favicon.png" social_media_card = "img/social_cards/index.jpg" menu = [ - {name = "blog", url = "blog/"}, - {name = "archive", url = "archive/"}, - {name = "projects", url = "projects/"}, + {name = "blog", url = "b/"}, + {name = "archive", url = "a/"}, + {name = "projects", url = "p/"}, ] # Extra menu to show on the footer, below socials section. diff --git a/content/_index.md b/content/_index.md index 0901646..57d4292 100644 --- a/content/_index.md +++ b/content/_index.md @@ -8,7 +8,7 @@ insert_anchor_links = "left" [extra] header = {title = "اهلآ، انا عويتب", img = "/img/awiteb-profile.png"} -section_path = "blog/_index.md" +section_path = "b/_index.md" social_media_card = "img/social_cards/index.jpg" max_posts = 4 +++ diff --git a/content/archive/_index.md b/content/a/_index.md similarity index 80% rename from content/archive/_index.md rename to content/a/_index.md index 6f8ed84..8f45f63 100644 --- a/content/archive/_index.md +++ b/content/a/_index.md @@ -4,4 +4,5 @@ path = "archive" template = "archive.html" [extra] +section_path = "b/" +++ diff --git a/content/blog/_index.md b/content/b/_index.md similarity index 92% rename from content/blog/_index.md rename to content/b/_index.md index db82b27..6c10743 100644 --- a/content/blog/_index.md +++ b/content/b/_index.md @@ -1,6 +1,6 @@ +++ paginate_by = 5 -path = "/blog" +path = "/b" title = "تدويناتي" sort_by = "date" template = "section.html" diff --git a/content/projects/_index.md b/content/p/_index.md similarity index 100% rename from content/projects/_index.md rename to content/p/_index.md diff --git a/content/projects/salvo-captcha/index.md b/content/p/salvo-captcha/index.md similarity index 100% rename from content/projects/salvo-captcha/index.md rename to content/p/salvo-captcha/index.md diff --git a/scripts/article.py b/scripts/article.py index 8b37e06..db3d9ce 100755 --- a/scripts/article.py +++ b/scripts/article.py @@ -52,7 +52,7 @@ def now() -> str: class Article: def __init__(self, name: str) -> None: self.name = name - self.path = f"content/blog/{name}/index.md" + self.path = f"content/b/{name}/index.md" self.headers = { "global": {}, "taxonomies": {}, diff --git a/scripts/update-posts.nu b/scripts/update-posts.nu index 97e1183..6a1cd91 100755 --- a/scripts/update-posts.nu +++ b/scripts/update-posts.nu @@ -1,11 +1,11 @@ #! /usr/bin/env nu def main () { - let paths: list = (git diff --name-only | split row "\n" | filter {|p| $p | str contains "content/blog"}); - let posts: string = (ls content/blog | filter {|p| $p.type == "dir"} | each {|p| $p.name | sed 's/content\/blog\///g'}); + let paths: list = (git diff --name-only | split row "\n" | filter {|p| $p | str contains "content/b"}); + let posts: string = (ls content/b | filter {|p| $p.type == "dir"} | each {|p| $p.name | sed 's/content\/b\///g'}); for post in $posts { - if $"content/blog/($post)/index.md" in $paths { + if $"content/b/($post)/index.md" in $paths { echo $"`($post)` post has been modified"; python3 ./scripts/article.py card $post python3 ./scripts/article.py update $post "global" "updated" $"(date now | format date '%Y-%m-%d')"