Replies: 1 comment
-
|
My current workaround is by "pre-processing" the presentation by substituting "user defined variables" with the value of environment variables. Example: ---
title: "Secret presentation"
sub_title: "Hide author and use today's date"
author: $AUTHOR
date: $TODAY
---And I run presentations with a wrapper script: #!/usr/bin/env bash
set -euo pipefail
infile="${1:-}"
outfile="${2:-out.md}"
if [[ -z "$infile" ]]; then
echo "Usage: $0 INPUT.md [OUTPUT.md]" >&2
exit 1
fi
export AUTHOR="${AUTHOR:-Ada Lovelace}"
export TODAY="${TODAY:-$(date +%F)}"
envsubst '${AUTHOR} ${TODAY}' < "$infile" > "$outfile"
exec presenterm "$outfile" |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Would it be possible to support custom variables?
According to the documentation, unsupported variables currently lead to an error.
I think it would be useful to have something like this working:
Custom attributes
This could be implemented by either supporting environment variables directly or by allowing custom attributes to be defined in the config file.
My use case: I want to version-control my presentation with Git, but there are certain details (e.g., names, addresses) that I do not want to commit to the repository. Supporting custom attributes, or another mechanism to include or exclude sensitive content, would be helpful.
Date support
Date support could be realized with custom attributes but a dedicated option might be worthwile.
I often prefer to display the current date while presenting. Having an option similar to
\today, along with support for a custom format, would be great:Beta Was this translation helpful? Give feedback.
All reactions