Skip to content

v0.2.0

Choose a tag to compare

@github-actions github-actions released this 30 Oct 02:46
· 106 commits to main since this release
v0.2.0
7d811f2

smd no longer needs Node.js or a browser to draw diagrams. It can now show SVG images and tick task checkboxes.

Diagrams without mermaid-cli

Mermaid diagrams are now drawn inside smd by merman. You no longer need to install mermaid-cli (mmdc), Node.js or a headless browser. A diagram takes about 40 ms to draw, where mmdc took about 660 ms, so a note full of diagrams opens much faster the first time.

  • Labels use Trebuchet MS or Verdana on macOS, and DejaVu Sans or Liberation Sans on Linux.
  • Labels in Chinese, Japanese and other scripts outside those fonts, and emoji in labels, show as boxes for now.
  • merman follows mermaid closely but not exactly. To keep using mermaid-cli, set mermaid = "mmdc" in ~/.config/smd/config.toml.
  • The binary is larger, about 25 MB instead of 7.5 MB, as the diagram renderer is built in.

SVG images

A local .svg or .svgz image, such as ![diagram](diagram.svg), is now shown like a PNG. Images an SVG links to are read from its folder. SVGs that colour themselves with CSS variables, as many made for web pages do, use the fallback colours.

Tick task checkboxes

Task list items, - [ ] buy bread, can now be ticked and unticked:

  • Tab and Shift-Tab stop at checkboxes as well as links.
  • Enter or x ticks or unticks the selected checkbox, and so does clicking it.
  • smd changes only the character between the brackets, in place. If the file changed on disk since smd read it, nothing is written and the new version is shown instead.
  • Checkboxes in files smd cannot write to are passed over. Set tasks = "read_only" in the config if smd should never write to your notes.

Upgrading

brew upgrade ryanlewis/tap/smd

If you installed mermaid-cli only for smd, you can now remove it.

Pull requests

  • feat: draw mermaid diagrams with merman, built in, instead of mmdc (#100)
  • feat: show SVG images (#101)
  • feat: tick and untick task checkboxes (#102)
  • chore: release 0.2.0 (#103)

Full changelog: v0.1.0...v0.2.0