diff --git a/_includes/components/sections/hero.njk b/_includes/components/sections/hero.njk index 6763ee9..262684a 100644 --- a/_includes/components/sections/hero.njk +++ b/_includes/components/sections/hero.njk @@ -11,33 +11,36 @@ {% set authorBio = id.bio if (id.bio is defined) else site.author.bio %} {% set siteDescription = id.description if (id.description is defined) else site.description %} {% set socialLinks = id.social if (id.social is defined) else site.social %} +{% set authorUrl = id.url if (id.url is defined and id.url) else (site.author.url or site.url) %} -
+
{# Avatar #} {% if heroConfig.showAvatar != false %} - {{ authorName }} + + {{ authorName }} + {% endif %} {# Introduction #}

- {{ authorName }} + {{ authorName }}

{% if authorTitle %} -

+

{{ authorTitle }}

{% endif %} {% if authorBio %} -

+

{{ authorBio }}

{% endif %} diff --git a/_includes/layouts/home.njk b/_includes/layouts/home.njk index 65742f4..b7c03da 100644 --- a/_includes/layouts/home.njk +++ b/_includes/layouts/home.njk @@ -3,175 +3,4 @@ layout: layouts/base.njk withSidebar: true --- -{# Homepage content — two-tier fallback: #} -{# 1. Plugin config (homepageConfig) — homepage builder controls everything #} -{# 2. Default — show recent posts with default hero #} - -{# Default hero — only shown for Tier 2 (plugin controls its own hero) #} -{% if not (homepageConfig and homepageConfig.sections) %} -
-
- {# Avatar #} - {{ site.author.name }} - - {# Introduction #} -
-

- {{ site.author.name }} -

-

- {{ site.author.title }} -

- {% if site.author.bio %} -

- {{ site.author.bio }} -

- {% endif %} - {% if site.description %} -

- {{ site.description }} - Read more → -

- {% endif %} - - {# Social Links #} - {% from "components/social-icon.njk" import socialIcon, socialIconColorClass %} -
- {% for link in site.social %} - - {{ socialIcon(link.icon, "w-5 h-5") }} - {{ link.name }} - - {% endfor %} -
-
-
-
-{% endif %} - -{# --- Tier 1: Plugin-driven layout --- #} -{% if homepageConfig and homepageConfig.sections %} - {% include "components/homepage-builder.njk" %} - -{# --- Tier 2: Default — recent posts and explore links --- #} -{% else %} - -{# Recent Posts #} -{% if collections.posts and collections.posts.length %} -
-

Recent Posts

-
    - {% for post in collections.posts | head(10) %} - {% set likedUrl = post.data.likeOf or post.data.like_of %} - {% set bookmarkedUrl = post.data.bookmarkOf or post.data.bookmark_of %} - {% set repostedUrl = post.data.repostOf or post.data.repost_of %} - {% set replyToUrl = post.data.inReplyTo or post.data.in_reply_to %} - - {% set borderClass = "border-l-[3px] border-l-surface-300 dark:border-l-surface-600" %} - {% if likedUrl %} - {% set borderClass = "border-l-[3px] border-l-red-400 dark:border-l-red-500" %} - {% elif bookmarkedUrl %} - {% set borderClass = "border-l-[3px] border-l-amber-400 dark:border-l-amber-500" %} - {% elif repostedUrl %} - {% set borderClass = "border-l-[3px] border-l-green-400 dark:border-l-green-500" %} - {% elif replyToUrl %} - {% set borderClass = "border-l-[3px] border-l-sky-400 dark:border-l-sky-500" %} - {% endif %} - - {% set postTitle = ((post.data.title or post.data.name or "") | trim) %} -
  • - {% if postTitle %} -

    - - {{ postTitle }} - -

    - {% endif %} - - {% if post.data.summary %} -

    - {{ post.data.summary }} -

    - {% endif %} - - -
  • - {% endfor %} -
- - View all posts - - -
-{% endif %} - -{# Explore — quick links to key sections #} -
-

Explore

- -
- -{# Posting Activity — contribution graph (Tier 2 default only) #} -{% if collections.posts and collections.posts.length %} -
-

Posting Activity

- {% postGraph collections.posts %} - - View full history - - - - -
-{% endif %} - -{% endif %} {# end two-tier fallback #} +{% include "components/homepage-builder.njk" %}