Quarto Conditional Content

Controlling what markdown is visible by output type in Quarto
Quarto
Author

Isaac Flath

Published

November 10, 2022

Today I Learned

Today I learned that you can control what markdown renders. This is called conditional content in the Quarto docs.

When I create a quarto notebook I can add full markdown note for myself or other contributors that do not render to the output format, whether that output is a html, pdf, python library, or website. Yoformats it will render to and which it will not.u can control which

Ways I will use this

HTML Reports

Now-a-days all my presentations are really Quarto html outputs that I walk through with clients. I can now add sections of notes for myself that I don’t want the client to see. Lots of things I will use this for such as:

  • Documenting some nuance about why I did something that isn’t relevant to business users
  • Notes to look into some data issue if the project gets approved
  • Markdown to break my setup into sections (imports, UDF, db connections, etc.)

And much more

NBdev

nbdev is a tool to write, test, document, and distribute software packages and technical articles — all in one place, your notebook. It takes notebooks and outputs documentation and a python library. This is great because now in the same place I can write development notes or to-do’s right in the place where the code/tests/docs are sourced from. Maybe a note for myself or for other developers in full markdown that won’t get rendered to the user documentation.

Website/Blogs

I think it’ll be really nice to have notes on blogs. Sometimes I go back and improve old blogs, or add sections. I try not to let not being “finished” prevent me from posting. Once I have something I think is good it ships, even if there’s more I could do. Because there’s always more I can do. Being able to add the to-do’s to myself for when I come back later will be fantastic!