Closed akhmerov closed 3 years ago
Welcome to this project and thank you!' first issue
Hmm, another alternative for supporting loading of arbitrary yaml data would be to extend the specification for include_yaml
to allow dictionaries:
include_yaml:
- data/file1.yml
- key: data/file2.yml
@akhmerov That sounds like an interesting use case!
Could you give me an example of how your yaml file would look like, and what you would like to do with it?
It's https://github.com/virtualscienceforum/virtualscienceforum/blob/master/talks.yml, and it's in a repo for hosting online talks.
See #97 for a possible resolution.
And here's how it'd look in use: mkdocs.yml. Works like a charm.
I get the point: it's elegant.
Let me check further on this.
I wouldn't go as far as to say elegant, but it's backwards-compatible, and better for interoperability with other tooling since it allows to load any data into the template context without format restrictions.
I am switching an existing repo to mkdocs. For historical reason, my data is stored as a list in the root of a yaml file. Currently, when a file is loaded,
update(self.variables, content)
is called. This naturally fails ifcontent
is a list. Since this yaml format is used in several places throughout my codebase, I would prefer to keep it as is.Therefore I have two questions:
{filename: content}
Thanks for the powerful plugin!