Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow custom configuration options? #81

Open
zkamvar opened this issue Feb 20, 2021 · 1 comment
Open

Allow custom configuration options? #81

zkamvar opened this issue Feb 20, 2021 · 1 comment

Comments

@zkamvar
Copy link
Contributor

zkamvar commented Feb 20, 2021

At the moment, it's not possible to add custom configuration options site-wide, which hampers lessons like HPC intro. They have a lot of customization in their config files and I want to make sure that their transition is relatively painless.

Luckily, pandoc has support for custom metadata configuration on top of lua filters: https://pandoc.org/MANUAL.html#default-files

@zkamvar zkamvar added this to Coming Up in Contributor/Maintainer Interface via automation Feb 20, 2021
@zkamvar zkamvar added this to Coming Up in Engines via automation Feb 20, 2021
@zkamvar zkamvar added this to the 3. Release Candidate milestone Feb 20, 2021
@zkamvar
Copy link
Contributor Author

zkamvar commented Jan 4, 2023

This could be done using R Markdown syntax, but it's less than ideal.

At the moment, {sandpaper} does not support parameterised reports, but it shouldn't be that difficult to implement (e.g. allowing folks to add an extra params.yaml to specify parameters).

Take, for example this section on modules

### Listing Available Modules


To see available software modules, use `module avail`:


```
{{ site.remote.prompt }} module avail
```
{: .language-bash}


{% include {{ site.snippets }}/modules/available-modules.snip %}

If we were to translate this to use child documents and params, it might look something like this:

### Listing Available Modules


To see available software modules, use `module avail`:


```{r, results='asis'}
sprintf("```\n%s module avail```", params$remote.prompt)
```


```{r child=file.path(params$snippets, "modules/available-modules.snip")}
```

When we support quarto, it might be easier because we could use this syntax (I think):

### Listing Available Modules


To see available software modules, use `module avail`:


```
{{< var remote.prompt >}} module avail
```


{{< include {{< var snippets >}}/modules/available-modules.snip >}}

Of course, one thing I could do is also insert lua filters that will achieve the same goal as quarto and use the same syntax until we can support quarto.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

1 participant