From 12db3e1ff1773d52fc4960116ac2710879720c7b Mon Sep 17 00:00:00 2001 From: Leah Wasser Date: Wed, 20 Nov 2024 17:01:47 -0700 Subject: [PATCH 1/2] fix: force create joss cross ref badge --- _includes/package-grid.html | 17 ++++++++++++++++- 1 file changed, 16 insertions(+), 1 deletion(-) diff --git a/_includes/package-grid.html b/_includes/package-grid.html index db9db3db..52e5e6c6 100644 --- a/_includes/package-grid.html +++ b/_includes/package-grid.html @@ -43,9 +43,24 @@

{% endif %}
  • View Review
  • {% if apackage.joss %} -
  • JOSS Approved
  • + {% assign raw_string = apackage.joss %} + {%- comment -%} + Step 1: Split to isolate the DOI URL from the markdown string + {%- endcomment -%} + {% assign doi_url = raw_string | split: 'doi.org/' | last %} + {% assign doi_url = doi_url | split: ')' | first %} + + {%- comment -%} + Render the cleaned DOI as an HTML badge and link + {%- endcomment -%} +
  • JOSS Published + + DOI badge for {{ doi }} + +
  • {% endif %} {% if apackage.astropy %} + True
  • Astropy
  • {% endif %} {% if apackage.sunpy %} From e0a8772ad5125750390ab473aa30c91e5b5e4407 Mon Sep 17 00:00:00 2001 From: Leah Wasser Date: Wed, 20 Nov 2024 18:06:02 -0700 Subject: [PATCH 2/2] fix: some links are fixed but others still broken --- _includes/package-grid.html | 38 +++++++++++++++++++++++++++---------- 1 file changed, 28 insertions(+), 10 deletions(-) diff --git a/_includes/package-grid.html b/_includes/package-grid.html index 52e5e6c6..deba52c4 100644 --- a/_includes/package-grid.html +++ b/_includes/package-grid.html @@ -38,22 +38,40 @@

    {% if apackage.gh_meta.documentation %}
  • View Docs
  • {% endif %} - {% if apackage.citation-link %} -
  • Cite
  • - {% endif %}
  • View Review
  • + + {% if apackage.archive and apackage.joss == nil %} + {% assign raw_string = apackage.archive %} + {% if raw_string contains "github.com" %} + +
  • + + GitHub Tag: + +
  • + {% elsif raw_string contains "latest" %} +
  • Missing tagged DOI
  • + {% elsif raw_string contains "doi.org/" %} + + + {% assign doi_url = raw_string | split: 'doi.org/' | last %} + {% assign doi = doi_url | split: ')' | first %} +
  • + Cite: + DOI badge for {{ doi }} + +
  • + {% endif %} + {% endif %} + {% if apackage.joss %} - {% assign raw_string = apackage.joss %} + {% assign raw_string = apackage.joss %} {%- comment -%} - Step 1: Split to isolate the DOI URL from the markdown string + Split to isolate the DOI URL from the markdown string {%- endcomment -%} {% assign doi_url = raw_string | split: 'doi.org/' | last %} {% assign doi_url = doi_url | split: ')' | first %} - - {%- comment -%} - Render the cleaned DOI as an HTML badge and link - {%- endcomment -%} -
  • JOSS Published +
  • Cite: DOI badge for {{ doi }}