Skip to content
Snippets Groups Projects
Commit 1212b6fd authored by Thomas Wood's avatar Thomas Wood
Browse files

Implement support for Supplementary File Types. See the readme for details.

Fixes #3
parent f28d4385
No related branches found
No related tags found
No related merge requests found
......@@ -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
......
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
---
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**
[![Build Status](https://gitlab.doc.ic.ac.uk/resource-reasoning/psvg.doc.ic.ac.uk/badges/master/build.svg)](https://gitlab.doc.ic.ac.uk/resource-reasoning/psvg.doc.ic.ac.uk/commits/master)
[![Dependency Status](https://gemnasium.com/bd81b2aa11ff43417700f75dbd194221.svg)](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:
......
# 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
......@@ -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>
---
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>
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment