Added support for history option in PITCHME.yaml.

This commit is contained in:
David Russell 2017-03-01 17:56:25 +07:00
parent 805571ae38
commit 787d2cc27b
3 changed files with 13 additions and 0 deletions

View File

@ -331,6 +331,13 @@ public class SlideshowModel {
return (_yOpts != null) ? _yOpts.mathEnabled(params()) : false;
}
/*
* Return "history" defined in PITCHME.yaml.
*/
public boolean fetchHistory() {
return (_yOpts != null) ? _yOpts.fetchHistory(params()) : false;
}
/*
* Return "mathjax" defined in PITCHME.yaml.
*/

View File

@ -216,6 +216,10 @@ public final class YAMLOptions {
return (mathjax != null);
}
public Boolean fetchHistory(PitchParams pp) {
return fetchBooleanOption(pp, HISTORY_OPTION, true);
}
public String mathConfig(PitchParams pp) {
return mathEnabled(pp) ?
_yProps.get(MATHJAX_OPTION) : MATHJAX_DEFAULT;
@ -352,6 +356,7 @@ public final class YAMLOptions {
private static final String FOOTNOTE_OPTION = "footnote";
private static final String GATOKEN_OPTION = "gatoken";
private static final String CHARTS_OPTION = "charts";
private static final String HISTORY_OPTION = "history";
private static final String REVEALJS_VERSION = "revealjs-version";
private static final String HSLIDE_DELIM = "horz-delim";

View File

@ -12,6 +12,7 @@
rtl: @ssm.fetchRTL(),
shuffle: @ssm.fetchShuffle(),
mouseWheel: @ssm.fetchMouseWheel(),
history: @ssm.fetchHistory(),
@if(ssm.mathEnabled()) {
math: {
@if(offline) {