{"repo":"privatenumber/comment-mark","free":true,"listed":false,"github":"https://github.com/privatenumber/comment-mark","clone":"git clone https://github.com/privatenumber/comment-mark.git","description":"Interpolate strings with HTML comment markers!","language":"TypeScript","stars":24,"topics":["string","interpolation","html","comment","markdown","inject"],"license":"MIT","category":"productivity","readme_excerpt":"comment-mark comment-mark lets you seamlessly embed dynamic content into your Markdown using persistent HTML comment placeholders—no separate template files required! Install Quick start 1. Add placeholders to your Markdown 2. Insert dynamic content Result Why use comment-mark? Most Markdown templating requires separate template files and a build step. comment-mark eliminates this complexity by allowing a single Markdown file to act as both the template and the output. Real-world examples - Project index: Automatically updates README.md from projects.json on each Git commit. - Minification Benchmarks: Inserts benchmarking results directly into README.md . Demo: Embed Git contributors Here's a practical example showing how to auto-update a list of Git contributors in your README: Markdown Setup Script Output API commentMark(contentStr, data) contentStr : The Markdown or HTML content. data : Key-value pairs representing placeholders and their replacements. Returns: : The original string with placeholders replaced by provided values. FAQ Why HTML comments? Markdown generally supports basic HTML, and HTML comment pairs are a safe, unobtrusive way to mark placeholders. Why pairs of HTML comments instead of single placeholders? Pairs ensure the placeholders remain intact after multiple updates, avoiding the need for separate source and distribution files.","default_branch":null,"files":null,"tree":[],"storefront":"/r/privatenumber","claimed":false,"request_supported":{"post":"https://gitbuyer.com/r/privatenumber/comment-mark/request-supported","requests":0},"note":"indexed from public GitHub; nothing is for sale on this page. Clone it from GitHub. Paid listings live at /search."}