From f2f0517c9dc1aa0005563e59c8b730a31a2e04f7 Mon Sep 17 00:00:00 2001 From: Egor Tensin Date: Sun, 7 Nov 2021 21:42:04 +0300 Subject: header: workaround jekyll-github-metadata bug? --- _includes/common/header.html | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) (limited to '_includes/common') diff --git a/_includes/common/header.html b/_includes/common/header.html index fc99302..a41b26e 100644 --- a/_includes/common/header.html +++ b/_includes/common/header.html @@ -7,8 +7,17 @@ {% assign project_name = site.settings.project.name %} {% unless project_name %} - {% if site.github && site.github.is_project_page %} - {% assign project_name = site.github.repository_name %} + {% if site.github %} + {% comment %} + What the damn hell? site.github.is_project_page is set to true even + for my root user site (the one with the .github.io suffix). + TODO: remove the following workaround and replace with a simple check + site.github.is_project_page above when this is fixed? + {% endcomment %} + {% capture assumed_user_name %}{{ site.github.owner_name }}.github.io{% endcapture %} + {% if site.github.repository_name != assumed_user_name %} + {% assign project_name = site.github.repository_name %} + {% endif %} {% endif %} {% endunless %} {% assign author_name = site.settings.author.name %} -- cgit v1.2.3