From bb3a3ca3b294706de452087a67f53ec4db9a53a8 Mon Sep 17 00:00:00 2001
From: Patrick Golden <ptgolden0@gmail.com>
Date: Wed, 13 Nov 2024 16:50:56 -0500
Subject: [PATCH 1/3] Add Atom feed using the jekyll-feed plugin (#2646)

---
 _config.yml         | 3 +++
 _config_header.yml  | 3 +++
 _includes/head.html | 2 ++
 3 files changed, 8 insertions(+)

diff --git a/_config.yml b/_config.yml
index f6d823f32..90866d7ba 100644
--- a/_config.yml
+++ b/_config.yml
@@ -10,6 +10,9 @@ author:
   name: OBO Technical WG
 plugins:
   - jekyll-sitemap
+  - jekyll-feed
+feed:
+  disable_in_development: true
 ## --Anything above this line can be edited in _config_header.yml --
 ## --Everything below this line automatically generated in _config.yml --
 ontologies:
diff --git a/_config_header.yml b/_config_header.yml
index 8b9f995f9..9366d5977 100644
--- a/_config_header.yml
+++ b/_config_header.yml
@@ -10,5 +10,8 @@ author:
   name: OBO Technical WG
 plugins:
   - jekyll-sitemap
+  - jekyll-feed
+feed:
+  disable_in_development: true
 ## --Anything above this line can be edited in _config_header.yml --
 ## --Everything below this line automatically generated in _config.yml --
diff --git a/_includes/head.html b/_includes/head.html
index 8a4037e38..a1cd4a4b5 100644
--- a/_includes/head.html
+++ b/_includes/head.html
@@ -14,6 +14,8 @@
 <!-- Custom stylesheet -->
 <link rel="stylesheet" href="/assets/css/style.css">
 
+{% feed_meta %}
+
 <style>
 html, body {
     height: 100%;

From b6c78bc803ffc0f24f2241be1bce61dc374bc83d Mon Sep 17 00:00:00 2001
From: James Stevenson <james.sharpsteen@gmail.com>
Date: Mon, 25 Nov 2024 10:54:30 -0500
Subject: [PATCH 2/3] feat: add NCBO BioPortal link (#2654)

---
 _layouts/ontology_detail.html    | 29 ++++++++++++++++-------------
 _plugins/bioportal_identifier.rb | 28 ++++++++++++++++++++++++++++
 2 files changed, 44 insertions(+), 13 deletions(-)
 create mode 100644 _plugins/bioportal_identifier.rb

diff --git a/_layouts/ontology_detail.html b/_layouts/ontology_detail.html
index ce3ce1289..8bdc6d2f3 100644
--- a/_layouts/ontology_detail.html
+++ b/_layouts/ontology_detail.html
@@ -55,31 +55,34 @@ <h1>
     <div class="card" style="margin-bottom: 1.5em;">
       <div class="card-body">
         <!-- TODO: each ontology should configure which browsers to be exposed in -->
-        <a href="https://ontobee.org/ontology/{{page.id}}" class="btn btn-outline-primary">
+        <a href="https://ontobee.org/ontology/{{page.id}}" class="btn btn-outline-primary" target="_blank" rel="noopener">
           OntoBee
         </a>
         {% if page.aberowl_id %}
-        <a href="http://aber-owl.net/ontology/{{page.aberowl_id | upcase}}" class="btn btn-outline-primary">
-          AberOWL
-        </a>
+          <a href="http://aber-owl.net/ontology/{{page.aberowl_id | upcase}}" class="btn btn-outline-primary" target="_blank" rel="noopener">
+            AberOWL
+          </a>
         {% else %}
-        <a href="http://aber-owl.net/ontology/{{page.id | upcase}}" class="btn btn-outline-primary">
-          AberOWL
-        </a>
+          <a href="http://aber-owl.net/ontology/{{page.id | upcase}}" class="btn btn-outline-primary" target="_blank" rel="noopener">
+            AberOWL
+          </a>
         {% endif %}
-        <a href="http://www.ebi.ac.uk/ols/ontologies/{{page.id}}" class="btn btn-outline-primary">
+        <a href="http://www.ebi.ac.uk/ols/ontologies/{{page.id}}" class="btn btn-outline-primary" target="_blank" rel="noopener">
           OLS
         </a>
-        {% for b in page.browsers %}
-        <a href="{{b.url}}" class="btn btn-outline-primary">
-          {{b.label}}
+        <a href="https://bioportal.bioontology.org/ontologies/{{ page.id | make_bioportal_id }}" class="btn btn-outline-primary" target="_blank" rel="noopener">
+          BioPortal
         </a>
+        {% for b in page.browsers %}
+          <a href="{{b.url}}" class="btn btn-outline-primary" target="_blank" rel="noopener">
+            {{b.label}}
+          </a>
         {% endfor %}
-        <a href="https://bioregistry.io/metaregistry/obofoundry/{{page.id}}" class="btn btn-outline-primary">
+        <a href="https://bioregistry.io/metaregistry/obofoundry/{{page.id}}" class="btn btn-outline-primary" target="_blank" rel="noopener">
          Bioregistry
         </a>
         {% if stripped_content_size > 0 %}
-        <p class="card-text">{{ content }}</p>
+          <p class="card-text">{{ content }}</p>
         {% endif %}
       </div>
     </div>
diff --git a/_plugins/bioportal_identifier.rb b/_plugins/bioportal_identifier.rb
new file mode 100644
index 000000000..7c37d23e9
--- /dev/null
+++ b/_plugins/bioportal_identifier.rb
@@ -0,0 +1,28 @@
+module CustomFilter
+  def make_bioportal_id(obo_id)
+    return obo_id unless obo_id.is_a?(String)
+
+    # ID requirements should be locked down moving forward, so additions to this table
+    # should be rare
+    special_cases = {
+      'fbbt' => 'FB-BT',
+      'ro' => 'OBOREL',
+      'apollo_sv' => 'APOLLO-SV',
+      'trans' => 'PTRANS',
+      'wbls' => 'WB-LS',
+      'fbdv' => 'FB-DV',
+      'wbbt' => 'WB-BT',
+      'wbphenotype' => 'WB-PHENOTYPE',
+      'to' => 'PTO',
+      'fbcv' => 'FB-CV',
+      'mod' => 'PSIMOD',
+      'pso' => 'PLANTSO'
+    }
+
+    return special_cases[obo_id] if special_cases.key? obo_id
+
+    obo_id == obo_id.downcase ? obo_id.upcase : obo_id
+  end
+end
+
+Liquid::Template.register_filter(CustomFilter)

From 13620af6f7bc6df13bcc16dc3088da692c820147 Mon Sep 17 00:00:00 2001
From: James Stevenson <james.sharpsteen@gmail.com>
Date: Mon, 25 Nov 2024 13:26:00 -0500
Subject: [PATCH 3/3] fix: fix bioportal link generation and remove redundant
 links (#2655)

* fix bioportal button render issues. remove custom liquid filter (unsupported by github actions deployment)
* don't make redundant buttons when ontology already provides link
---
 _layouts/ontology_detail.html    | 41 +++++++++++++++++++++++++++++---
 _plugins/bioportal_identifier.rb | 28 ----------------------
 2 files changed, 38 insertions(+), 31 deletions(-)
 delete mode 100644 _plugins/bioportal_identifier.rb

diff --git a/_layouts/ontology_detail.html b/_layouts/ontology_detail.html
index 8bdc6d2f3..dc00f9666 100644
--- a/_layouts/ontology_detail.html
+++ b/_layouts/ontology_detail.html
@@ -70,9 +70,44 @@ <h1>
         <a href="http://www.ebi.ac.uk/ols/ontologies/{{page.id}}" class="btn btn-outline-primary" target="_blank" rel="noopener">
           OLS
         </a>
-        <a href="https://bioportal.bioontology.org/ontologies/{{ page.id | make_bioportal_id }}" class="btn btn-outline-primary" target="_blank" rel="noopener">
-          BioPortal
-        </a>
+        {% assign skip_bioportal = false %}
+        {% for browser in page.browsers %}
+          {% if browser.label == "BioPortal" %}
+            {% assign skip_bioportal = true %}
+          {% endif %}
+        {% endfor %}
+
+        {% unless skip_bioportal %}
+          {% assign bioportal_id = page.id | upcase %}
+          {% if bioportal_id == 'FBBT' %}
+            {% assign bioportal_id = 'FB-BT' %}
+          {% elsif bioportal_id == 'RO' %}
+            {% assign bioportal_id = 'OBOREL' %}
+          {% elsif bioportal_id == 'APOLLO_SV' %}
+            {% assign bioportal_id = 'APOLLO-SV' %}
+          {% elsif bioportal_id == 'TRANS' %}
+            {% assign bioportal_id = 'PTRANS' %}
+          {% elsif bioportal_id == 'WBLS' %}
+            {% assign bioportal_id = 'WB-LS' %}
+          {% elsif bioportal_id == 'FBDV' %}
+            {% assign bioportal_id = 'FB-DV' %}
+          {% elsif bioportal_id == 'WBBT' %}
+            {% assign bioportal_id = 'WB-BT' %}
+          {% elsif bioportal_id == 'WBPHENOTYPE' %}
+            {% assign bioportal_id = 'WB-PHENOTYPE' %}
+          {% elsif bioportal_id == 'TO' %}
+            {% assign bioportal_id = 'PTO' %}
+          {% elsif bioportal_id == 'FBCV' %}
+            {% assign bioportal_id = 'FB-CV' %}
+          {% elsif bioportal_id == 'MOD' %}
+            {% assign bioportal_id = 'PSIMOD' %}
+          {% elsif bioportal_id == 'PSO' %}
+            {% assign bioportal_id = 'PLANTSO' %}
+          {% endif %}
+          <a href="https://bioportal.bioontology.org/ontologies/{{ bioportal_id }}" class="btn btn-outline-primary" target="_blank" rel="noopener">
+            BioPortal
+          </a>
+        {% endunless %}
         {% for b in page.browsers %}
           <a href="{{b.url}}" class="btn btn-outline-primary" target="_blank" rel="noopener">
             {{b.label}}
diff --git a/_plugins/bioportal_identifier.rb b/_plugins/bioportal_identifier.rb
deleted file mode 100644
index 7c37d23e9..000000000
--- a/_plugins/bioportal_identifier.rb
+++ /dev/null
@@ -1,28 +0,0 @@
-module CustomFilter
-  def make_bioportal_id(obo_id)
-    return obo_id unless obo_id.is_a?(String)
-
-    # ID requirements should be locked down moving forward, so additions to this table
-    # should be rare
-    special_cases = {
-      'fbbt' => 'FB-BT',
-      'ro' => 'OBOREL',
-      'apollo_sv' => 'APOLLO-SV',
-      'trans' => 'PTRANS',
-      'wbls' => 'WB-LS',
-      'fbdv' => 'FB-DV',
-      'wbbt' => 'WB-BT',
-      'wbphenotype' => 'WB-PHENOTYPE',
-      'to' => 'PTO',
-      'fbcv' => 'FB-CV',
-      'mod' => 'PSIMOD',
-      'pso' => 'PLANTSO'
-    }
-
-    return special_cases[obo_id] if special_cases.key? obo_id
-
-    obo_id == obo_id.downcase ? obo_id.upcase : obo_id
-  end
-end
-
-Liquid::Template.register_filter(CustomFilter)