-
Notifications
You must be signed in to change notification settings - Fork 10
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add GO REFs page #513
Merged
Merged
Add GO REFs page #513
Changes from all commits
Commits
Show all changes
6 commits
Select commit
Hold shift + click to select a range
f51e870
Add Makefile with target to fetch gorefs.yaml from go-site repo
pkalita-lbl ccc8238
Add GO REFs page
pkalita-lbl 2f8cd4d
Add warning about missing gorefs file in dev mode
pkalita-lbl bdef0cf
Add custom filter for automatically linking plain URLs
pkalita-lbl fc84f0a
Generate individual page for each GO_REF
pkalita-lbl 06f3937
Separate GO REF index list into obsolete and non-obsolete lists
pkalita-lbl File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
.PHONY: _data/gorefs.yaml | ||
|
||
_data/gorefs.yaml: | ||
wget -O $@ https://raw.githubusercontent.com/geneontology/go-site/master/metadata/gorefs.yaml |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
<div> | ||
<span class="label label-primary">{{ include.goref.id }}</span> | ||
{% if include.goref.is_obsolete %} | ||
<span class="label label-danger text-uppercase">obsolete</span> | ||
{% endif %} | ||
</div> | ||
<h2>{{ include.goref.title }}</h2> | ||
<p>{{ include.goref.authors }}; {{ include.goref.year }}</p> | ||
<p>{{ include.goref.description | markdownify | autolinkify }}</p> | ||
|
||
{% if include.goref.comments %} | ||
<h3>Comments</h3> | ||
<ul> | ||
{% for comment in include.goref.comments %} | ||
<li>{{ comment | markdownify | autolinkify }}</li> | ||
{% endfor %} | ||
</ul> | ||
{% endif %} | ||
|
||
{% if include.goref.citation %} | ||
<div class="row"> | ||
<div class="col-sm-2"><b>Citation</b></div> | ||
<div class="col-sm-10"> | ||
<a href="http://www.ncbi.nlm.nih.gov/pubmed/{{ include.goref.citation | remove_first: 'PMID:' }}" target="_blank"> | ||
{{ include.goref.citation }} | ||
</a> | ||
</div> | ||
</div> | ||
{% endif %} | ||
|
||
{% if include.goref.external_accession %} | ||
<div class="row"> | ||
<div class="col-sm-2"><b>External xrefs</b></div> | ||
<div class="col-sm-10"> | ||
<ul class="list-unstyled"> | ||
{% for xref in include.goref.external_accession %} | ||
<li>{{ xref }}</li> | ||
{% endfor %} | ||
</ul> | ||
</div> | ||
</div> | ||
{% endif %} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
<li> | ||
<a class="u-margin-bottom-xsmall" href="{{ include.goref.id | datapage_url: 'gorefs' }}"> | ||
[{{ include.goref.id }}] {{ include.goref.title }} | ||
</a> | ||
</li> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
--- | ||
layout: default | ||
--- | ||
|
||
<div class="container"> | ||
<div class="u-margin-bottom-medium"> | ||
<a href="{{ '/gorefs.html' | relative_url }}"> | ||
<i class="fa fa-chevron-left" aria-hidden="true"></i> | ||
All GO REFs | ||
</a> | ||
</div> | ||
{% include goref.html goref=page %} | ||
</div> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
require 'rinku' | ||
|
||
module Jekyll | ||
module AutolinkifyFilter | ||
def autolinkify(input) | ||
Rinku.auto_link(input, :all, 'target="_blank"') | ||
end | ||
end | ||
end | ||
|
||
Liquid::Template.register_filter(Jekyll::AutolinkifyFilter) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
--- | ||
# Note that when developing locally, this page must be reached by visiting /gorefs.html. Without | ||
# the .html extension (/gorefs), an index page for the gorefs directory generated by the | ||
# jekyll-datapage-generator plugin will be displayed instead. This is a quirk of the Jekyll | ||
# development web server. When deployed on GitHub pages, this page will be available at /gorefs | ||
# without the .html extension. | ||
|
||
layout: default | ||
--- | ||
|
||
<div class="container"> | ||
<h1>GO REFs</h1> | ||
<p>This is a collection of references used by the GO Consortium</p> | ||
|
||
{% if jekyll.environment == "development" %} | ||
{% unless site.data.gorefs %} | ||
<div class="alert alert-warning"> | ||
<strong>Warning!</strong> No GO_REFs found. Did you run <code>make _data/gorefs.yml</code>? | ||
</div> | ||
{% endunless %} | ||
{% endif %} | ||
|
||
<ul> | ||
{% for goref in site.data.gorefs %} | ||
{% unless goref.is_obsolete %} | ||
{% include goref_toc_list_item.html goref=goref %} | ||
{% endunless %} | ||
{% endfor %} | ||
</ul> | ||
|
||
<h2>Obsolete GO REFs</h2> | ||
<ul> | ||
{% for goref in site.data.gorefs %} | ||
{% if goref.is_obsolete %} | ||
{% include goref_toc_list_item.html goref=goref %} | ||
{% endif %} | ||
{% endfor %} | ||
</ul> | ||
</div> |
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@pkalita-lbl Technically, this should never be an issue as it's handled automatically, right?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Automatic in the production build and deploy workflow, yes (as outlined in #507). It's not as easy to automate it for a local development environment. I looked into ways to hook into Jekyll's build process to make it fully automatic, full stop, but it felt a bit like overkill. In the end I figured that requiring a developer to run one
make
command if they want to work on that page isn't a bad compromise.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Makes perfect sense--I just wanted to make sure we weren't going to panic Suzi.