Handle GitHub and self-hosted repos
This commit is contained in:
parent
2e7f976d8a
commit
80d4a7880d
|
@ -1,13 +1,17 @@
|
||||||
<article class="content auto">
|
<article class="content auto">
|
||||||
{%- assign parts = page.title | split: ' » ' -%}
|
{%- assign parts = page.title | split: ' » ' -%}
|
||||||
{%- assign parts_count = parts | size -%}
|
{%- assign parts_count = parts | size -%}
|
||||||
|
{%- capture repo_name %}{% if parts_count == 1 %}{{ page.title }}{% else %}{{ parts[0] }}{% endif %}{% endcapture -%}
|
||||||
|
{%- assign is_github = page.metadata | value: "is_github" -%}
|
||||||
|
{%- capture repo_domain %}{% if is_github == "true" %}github.com{% else %}git.bitbadger.solutions{% endif %}{% endcapture %}
|
||||||
|
{%- capture repo_text %}{% if is_github == "true" %}GitHub{% else %}Source{% endif %}{% endcapture %}
|
||||||
<h1 class=project-title>
|
<h1 class=project-title>
|
||||||
{% if parts_count == 1 -%}
|
{% if parts_count == 1 -%}
|
||||||
{{ page.title }}<br>
|
{{ page.title }}<br>
|
||||||
<small><small>
|
<small><small>
|
||||||
<a href="https://git.bitbadger.solutions/bit-badger/{{ page.title }}" target=_blank rel=noopener
|
<a href="https://{{ repo_domain }}/bit-badger/{{ repo_name }}" target=_blank rel=noopener
|
||||||
title="{{ parts[0] }} Git Repository">
|
title="{{ parts[0] }} {{ repo_text }} Repository">
|
||||||
View Source Repo
|
View {{ repo_text }} Repo
|
||||||
</a>
|
</a>
|
||||||
{% if is_logged_on %} • <a hx-boost=false href="{{ page | edit_page_link }}">Edit Page</a>{% endif %}
|
{% if is_logged_on %} • <a hx-boost=false href="{{ page | edit_page_link }}">Edit Page</a>{% endif %}
|
||||||
</small></small>
|
</small></small>
|
||||||
|
@ -24,9 +28,9 @@
|
||||||
{% if parts_count > 1 -%}
|
{% if parts_count > 1 -%}
|
||||||
<p class=project-footer>
|
<p class=project-footer>
|
||||||
<a href="." title="{{ parts[0] }} Home">« {{ parts[0] }} Home</a>
|
<a href="." title="{{ parts[0] }} Home">« {{ parts[0] }} Home</a>
|
||||||
<a href="https://git.bitbadger.solutions/bit-badger/{{ parts[0] }}" target=_blank rel=noopener
|
<a href="https://{{ repo_domain }}/bit-badger/{{ repo_name }}" target=_blank rel=noopener
|
||||||
title="{{ parts[0] }} Git Repository">
|
title="{{ parts[0] }} {{ repo_text }} Repository">
|
||||||
View Source Repo
|
View {{ repo_text }} Repo
|
||||||
</a>
|
</a>
|
||||||
{%- endif %}
|
{%- endif %}
|
||||||
</article>
|
</article>
|
||||||
|
|
|
@ -1,2 +1,2 @@
|
||||||
Bit Badger Solutions
|
Bit Badger Solutions
|
||||||
20240420
|
20240421
|
Loading…
Reference in New Issue
Block a user