I’ve more or less finished a little side project I started to make it easier to find and use Marked Custom Styles. I have a lot of plans for improving the styling system itself, but for now I wanted to make a little more user-friendly way to look around than just going to visit a GitHub repository.
First, some background. Marked 2 is my Markdown previewer app. It comes with 9 built-in preview styles, but allows total customization using CSS. You can learn more about using custom styles in the help docs. You’ll also find instructions and tips for creating your own.
When users are willing to share their work, I collect them in a public GitHub repository. The problem is, that doesn’t provide any previews, so you end up downloading the whole lot and testing them out in Marked, which is far from convenient. The opposite, in fact.
So I created a little gallery system that indexes all of the styles in the repository, catalogs their metadata, and creates a single-page gallery. You can select styles from a dropdown, or page through them one at a time. If you find one you like, there’s a download button that will take you directly to the source code. Check it out.
As I work on nvUltra I’m designing some new styles for its built-in preview. I ported the current state of one of my favorites, Gregarious, to Marked. You can check it out in the gallery.
As a side note, you can set a hash on the gallery url to target a specific style (e.g. [url]#Gregarious
), perfect for linking directly to that style. As you browse the hash updates, so copying the url at any point will link directly to the style you’re currently viewing.
I’m hoping that offering a little more convenience in this will inspire more people to share their own Custom Styles with the world. To do so, be sure you’ve included the required header comment (detailed here) and then either contact me directly with a link to it, or create a pull request on the GitHub repo (if that’s your thing). Someday I’ll make an actual community system with uploads and all, but that keeps getting pushed off. So much to do these days.