{# CV Page Builder - renders configured layout, sections, and sidebar from cvPageConfig (written by indiekit-endpoint-cv plugin) #} {% 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 %} {% set cvLocality = cvId.locality or site.author.locality %} {% set cvCountry = cvId.country or site.author.country %} {% set cvOrg = cvId.org or site.author.org %} {% set cvUrl = cvId.url or '' %} {% set cvEmail = cvId.email or site.author.email %} {% set cvKeyUrl = cvId.keyUrl or site.author.keyUrl %} {# Hero — rendered at top when enabled (default: true) #} {% if cvPageConfig.hero.enabled != false %}
{{ authorName }}

{{ authorName }}

{% if authorTitle %}

{{ authorTitle }}

{% endif %} {% if authorBio %}

{{ authorBio }}

{% endif %} {% if authorDescription %}
More about me ↓

{{ authorDescription }}

{% endif %} {% from "components/social-icon.njk" import socialIcon, socialIconColorClass %} {% if cvPageConfig.hero.showSocial != false and socialLinks %}
{% for link in socialLinks %} {{ socialIcon(link.icon, "w-5 h-5") }} {{ link.name }} {% endfor %}
{% endif %} {# Contact details — location, organization, website, email, PGP #} {% if cvLocality or cvCountry or cvOrg or cvUrl or cvEmail or cvKeyUrl %}
{% if cvLocality or cvCountry %} {% if cvLocality %}{{ cvLocality }}{% endif %}{% if cvLocality and cvCountry %}, {% endif %}{% if cvCountry %}{{ cvCountry }}{% endif %} {% endif %} {% if cvOrg %} {{ cvOrg }} {% endif %} {% if cvUrl %} {{ cvUrl | replace("https://", "") | replace("http://", "") }} {% endif %} {% if cvEmail %} {{ cvEmail }} {% endif %} {% if cvKeyUrl %} PGP Key {% endif %}
{% endif %}
{% endif %} {# Layout wrapper #} {% if layout == "single-column" %} {# Single column — no sidebar, full width sections #}
{% for section in cvPageConfig.sections %} {% include "components/homepage-section.njk" %} {% endfor %}
{% elif layout == "two-column" and hasSidebar %} {# Two column — sections + sidebar #}
{% for section in cvPageConfig.sections %} {% include "components/homepage-section.njk" %} {% endfor %}
{% elif layout == "full-width-hero" %} {# Full width hero (already rendered above), then two-column below #} {% if hasSidebar %}
{% for section in cvPageConfig.sections %} {% include "components/homepage-section.njk" %} {% endfor %}
{% else %}
{% for section in cvPageConfig.sections %} {% include "components/homepage-section.njk" %} {% endfor %}
{% endif %} {% else %} {# Fallback — two-column without sidebar, or unknown layout #}
{% for section in cvPageConfig.sections %} {% include "components/homepage-section.njk" %} {% endfor %}
{% endif %} {# Last Updated #} {% if cv.lastUpdated %}

Last updated:

{% endif %} {# Footer — rendered after the main layout, full width #} {% include "components/cv-footer.njk" %}