Make pandoc optional, Fixes #238

This commit is contained in:
Lorin Werthen 2018-10-14 17:44:01 +02:00
parent 22bc725d3a
commit f46bd2caf8
No known key found for this signature in database
GPG key ID: F11FFC921E0E08E0
3 changed files with 5 additions and 6 deletions

View file

@ -14,11 +14,11 @@ These instructions will get you a copy of the project up and running on your loc
### Prerequisites
You will need Ruby (gem), yarn and pandoc. Installation instructions are listed below.
You will need Ruby (gem), yarn and pandoc (optional). Installation instructions are listed below.
* [Ruby](https://www.ruby-lang.org/en/documentation/installation/)
* [yarn](yarnpkg.com/en/docs/install)
* [pandoc](https://pandoc.org/installing.html)
* [pandoc](https://pandoc.org/installing.html) (optional, install if you want to see the reports)
### Installing

5
Rules
View file

@ -135,9 +135,8 @@ end
#
compile '/about/verslagen/*/*.md', rep: :pdf do
filter :pandoc_pdf, args: { f: :markdown }
write ext: 'pdf'
filter :pandoc_pdf, args: { f: :markdown } if production?
write ext: (production? ? 'pdf' : 'md')
end
#

View file

@ -9,7 +9,7 @@ narrow_page: true
<% reports.group_by {|r| r[:academic_year]}.each do |year, y_reports| %>
<h2><%= year %></h2>
<% y_reports.each do |report| %>
<a href="<%= report.identifier.without_ext + '.pdf' %>">Report <%= report[:date].strftime('%d %B %Y') %></a><br>
<a href="<%= report.reps[:pdf]&.path || report.identifier %>">Report <%= report[:date].strftime('%d %B %Y') %></a><br>
<% end %>
<% end %>
</div>