diff --git a/_includes/components/cv-builder.njk b/_includes/components/cv-builder.njk index 4af77bf..bb0b608 100644 --- a/_includes/components/cv-builder.njk +++ b/_includes/components/cv-builder.njk @@ -6,39 +6,55 @@ {% set layout = cvPageConfig.layout or "single-column" %} {% set hasSidebar = cvPageConfig.sidebar and cvPageConfig.sidebar.length %} +{# CV identity — check cvPageConfig.identity first, fall back to site.author #} +{% set cvId = cvPageConfig.identity if (cvPageConfig and cvPageConfig.identity) else {} %} +{% set authorName = cvId.name or site.author.name %} +{% set authorAvatar = cvId.avatar or site.author.avatar %} +{% set authorTitle = cvId.title or site.author.title %} +{% set authorBio = cvId.bio or site.author.bio %} +{% set authorDescription = cvId.description or '' %} +{% set socialLinks = cvId.social if (cvId.social and cvId.social.length) else site.social %} + {# Hero — rendered at top when enabled (default: true) #} {% if cvPageConfig.hero.enabled != false %}
{{ site.author.name }}

- {{ site.author.name }} + {{ authorName }}

- {% if site.author.title %} + {% if authorTitle %}

- {{ site.author.title }} + {{ authorTitle }}

{% endif %} - {% if site.author.bio %} + {% if authorBio %}

- {{ site.author.bio }} + {{ authorBio }}

{% endif %} - {% if cvPageConfig.hero.showSocial != false %} + {% if authorDescription %} +

+ {{ authorDescription }} +

+ {% endif %} + {% from "components/social-icon.njk" import socialIcon %} + {% if cvPageConfig.hero.showSocial != false and socialLinks %}
- {% for link in site.social %} + {% for link in socialLinks %} + {{ socialIcon(link.icon, "w-5 h-5") }} {{ link.name }} {% endfor %} diff --git a/cv.njk b/cv.njk index e55d789..2e2f9d8 100644 --- a/cv.njk +++ b/cv.njk @@ -21,41 +21,53 @@ pagefindIgnore: true {# Fallback — hardcoded layout for backward compatibility #} {% else %} + {# CV identity — check cvPageConfig.identity first, fall back to site.author #} + {% set cvId = cvPageConfig.identity if (cvPageConfig and cvPageConfig.identity) else {} %} + {% set authorName = cvId.name or site.author.name %} + {% set authorAvatar = cvId.avatar or site.author.avatar %} + {% set authorTitle = cvId.title or site.author.title %} + {% set authorBio = cvId.bio or site.author.bio %} + {% set socialLinks = cvId.social if (cvId.social and cvId.social.length) else site.social %} + {# Hero / intro #}
{{ site.author.name }}

- {{ site.author.name }} + {{ authorName }}

- {% if site.author.title %} + {% if authorTitle %}

- {{ site.author.title }} + {{ authorTitle }}

{% endif %} - {% if site.author.bio %} + {% if authorBio %}

- {{ site.author.bio }} + {{ authorBio }}

{% endif %} + {% from "components/social-icon.njk" import socialIcon %} + {% if socialLinks %}
- {% for link in site.social %} + {% for link in socialLinks %} + {{ socialIcon(link.icon, "w-5 h-5") }} {{ link.name }} {% endfor %}
+ {% endif %}