SlipshowSourceA value of type file_reader, given a path p, outputs:
Ok (Some content) if it could read the file, content is the content. In this case, the content will be included in the output.Ok None if it decided not to read the file. In this case, the file will be linked.Error (`Msg m) if it decided to try to read the file, but got an error. In this case, the error is reported, and the file is linked (just as Ok None).val delayed :
?frontmatter:Frontmatter.resolved Frontmatter.t ->
?read_file:file_reader ->
string ->
delayedThis function is used to delay the decision on the starting state. It allows to run convert server-side (which is useful to get images and so on) but let the previewer decide on the starting state.
val convert :
?frontmatter:Frontmatter.resolved Frontmatter.t ->
?starting_state:starting_state ->
?read_file:(Fpath.t -> (string option, [ `Msg of string ]) result) ->
string ->
string