diff --git a/Gemfile b/Gemfile index 2116bf84e8d4c688e20c6f519de61c9e645a396d..2fbdae6dc13098a4212f80bb8c864768713f5047 100644 --- a/Gemfile +++ b/Gemfile @@ -4,7 +4,8 @@ gem 'rake' gem 'jekyll' group :default, :jekyll_plugins do - gem 'jekyll-scholar', '~> 5.7' + gem 'jekyll-scholar', '~> 5.9.1' + #gem 'jekyll-scholar', :git => '/home/thomas/jekyll-scholar', :branch => 'master' gem 'jekyll-sitemap' end diff --git a/Gemfile.lock b/Gemfile.lock index 64753f00624287f46396d4193d359309d45568ee..c1c3375da0835f0c06d6776417d802edd87b19d8 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -1,7 +1,7 @@ GEM remote: https://rubygems.org/ specs: - activesupport (5.0.0.1) + activesupport (5.0.1) concurrent-ruby (~> 1.0, >= 1.0.2) i18n (~> 0.7) minitest (~> 5.1) @@ -18,16 +18,16 @@ GEM coderay (1.1.1) colorator (1.1.0) colored (1.2) - concurrent-ruby (1.0.2) + concurrent-ruby (1.0.4) csl (1.4.5) namae (~> 0.7) csl-styles (1.0.1.7) csl (~> 1.0) ethon (0.10.1) ffi (>= 1.3.0) - ffi (1.9.14) + ffi (1.9.17) forwardable-extended (2.6.0) - html-proofer (3.3.1) + html-proofer (3.4.0) activesupport (>= 4.2, < 6.0) addressable (~> 2.3) colored (~> 1.2) @@ -50,16 +50,16 @@ GEM safe_yaml (~> 1.0) jekyll-sass-converter (1.5.0) sass (~> 3.4) - jekyll-scholar (5.8.5) + jekyll-scholar (5.9.1) bibtex-ruby (~> 4.0, >= 4.0.13) citeproc-ruby (~> 1.0) csl-styles (~> 1.0) jekyll (~> 3.0) - jekyll-sitemap (0.12.0) + jekyll-sitemap (1.0.0) jekyll (~> 3.3) jekyll-watch (1.5.0) listen (~> 3.0, < 3.1) - kramdown (1.13.1) + kramdown (1.13.2) latex-decode (0.2.2) unicode (~> 0.4) liquid (3.0.6) @@ -71,7 +71,7 @@ GEM mini_portile2 (2.1.0) minitest (5.10.1) namae (0.11.3) - nokogiri (1.6.8.1) + nokogiri (1.7.0.1) mini_portile2 (~> 2.1.0) parallel (1.10.0) pathutil (0.14.0) @@ -80,14 +80,14 @@ GEM coderay (~> 1.1.0) method_source (~> 0.8.1) slop (~> 3.4) - public_suffix (2.0.4) + public_suffix (2.0.5) rake (12.0.0) rb-fsevent (0.9.8) rb-inotify (0.9.7) ffi (>= 0.5.0) rouge (1.11.1) safe_yaml (1.0.4) - sass (3.4.22) + sass (3.4.23) slop (3.6.0) thread_safe (0.3.5) typhoeus (0.8.0) @@ -103,10 +103,10 @@ PLATFORMS DEPENDENCIES html-proofer (~> 3.0) jekyll - jekyll-scholar (~> 5.7) + jekyll-scholar (~> 5.9.1) jekyll-sitemap pry rake BUNDLED WITH - 1.13.6 + 1.14.3 diff --git a/README.md b/README.md index a922ed35797aaa15b2cfa8b1deb0951473608bec..fc9cd18c92061d24922f86780c0c58abcc39ef7a 100644 --- a/README.md +++ b/README.md @@ -1,19 +1,46 @@ --- -layout: null +layout: page +title: PSVG Group Website Readme --- -Program Specification & Verification Group Website: http://psvg.doc.ic.ac.uk/ -============================================================================= +This readme file is published in its fully rendered form [on the website](https://psvg.doc.ic.ac.uk/README.html). +The source code for [this site](https://psvg.doc.ic.ac.uk) is [hosted on the DoC GitLab server](https://gitlab.doc.ic.ac.uk/resource-reasoning/psvg.doc.ic.ac.uk), +you should have access to edit it if a member of the resource-reasoning group. +**DO NOT EDIT THE SOURCE CODE IN `/vol/rr/www`, IT IS ALL REPLACED EACH TIME THE SITE IS REBUILT FROM VERSION CONTROL** [](https://gitlab.doc.ic.ac.uk/resource-reasoning/psvg.doc.ic.ac.uk/commits/master) [](https://gemnasium.com/6ba7afbbfda9adcba06f007cc565a29a) -The source code for [this site](http://psvg.doc.ic.ac.uk) is [hosted on the DoC GitLab server](https://gitlab.doc.ic.ac.uk/resource-reasoning/psvg.doc.ic.ac.uk), -you should have access to edit it if a member of the resource-reasoning group. +Managing Content +---------------- -**DO NOT EDIT THE SOURCE CODE IN `/vol/rr/www`, IT IS ALL REPLACED EACH TIME THE SITE IS REBUILT FROM VERSION CONTROL** +### Publications + +#### File Downloads +Files associated with publications should be placed in the `publications` directory. +The filename prefix *must* be the key used for the corresponding entry in the BibTeX file. +The filename suffix (extension) determines how the file appears in the page listing. Unknown filetypes are permitted, +but will be printed in a bland, not-very-descriptive way. + +Known filename suffixes are defined in `_data/publication_file_types.yml` and are summarised in the table below: + +<style> +td, th { padding: 3px; } +td i { text-align: center; } +</style> +<table> + <tr><th>Extension</th><th>Icon</th><th>Text</th><th>File contents used as link?</th></tr> +{% for type in site.data.publication_file_types %} + <tr> + <td><code class="highligher-rouge">.{{ type.ext }}</code></td> + <td style="text-align: center"><i class="fa {{ type.icon }}"></i></td> + <td>{{ type.text }}</td> + <td style="text-align: center"><i class="fa fa-{% if type.include %}check{% else %}times{% endif %}"></i></td> + </tr> +{% endfor %} +</table> Technical Detail ---------------- @@ -73,7 +100,7 @@ bundle install And to start a local webserver that remakes files whenever changed: ``` -rake serve +bundle exec rake serve ``` You can test for dead links and html errors using: diff --git a/_data/publication_file_types.yml b/_data/publication_file_types.yml new file mode 100644 index 0000000000000000000000000000000000000000..1e28fa5f9b87565d3b1cf4981c3c7e5e55b823fe --- /dev/null +++ b/_data/publication_file_types.yml @@ -0,0 +1,25 @@ +# This file defines how particular supplementary file types should be rendered +# on a publication page. + +# Fields: +# ext: the file extension (longest part) +# icon: fontawesome identifier names (see http://fontawesome.io/icons/) +# text: descriptive text for type of file +# include: set to true to use the *contents* of the file as the URL to link to +- ext: pdf + icon: fa-file-text-o + text: "Authors' Preprint" +- ext: techreport.pdf + icon: fa-file-text-o + text: Technical Report +- ext: zip + icon: fa-file-archive-o + text: "File Archive (.zip)" +- ext: github.link + icon: fa-github + text: Code Repository (GitHub) + include: true +- ext: repo.link + icon: fa-code-fork + text: Code Repository + include: true diff --git a/_layouts/publication-entry.html b/_layouts/publication-entry.html index 6c264e6cee3c6fa58fb87d12401091d4895eb2c8..5ab2b75aef122a4510f5b569ae03311529fc6026 100644 --- a/_layouts/publication-entry.html +++ b/_layouts/publication-entry.html @@ -5,4 +5,3 @@ <p class="pub-title h4"><a href="{{ details }}">{{ entry.title }}</a></p> {% include publication-authors.html authors=entry.author_array %} <p class="pub-venue">{% include publication-venue.html entry=entry %}</p> - diff --git a/_layouts/publication.html b/_layouts/publication.html index 6ee46793cd75a26541f35634e0cfa9380a4f3fed..f456c91275793f03e6ad09100056f8bc6aef4307 100644 --- a/_layouts/publication.html +++ b/_layouts/publication.html @@ -1,6 +1,8 @@ --- layout: page menu: false + +# The display of the Source Materials Section can be configured in _data/publication_file_types.yml --- <div class="row"> <div class="col-sm-4"> @@ -31,27 +33,31 @@ menu: false </p> {% endif %} - <h3>Full Text</h3> - {% if page.entry.numpages %}<p>{{ page.entry.numpages }} pages</p>{% endif %} - {% if page.entry.doi or page.link %} + {% if page.entry.doi or page.links.size > 0 %} + <h3>Source Materials</h3> <ul class="fa-ul"> - {% if page.link %}<li><a href="{{ page.link }}"><i class="fa fa-li fa-file-text-o"></i>Authors' Preprint</a></li>{% endif %} - {% if page.entry.doi %}<li><a href="http://dx.doi.org/{{ page.entry.doi }}"><i class="fa fa-li - fa-external-link"></i>Published Edition</a></li>{% endif %} - </ul> - {% else %} - <p>Available on request</p> - {% endif %} + {% comment %} Iterate all known types in the defined order {% endcomment %} + {% assign types = site.data.publication_file_types %} + {% for type in types %} + {% if page.links[type.ext] %} + {% capture link %}{% if type.include %}{% assign file = page.links[type.ext] | split: "/" | last %}{% include_relative {{file}} %}{% else %}{{ page.links[type.ext] }}{% endif %}{% endcapture %} + <li><a href="{{ link }}"> <i class="fa fa-li {{ type.icon }}"></i>{{ type.text }} </a></li> + {% endif %} + {% endfor %} - {% comment %} - <h3>Supplementary Material</h3> - <ul class="fa-ul"> - <li><a href=""><i class="fa fa-li fa-file-text-o"></i>Technical Report</a></li> - <li><a href=""><i class="fa fa-li fa-file-archive-o"></i>Download (.zip)</a></li> - <li><a href=""><i class="fa fa-li fa-code-fork"></i>Code Repository</a></li> - <li><a href=""><i class="fa fa-li fa-file-code-o"></i>Code File</a></li> + {% comment %} Iterate all files and pick unknown file types {% endcomment %} + {% assign known_types = types | map: "ext" %} + {% for link in page.links %} + {% unless known_types contains link[0] %} + <li><a href="{{ link[1] }}"><i class="fa fa-li fa-file-o"></i> + {{ link[0] }} File</a></li> + {% endunless %} + {% endfor %} + + {% if page.entry.doi %}<li><a href="http://dx.doi.org/{{ page.entry.doi }}"><i class="fa fa-li fa-external-link"></i> + Published Edition</a></li>{% endif %} </ul> - {% endcomment %} + {% endif %} <h3>Export Citation</h3> <textarea class="form-control" rows="10">{{ page.entry.bibtex }}</textarea>