{"repo":"maxchang3/newmd","free":true,"listed":false,"github":"https://github.com/maxchang3/newmd","clone":"git clone https://github.com/maxchang3/newmd.git","description":"A CLI tool that creates markdown files with frontmatter using a Zod schema. Designed to integrate smoothly with Astro Content Collections.","language":"TypeScript","stars":15,"topics":["frontmatter","markdown","zod","cli-tool","astro","astrojs"],"license":"MIT","category":"docs-static-sites","readme_excerpt":"➕ newmd A CLI tool that creates markdown files with frontmatter using a Zod schema. npx newmd blog \"Hello World\" \\ blog is the default schema with some fields. You can define your own schema in the config file. [![npm][npm-badge]][npm-url] [![GitHub Workflow Status][ci-badge]][ci-url] [![Checked with Biome][biome-badge]][biome-url] [![License][license-badge]][license-url] [![Watch Intro Video][video-badge]][video-url] Usage CLI Run the following command in your terminal: or using pnpx ( pnpm dlx ): Will create a markdown file with the following content: \\ The pubDate field will be filled with new Date() . You can install it globally for convenience. Options See newmd --help for more details, following is a brief description. - --content Set the content of the markdown file - --path Set the output directory - --slug Set the slug for the filename, if not provided, it will be generated from the slugified title. - --cwd Set the current working directory - --toml Whether to use TOML format for frontmatter, default is false - --overwrite Whether to overwrite the existing file, default is false Integration With Astro Say you have this content config file: You can create a newmd config file like this: Now you can use the same schema to create markdown files with frontmatter by running npx newmd blog \"Hello World\" . Config file You need to create a config file to define the schemas for the frontmatter. The config structure and default values are as follows: Title Field Mapping By defa","default_branch":null,"files":null,"tree":[],"storefront":"/r/maxchang3","claimed":false,"request_supported":{"post":"https://gitbuyer.com/r/maxchang3/newmd/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."}