elixir-toolkit-theme-plugins 0.1.6 → 0.1.8
Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: ef9ddfcb96e78a35a5d6597133158ccafdbc78926bbd62cfbcb44aac5e312b96
|
4
|
+
data.tar.gz: f4ac9a49766e82db210d70e5da5d3dde41eafb24662b0946fea19a6feacf1e1c
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: bbfb12893a2b0e10084c21f9334cac6bcfe76e398e9410314399e3125e64e36a97838476ead2920b6420e4aba3e21e3b536cb039f9ab1bc194e8678a5df33fef
|
7
|
+
data.tar.gz: d01c938162325ea0555355b52ccd34a7d913bcca9bb20f01cc8dc661f4a80c90af9b295039b7248d1a8ebbb7aa0d37ce04b65e4edbb2097348a2dd524fe3c90b
|
data/README.md
CHANGED
@@ -1 +1,9 @@
|
|
1
|
-
#
|
1
|
+
# ELIXIR Toolkit Theme Plugins
|
2
|
+
|
3
|
+
Here we collect scripts to add aditional features to the [ELIXIR Toolkit Theme](https://github.com/ELIXIR-Belgium/elixir-toolkit-theme).
|
4
|
+
|
5
|
+
This features include:
|
6
|
+
|
7
|
+
* An improved way of tagging tools from a central tools table in the content of a page.
|
8
|
+
* Making sure the correct Git branch is detected when the theme is being deployed.
|
9
|
+
|
@@ -20,14 +20,14 @@ module Jekyll
|
|
20
20
|
|
21
21
|
def load_page_data
|
22
22
|
@related_pages = {}
|
23
|
-
pages_path = File.join(Dir.pwd, "
|
23
|
+
pages_path = File.join(Dir.pwd, "**", "*.md")
|
24
24
|
Dir.glob(pages_path).each do |f|
|
25
25
|
file = File.read(f)
|
26
26
|
page_id_matches = file.match(/page_id:\s*(\w+)/)
|
27
27
|
|
28
28
|
if page_id_matches
|
29
29
|
page_id = page_id_matches[1]
|
30
|
-
file.scan(/\{
|
30
|
+
file.scan(/\{%\s*tool\s*"([^"]+)"\s*%}/).flatten.each do |m|
|
31
31
|
@related_pages[m] = Set[] unless @related_pages[m]
|
32
32
|
@related_pages[m].add(page_id)
|
33
33
|
end
|
@@ -59,12 +59,17 @@ module Jekyll
|
|
59
59
|
if registry["tess"]
|
60
60
|
tags << create_tag("https://tess.elixir-europe.org/search?q=#{registry["tess"]}", "fa-graduation-cap", "Training")
|
61
61
|
end
|
62
|
+
|
63
|
+
if registry["europmc"]
|
64
|
+
tags << create_tag("https://europepmc.org/article/MED/#{registry["europmc"]}", "fa-book", "Publication")
|
65
|
+
end
|
66
|
+
|
62
67
|
end
|
63
68
|
tags
|
64
69
|
end
|
65
70
|
|
66
71
|
def create_tag(url, icon, label)
|
67
|
-
"<a href='#{url}' class='mt-2 me-2'><span class='badge bg-dark text-white hover-primary'><i class='fa-solid #{icon} me-2'></i>#{label}</span></a>"
|
72
|
+
"<a href='#{url}' target='_blank' rel='noopener' class='mt-2 me-2'><span class='badge bg-dark text-white hover-primary'><i class='fa-solid #{icon} me-2'></i>#{label}</span></a>"
|
68
73
|
end
|
69
74
|
end
|
70
75
|
end
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: elixir-toolkit-theme-plugins
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.8
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- bedroesb
|
@@ -10,7 +10,7 @@ authors:
|
|
10
10
|
autorequire:
|
11
11
|
bindir: bin
|
12
12
|
cert_chain: []
|
13
|
-
date: 2023-
|
13
|
+
date: 2023-07-26 00:00:00.000000000 Z
|
14
14
|
dependencies:
|
15
15
|
- !ruby/object:Gem::Dependency
|
16
16
|
name: jekyll
|