Skip to contents

Use rtiddlywiki with Rmarkdown

To use rtiddlywiki with Rmarkdown, you can add an output format in the yaml header with following configurations. All arguments of rmarkdown::md_document or bookdown::markdown_document2 (if use_bookdown: true) can also be specified.

output:
  rtiddlywiki::tiddler_document:
    tags: ["tag1", "tag 2"]
    use_bookdown: false
    fields:
      "field1": "V1"
      "field 2": "Value 2"

tags is converted into tag for tiddler. fields is a named vector and converted into fields for tiddler (i.e. name and value pair). A json file is generated in the output folder and can be imported into single tiddlywiki html file.

For tiddlywki configured with node.js server, the path and host can be specified in the yaml header to PUT into WebServer.

output:
  rtiddlywiki::tiddler_document:
    path: "full-path-to-tiddlywiki-project"
    host: "http://127.0.0.1:8080/"
    tags: ["tag1", "tag 2"]
    use_bookdown: false
    fields:
      "field1": "V1"
      "field 2": "Value 2"