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 ### 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/) * [Ruby](https://www.ruby-lang.org/en/documentation/installation/)
* [yarn](yarnpkg.com/en/docs/install) * [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 ### Installing

5
Rules
View file

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

View file

@ -9,7 +9,7 @@ narrow_page: true
<% reports.group_by {|r| r[:academic_year]}.each do |year, y_reports| %> <% reports.group_by {|r| r[:academic_year]}.each do |year, y_reports| %>
<h2><%= year %></h2> <h2><%= year %></h2>
<% y_reports.each do |report| %> <% 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 %>
<% end %> <% end %>
</div> </div>