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
Understanding _output.yaml in generating websites
#297
Comments
|
Yes, _output.yaml covers only the output section of document metadata. I agree it would be nice to have a mechanism for other shared metadata -- perhaps for now you can do this via custom pandoc_args passing your shared metadata file? |
|
hmm, interesting idea. Seems like |
|
Oh, good point! Not sure what the right workaround is then -- perhaps On Tue, Oct 28, 2014 at 5:44 PM, Carl Boettiger notifications@github.com
|
|
The way yeah, wrapping render (or maybe adding an option to render?) to somehow append a shared metadata file sounds promising, not quite sure I can envision the implementation though. Would be preferable not to need two yaml files to set global metadata. If backwards compatibility weren't an issue, I think I'd prefer that |
|
@cboettig Sadly, I don't have anything constructive to add. I will say that my pain point with http://rmarkdown.rstudio.com/html_document_format.html#creating-a-website But that's not really what you're asking about here. |
|
@jennybc Thanks all the same. My current workaround is to call On the downside, my approach means wiring information like template choice into the Makefile rather than in yaml. That's really an issue of pandoc not supporting template as a yaml option; even though rmarkdown does. Some further discussion of this on the pandoc-listserve |
|
This old thread has been automatically locked. If you think you have found something related to this, please open a new issue by following the issue guide (https://yihui.org/issue/), and link to this old issue if necessary. |
Pandoc has the very convenient feature of being able to specify an external yaml file to provide metadata that would be re-used across multiple files; as shown in the docs:
At first I'd imagined that this is how
_output.yamlwas working too, but at closer inspection it appears that's not the case. This is rather frustrating as it was very convenient to be able to define arbitrary template metadata in ametadata.yamlthat I could then use in custom templates (e.g. rather analogous to _config.yaml in Jekyll). Unfortunately, if I just create an_output.yamllike this:it seems some variables, like css, are recognized, but arbitrary template variables like
author.twitterare not (whether or not they are nested underhtml_document). If instead I run pandoc directly and use the aboveyamlfile as an external metadata block like in themetadata.yamlcase illustrated above, everything works. Would it be possible for rmarkdown to support something like this?The text was updated successfully, but these errors were encountered: