Skip to content

Instantly share code, notes, and snippets.

@danielepolencic
Created April 2, 2019 12:30
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save danielepolencic/4031e6ae50de353a5258206bdcfb049a to your computer and use it in GitHub Desktop.
Save danielepolencic/4031e6ae50de353a5258206bdcfb049a to your computer and use it in GitHub Desktop.

Note for my future self:

  • The easiest thing to do is to stick to md. It’s easy to use, you can use any program to view it and can easily be processed.
  • However, markdown is too simple. If you want to augment md, use the same technique of r markdown. Use code snippets to include code and write a md -> to -> md converter. Or just render to text directly.
  • MDX is not portable or easy to use. R markdown works with python only.
  • You might be tempted to include snippets of code dynamically like in https://github.com/fullstackio/cq . Don’t. It’s not portable. Instead think about md files as jest snapshot testing. They are prerendered and on disk. If the state is stale, let CI tell you. A project on a similar mindset is https://github.com/DavidWells/markdown-magic
  • Vue has an excellent mechanism include HTML, JS and CSS https://vuejs.org/v2/guide/single-file-components.html

Running material locally

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment