From: Robin S. <rj...@ro...> - 2017-09-24 23:08:17
|
G'day, Firstly, thanks to everybody who has worked on ReST/docutils, you're awesome. I'm trying to create a custom directive for videos (my only output is html), and I would like to be able to include tracks (subtitle files) within the directive. For those unfamiliar with html5 video, the output looks something like this: <video autoplay> <source src="foo.ogg"> <track kind="subtitles" src="foo.vtt" srclang="en"> </video> What I'd like is a directive with nested field lists. eg: .. video:: sources :autoplay: True :track: :src: foo.vtt :srclang: en :kind: subtitles :controls: false I saw nested lists like this somewhere in the sandbox (though now I can't find it again), but I think it was just a suggestion rather than an actually implemented directive. If this is possible, how would it work with option_spec in the directive definition? Alternatively is there a better way of solving this problem? Thank you, Robin. |