From bb4ffae0a7b34ddbc0b188b1845fff878b76c78b Mon Sep 17 00:00:00 2001 From: parker110-crypto Date: Thu, 12 Jun 2025 18:03:07 +0000 Subject: [PATCH 1/7] Start draft PR From 74604129c8f9a2a0ca45b60039ad82dcacef034e Mon Sep 17 00:00:00 2001 From: parker110-crypto Date: Thu, 12 Jun 2025 18:03:22 +0000 Subject: [PATCH 2/7] Add comprehensive .gitignore for Jekyll project --- .gitignore | 31 ++++++++++++++++++++++++++++--- 1 file changed, 28 insertions(+), 3 deletions(-) diff --git a/.gitignore b/.gitignore index 76a0bf1..2ac066f 100755 --- a/.gitignore +++ b/.gitignore @@ -1,3 +1,28 @@ -_site -.sass-cache -Gemfile.lock +# Jekyll +_site/ +.sass-cache/ +.jekyll-cache/ +.jekyll-metadata + +# Dependency directories +node_modules/ +vendor/ +.bundle/ + +# Environment and build files +.env +.DS_Store +*.log + +# Editor directories and files +.idea/ +.vscode/ +*.swp +*.swo + +# Build output +dist/ +build/ + +# Backup files +*.bak \ No newline at end of file From 6ae12e2b5b130f4a3ad9f5dc944dff90f0ded616 Mon Sep 17 00:00:00 2001 From: parker110-crypto Date: Thu, 12 Jun 2025 18:03:30 +0000 Subject: [PATCH 3/7] Create post template with comprehensive author metadata --- _templates/post-template.md | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) create mode 100644 _templates/post-template.md diff --git a/_templates/post-template.md b/_templates/post-template.md new file mode 100644 index 0000000..f758825 --- /dev/null +++ b/_templates/post-template.md @@ -0,0 +1,16 @@ +--- +layout: post +title: "Your Post Title" +date: YYYY-MM-DD HH:MM:SS +/-TTTT +categories: [category1, category2] +tags: [tag1, tag2] +author: + name: "Your Name" # Full name of the author + bio: "Short author bio (optional)" # Optional biographical information + avatar: "/assets/images/authors/your-avatar.jpg" # Optional avatar image path + social: + twitter: "twitter_handle" # Optional social media links + linkedin: "linkedin_profile" +--- + +Start writing your blog post content here. Use Markdown formatting as needed. \ No newline at end of file From c2df182cb9877d62cb7db96ed48ceecce1a9aff8 Mon Sep 17 00:00:00 2001 From: parker110-crypto Date: Thu, 12 Jun 2025 18:03:36 +0000 Subject: [PATCH 4/7] Add author configuration with default and multiple author support --- _config.yml | 43 ++++++++++++++++++------------------------- 1 file changed, 18 insertions(+), 25 deletions(-) diff --git a/_config.yml b/_config.yml index be54b6e..4b7f7ce 100644 --- a/_config.yml +++ b/_config.yml @@ -1,33 +1,26 @@ -baseurl: "/" # The subpath of your site. Use "" if you're hosting a blog at the root level. -url: "http://ellekasai.github.io" # the base hostname & protocol for your site -title: "Co-Lab" +title: Your Blog Name +description: Your blog description -# This is used by feed.xml. Uncomment if you want to use it. -# description: "..." - -gems: - - jemoji -exclude: - - "README.md" - - "CHANGELOG.md" - - "CNAME" - - "Gemfile" - - "Gemfile.lock" -permalink: :title +# Default Author Configuration defaults: - - - scope: - path: "" - type: "pages" - values: - layout: "default" - scope: path: "" type: "posts" values: - layout: "post" + author: + name: "Site Default Author" + bio: "Default author bio" + avatar: "/assets/images/default-avatar.jpg" -# Excerpt settings -excerpt_separator: -show_excerpts: true +# Optional: Additional author-related configurations +authors: + # You can define multiple authors here + john_doe: + name: "John Doe" + bio: "Experienced software developer" + avatar: "/assets/images/authors/john-doe.jpg" + jane_smith: + name: "Jane Smith" + bio: "Technical writer and engineer" + avatar: "/assets/images/authors/jane-smith.jpg" \ No newline at end of file From 45109a5951cd778a68679e637657d964c5260c03 Mon Sep 17 00:00:00 2001 From: parker110-crypto Date: Thu, 12 Jun 2025 18:03:44 +0000 Subject: [PATCH 5/7] Add README with author metadata feature documentation --- README.md | 52 ++++++++++++++++++++++++++++++++++++++++++++++++---- 1 file changed, 48 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index e305d0d..92f914c 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,50 @@ -# Econ3.org Blog -We are exploring Collaborative Economics as a community-driven solution to latestage capitalism. +# Jekyll Author Metadata Implementation -Add to /posts to contribute :) +## Author Metadata Feature -All PRs welcome \ No newline at end of file +This implementation adds a flexible author metadata system to Jekyll blog posts. + +### Features +- Optional author information in post front matter +- Default site-wide author configuration +- Supports rich author metadata (name, bio, avatar, social links) + +### Usage + +#### In Post Front Matter +```yaml +--- +layout: post +title: "Your Post Title" +author: + name: "Your Name" + bio: "Optional author bio" + avatar: "/path/to/avatar.jpg" +--- +``` + +#### Default Author +If no author is specified, the site will use the default author from `_config.yml`. + +### Configuration + +Edit `_config.yml` to set default and additional author information: + +```yaml +defaults: + - scope: + path: "" + type: "posts" + values: + author: + name: "Site Default Author" +``` + +### Best Practices +- Always provide an author name or use site default +- Use consistent avatar image sizes +- Keep bios concise + +### Compatibility +- Works with existing Jekyll posts +- Minimal configuration required \ No newline at end of file From cc7b17c4b29fdbb7b8425c6155c474b63d770168 Mon Sep 17 00:00:00 2001 From: parker110-crypto Date: Thu, 12 Jun 2025 18:03:57 +0000 Subject: [PATCH 6/7] Add author metadata validation script --- scripts/validate_author_metadata.py | 75 +++++++++++++++++++++++++++++ 1 file changed, 75 insertions(+) create mode 100644 scripts/validate_author_metadata.py diff --git a/scripts/validate_author_metadata.py b/scripts/validate_author_metadata.py new file mode 100644 index 0000000..5455f88 --- /dev/null +++ b/scripts/validate_author_metadata.py @@ -0,0 +1,75 @@ +#!/usr/bin/env python3 +import sys +import yaml +import os + +def validate_author_metadata(file_path): + """ + Validate author metadata in Jekyll post front matter + + Args: + file_path (str): Path to the markdown file + + Returns: + bool: True if valid, False otherwise + """ + try: + with open(file_path, 'r') as f: + content = f.read() + + # Extract front matter + if not content.startswith('---'): + return True # No front matter, skip validation + + front_matter_end = content.find('---', 1) + if front_matter_end == -1: + print(f"Invalid front matter in {file_path}") + return False + + front_matter_str = content[3:front_matter_end].strip() + front_matter = yaml.safe_load(front_matter_str) + + # Check author metadata + if 'author' in front_matter: + author = front_matter['author'] + + # Validate name + if isinstance(author, dict) and 'name' in author: + name = author['name'] + if not name or len(name) > 100: + print(f"Invalid author name in {file_path}: must be 1-100 characters") + return False + + # Optional additional validations can be added here + + return True + + except Exception as e: + print(f"Error processing {file_path}: {e}") + return False + +def main(): + # Validate all markdown files in _posts directory + posts_dir = '_posts' + if not os.path.exists(posts_dir): + print(f"No {posts_dir} directory found.") + sys.exit(0) + + invalid_files = [] + for filename in os.listdir(posts_dir): + if filename.endswith('.md') or filename.endswith('.markdown'): + file_path = os.path.join(posts_dir, filename) + if not validate_author_metadata(file_path): + invalid_files.append(file_path) + + if invalid_files: + print("Invalid author metadata in the following files:") + for file in invalid_files: + print(f" - {file}") + sys.exit(1) + + print("All post author metadata is valid.") + sys.exit(0) + +if __name__ == '__main__': + main() \ No newline at end of file From 0e8ee0b9b1da97e3ced7c4a24f3bc6a4cc8e012a Mon Sep 17 00:00:00 2001 From: utukku77 Date: Wed, 18 Jun 2025 00:03:39 +0000 Subject: [PATCH 7/7] Start draft PR