Skip to content

Commit

Permalink
Merge pull request #4485 from galaxyproject/robin-bicolor
Browse files Browse the repository at this point in the history
expose version number
  • Loading branch information
shiltemann authored Nov 6, 2023
2 parents cd178df + 60cbc81 commit f8b1dfc
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 1 deletion.
1 change: 1 addition & 0 deletions _config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -203,6 +203,7 @@ icon-tag:
video: fas fa-video
video-slides: far fa-play-circle
zenodo_link: far fa-copy
version: fas fa-code-commit

# To exclude in _site
exclude:
Expand Down
5 changes: 4 additions & 1 deletion _layouts/tutorial_hands_on.html
Original file line number Diff line number Diff line change
Expand Up @@ -161,8 +161,11 @@ <h4 class="alert-heading">Under Development!</h4>
{% endif %} The GTN Framework is licensed under <a rel="license" href="{{ site.github_repository }}/blob/main/LICENSE.md">MIT</a>
</div>
{% if page.short_id %}
<div><strong>{% icon purl %}<abbr title="Persistent URL">PURL</abbr>:</strong> <a href="https://gxy.io/GTN:{{ page.short_id }}">https://gxy.io/GTN:{{ page.short_id }}</a> </div>
<div><strong>{% icon purl %} <abbr title="Persistent URL">PURL</abbr>:</strong> <a href="https://gxy.io/GTN:{{ page.short_id }}">https://gxy.io/GTN:{{ page.short_id }}</a> </div>
{% endif %}

<div><strong>{% icon version %} Revision:</strong> {{ page | get_version_number }} </div>

</blockquote>
</section>

Expand Down
4 changes: 4 additions & 0 deletions _plugins/gtn.rb
Original file line number Diff line number Diff line change
Expand Up @@ -357,6 +357,10 @@ def layout_to_human(layout)
end
end

def get_version_number(page)
Gtn::ModificationTimes.obtain_modification_count(page['path'])
end

def topic_name_from_page(page, site)
if page.key? 'topic_name'
site.data[page['topic_name']]['title']
Expand Down

0 comments on commit f8b1dfc

Please sign in to comment.