31 Matching Annotations
  1. May 2024
    1. You can use inline R code (see Section 3.1) anywhere in an Rmd document, including the YAML metadata section. This means some YAML metadata can be dynamically generated with inline R code, such as the document title

      Does this apply to .qmd documents?

  2. Nov 2023
  3. May 2023
    1. In the Pandoc Plugin settings, add — citeproc to the ‘Extra Pandoc arguments’ setting. This will be what takes the markdown citations and converts them to in-text citations in the conversion process. It also inserts a full reference list on the end of your document automatically, all completely formatted. To get this to work, you have to specify the location of the .bib file on your system by adding the path, in quotations, to a ‘bibliography’ YAML property.
  4. Jan 2023
    1. Python — Json documents double as valid Python literals with minimal adaptation, and Python supports trailing commas and comments. It has variables and functions, powerful string interpolation, and json.dump built in. A self-contained Python file that prints json to stdout goes a long way!

      If you would like to template yaml, then rather do it in Nix or Python

    2. always quote all strings. (Indeed, you can tell that somebody is an experienced yaml engineer when they defensively quote all the strings.) We can choose to always use true and false rather than yes and no, and generally stay away from the arcane features.

      Advices for yaml users

    3. I think the main reason that yaml is so prevalent despite its pitfalls, is that for a long time it was the only viable configuration format.

      Yaml has strange issues, but is popular as it was one of the 1st options

  5. Dec 2022
  6. Nov 2022
  7. Sep 2022
  8. May 2022
  9. Mar 2022
    1. To get a sorted list of all glossary items you could use YAML in the front matter of each glossary term then use the dataview plugin and sort ascending.
      • idea for glossary
  10. Jan 2022
    1. An extension to python markdown that takes metadata embedded as YAML in a page of markdown and render it as JSON-LD in the HTML created by MkDocs.
      • YAML input

        "@context": "http://schema.org"
        "@id": "#lesson1"
          - CreativeWork
        learningResourceType: LessonPlan
        hasPart: {
        "@id": "#activity1"
          "@type": Person
          name: Phil Barker
      • Default JSON-LD output

        <script type="application/ld+json">
        { "@context":  "http://schema.org",
        "@id": "#lesson1",
        "learningResourceType": "LessonPlan",
        "name": "Practice Counting Strategies",
        "hasPart": {
          "@id": "#activity1-1"
        "author": {
          "@type": "Person"
          "name": "Phil Barker"
  11. Aug 2021
  12. Sep 2020
  13. Jul 2020
    1. Using |- preserves newlines within the command and does not append a newline at the end of the command string. Beforehand I was using > which replaces newlines in the command string with spaces.
  14. May 2020
    1. Not merge the values of the keys.

      This is one of the biggest limatations of <<: *anchor: it overwrites values of keys. It's too heavy-handed and therefore of limited use. You can only use it if you don't mind keys getting overwritten (such as if you are going to overwrite the keys below the <<:.).

    2. GitLab will perform a reverse deep merge based on the keys
    3. It’s an alternative to using YAML anchors and is a little more flexible and readable
  15. Apr 2020
    1. A notebook, at a very basic level, is just a bunch of JSON that references blocks of code and the order in which they should be executed.But notebooks prioritize presentation and interactivity at the expense of reproducibility. YAML is the other side of that coin, ignoring presentation in favor of simplicity and reproducibility—making it much better for production.

      Summary of the article:

      Notebook = presentation + interactivity

      YAML = simplicity + reproducibility

    2. There is no hidden state or arbitrary execution order in a YAML file, and any changes you make to it can easily be tracked by Git

      In comparison to notebooks, YAML is more compatible for Git and in the end might be a better solution for ML

  16. Mar 2020
    1. I wrote a plugin for Vim that lets you easily toggle a YML file between nested format: xx.yml1 2 3 4 en: baz: "baize" foo: bar: "baare" and a flat format: xx.yml1 2 en.baz: "baize" en.foo.bar: "baare" This is really useful, as the flat format is easier to search and edit.
  17. Feb 2020
  18. Sep 2017
    1. Note: When mapping ports in the HOST:CONTAINER format, you may experience erroneous results when using a container port lower than 60, because YAML will parse numbers in the format xx:yy as sexagesimal (base 60). For this reason, we recommend always explicitly specifying your port mappings as strings.

      Cool feature

  19. Mar 2017