We often see various badges displaying different project statuses. If you’ve published your package on Typst Universe, you might want to showcase a nice badge in your project’s README that displays your package version. The following code snippet can help you achieve this:
When clicked it links to the newest Universe page of the package.
But here’s the trick: It retrieves the version from the GitHub repository by reading the typst.toml. Notably, I’m not using the main branch anymore like I used to but always the newest release tag. Although I need to update the number every release it has the advantage that in the universe, it always shows the right version in the readme. Otherwise, the readmes of older versions all show the same (new) version in the badge.
EDIT interestingly, the Logo disappears in this Forum. It is still visible in the preview while I edit the post but no longer when it’s posted. I guess that is the same that happened to your posts before …
This probably has to do with the way the forum processes images and other data. The original link is replaced with a local copy of that image, and as a result, it’s unable to be dynamically updated; which explains why I didn’t see the version updated from 0.3.0 to 0.3.1 for my package.