Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
28 changes: 25 additions & 3 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,25 @@
_site
.sass-cache
Gemfile.lock
# Jekyll specific
_site/
.sass-cache/
.jekyll-cache/
.jekyll-metadata

# Dependency directories
node_modules/

# Environment files
.env

# Build output
dist/

# Temporary files
*.swp
.DS_Store

# Logs
*.log

# IDE-specific files
.vscode/
.idea/
33 changes: 29 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,31 @@
# Econ3.org Blog
We are exploring Collaborative Economics as a community-driven solution to latestage capitalism.
# Jekyll Blog with Author Metadata

Add to /posts to contribute :)
## Author Metadata Feature

All PRs welcome
This Jekyll site supports rich author metadata for blog posts.

### Adding Author Information

In your blog post's front matter, you can specify author details:

```yaml
---
layout: post
title: "My Blog Post"
author:
name: "John Doe"
bio: "Software developer and tech enthusiast"
email: "john.doe@example.com"
twitter: "@johndoe"
---
```

### Default Author

If no author is specified, the site's default author (set in `_config.yml`) will be used.

### Features
- Per-post author metadata
- Default site-wide author
- Displayed on post pages and index
- Flexible and extensible
38 changes: 10 additions & 28 deletions _config.yml
Original file line number Diff line number Diff line change
@@ -1,33 +1,15 @@
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"
# Site settings
title: My Jekyll Blog
description: A blog with author metadata support

# 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:
- scope:
path: ""
type: "posts"
values:
layout: "post"

# Excerpt settings
excerpt_separator: <!--more-->
show_excerpts: true
author:
name: "Default Site Author"
bio: "A writer who shares thoughts and insights"
email: "default@example.com"
twitter: "@defaultauthor"
61 changes: 21 additions & 40 deletions _layouts/post.html
Original file line number Diff line number Diff line change
@@ -1,46 +1,27 @@
---
layout: default
---

<div class="post-header">
<h1 class="post-title-main">{{ page.title }}</h1>
{% include post-header.html %}
</div>
<div class="post-content">
{{ content }}
</div>
<div class="post-footer">
{% include post-footer.html %}
</div>
{% if site.data.theme.show_post_navs %}
{% if page.previous or page.next %}
<div class="post-navs">
{% if page.previous %}
<div class="post-nav">
<h3 class="section-header">
Older
<span class="text-muted"> &middot; </span>
<a href="{{ "/archive" }}">View Archive ({{ site.posts.size }})</a>
</h3>
<h2 class="post-title-link"><a href="{{ page.previous.url }}">{{ page.previous.title }}</a></h2>
{% assign prev_excerpt = page.previous.content | replace: '_By Al Morris_', '' | replace: 'By Al Morris', '' | replace: '*By Al Morris*', '' | strip_html | truncatewords: 25 %}
<p>{{ prev_excerpt }}</p>
</div>
<article class="post">
<header class="post-header">
<h1 class="post-title">{{ page.title }}</h1>

{% if page.author %}
<div class="post-author">
<h3>Author: {{ page.author.name }}</h3>
{% if page.author.bio %}
<p class="author-bio">{{ page.author.bio }}</p>
{% endif %}
{% if page.next %}
<div class="post-nav" {% if page.previous %}style="margin-top: 30px;"{% endif %}>
<h3 class="section-header">
Newer
{% unless page.previous %}
<span class="text-muted"> &middot; </span>
<a href="{{ "/archive" }}">View Archive ({{ site.posts.size }})</a>
{% endunless %}
</h3>
<h2 class="post-title-link"><a href="{{ page.next.url }}">{{ page.next.title }}</a></h2>
{% assign next_excerpt = page.next.content | replace: '_By Al Morris_', '' | replace: 'By Al Morris', '' | replace: '*By Al Morris*', '' | strip_html | truncatewords: 25 %}
<p>{{ next_excerpt }}</p>
</div>

{% if page.author.twitter %}
<a href="https://twitter.com/{{ page.author.twitter | remove_first: '@' }}" target="_blank">
Twitter: {{ page.author.twitter }}
</a>
{% endif %}
</div>
{% endif %}
{% endif %}
{% endif %}
</header>

<div class="post-content">
{{ content }}
</div>
</article>
17 changes: 17 additions & 0 deletions _posts/2023-08-15-welcome-to-jekyll.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
---
layout: post
title: "Welcome to Jekyll with Author Metadata"
date: 2023-08-15
author:
name: "John Doe"
bio: "Software developer and tech enthusiast"
email: "john.doe@example.com"
twitter: "@johndoe"
categories: [tech, blogging]
---

# Welcome to My Blog

This is a sample blog post demonstrating the new author metadata feature in our Jekyll site.

The author metadata allows us to provide rich information about the content creator directly in the front matter.
40 changes: 22 additions & 18 deletions index.html
Original file line number Diff line number Diff line change
@@ -1,21 +1,25 @@
---
layout: default
title: Home
---


{% for post in site.posts limit:site.data.theme.num_home_posts %}
<div class="post-header-home">
<h1 class="post-title-home">
<a href="{{ post.url }}">{{ post.title }}</a>
</h1>
{% include post-header-home.html %}
</div>
<div class="post-excerpt-home">
{% assign excerpt_content = post.content | replace: '_By Al Morris_', '' | replace: 'By Al Morris', '' | replace: '*By Al Morris*', '' | strip_html | truncatewords: 50 %}
{{ excerpt_content }}
<p class="text-right"><a href="{{ post.url }}">Continue Reading &rarr;</a></p>
</div>
{% endfor %}
<hr>
<div class="home-read-more">
<a href="{{ "/archive" }}" class="btn btn-primary btn-block btn-lg">View All {{ site.posts | size }} Articles →</a>
</div>
<div class="home">
<h1>Blog Posts</h1>

{% for post in site.posts %}
<article>
<h2><a href="{{ post.url }}">{{ post.title }}</a></h2>

{% if post.author %}
<div class="post-author-preview">
<strong>Author:</strong> {{ post.author.name }}
{% if post.author.bio %}
<p>{{ post.author.bio }}</p>
{% endif %}
</div>
{% endif %}

<p>{{ post.excerpt }}</p>
</article>
{% endfor %}
</div>