Add repo_url support for project page
This commit is contained in:
parent
80d4a7880d
commit
67ecc032f0
|
@ -4,14 +4,16 @@
|
|||
{%- 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 %}
|
||||
{%- assign repo_url = page.metadata | value: "repo_url" -%}
|
||||
{%- if repo_url == "-- repo_url not found --" -%}
|
||||
{%- capture repo_url %}https://{{ repo_domain }}/bit-badger/{{ repo_name }}{% endcapture -%}
|
||||
{%- endif -%}
|
||||
<h1 class=project-title>
|
||||
{% if parts_count == 1 -%}
|
||||
{{ page.title }}<br>
|
||||
<small><small>
|
||||
<a href="https://{{ repo_domain }}/bit-badger/{{ repo_name }}" target=_blank rel=noopener
|
||||
title="{{ parts[0] }} {{ repo_text }} Repository">
|
||||
View {{ repo_text }} Repo
|
||||
<a href="{{ repo_url }}" target=_blank rel=noopener title="{{ parts[0] }} Source Repository">
|
||||
View Source Repo
|
||||
</a>
|
||||
{% if is_logged_on %} • <a hx-boost=false href="{{ page | edit_page_link }}">Edit Page</a>{% endif %}
|
||||
</small></small>
|
||||
|
@ -28,9 +30,6 @@
|
|||
{% if parts_count > 1 -%}
|
||||
<p class=project-footer>
|
||||
<a href="." title="{{ parts[0] }} Home">« {{ parts[0] }} Home</a>
|
||||
<a href="https://{{ repo_domain }}/bit-badger/{{ repo_name }}" target=_blank rel=noopener
|
||||
title="{{ parts[0] }} {{ repo_text }} Repository">
|
||||
View {{ repo_text }} Repo
|
||||
</a>
|
||||
<a href="{{ repo_url }}" target=_blank rel=noopener title="{{ parts[0] }} Source Repository">View Source Repo</a>
|
||||
{%- endif %}
|
||||
</article>
|
||||
|
|
|
@ -1,2 +1,2 @@
|
|||
Bit Badger Solutions
|
||||
20240421
|
||||
20240428
|
Loading…
Reference in New Issue
Block a user