{"id":20068629,"url":"https://github.com/nricciardi/nmd","last_synced_at":"2025-05-05T19:31:29.317Z","repository":{"id":207887596,"uuid":"720166583","full_name":"nricciardi/nmd","owner":"nricciardi","description":"New Markdown: new way to write markdown ","archived":false,"fork":false,"pushed_at":"2024-10-29T09:02:26.000Z","size":3654,"stargazers_count":8,"open_issues_count":7,"forks_count":0,"subscribers_count":2,"default_branch":"main","last_synced_at":"2024-10-29T10:56:43.300Z","etag":null,"topics":["compiler","markdown","markdown-converter","markdown-editor","markdown-it","markdown-lang","markdown-language","markdown-parser","markdown-previewer","markdown-to-html","markdown-viewer","nmd","rust","rust-library"],"latest_commit_sha":null,"homepage":"https://crates.io/crates/nmd","language":"Rust","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/nricciardi.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2023-11-17T18:13:38.000Z","updated_at":"2024-09-21T19:56:28.000Z","dependencies_parsed_at":"2024-03-09T16:28:53.930Z","dependency_job_id":"1a6bd913-464b-4186-98b0-c1ff25dd77a6","html_url":"https://github.com/nricciardi/nmd","commit_stats":null,"previous_names":["nricciardi/nmd-compiler"],"tags_count":28,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nricciardi%2Fnmd","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nricciardi%2Fnmd/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nricciardi%2Fnmd/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nricciardi%2Fnmd/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/nricciardi","download_url":"https://codeload.github.com/nricciardi/nmd/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":224461731,"owners_count":17315116,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["compiler","markdown","markdown-converter","markdown-editor","markdown-it","markdown-lang","markdown-language","markdown-parser","markdown-previewer","markdown-to-html","markdown-viewer","nmd","rust","rust-library"],"created_at":"2024-11-13T14:07:52.666Z","updated_at":"2024-11-13T14:07:53.713Z","avatar_url":"https://github.com/nricciardi.png","language":"Rust","funding_links":[],"categories":[],"sub_categories":[],"readme":"![Logo](logo/logo.png)\n\n\n[![License](https://img.shields.io/badge/license-GPL3-green.svg)](LICENSE)\n[![Version](https://img.shields.io/badge/version-v1.4.0-blue.svg)](CHANGELOG.md)\n\n# New MarkDown\n\n**New way to write markdown**\n\nNMD stands for **New MarkDown**, or for friends, *Nicola MarkDown* (if Stephen Bourne can name a shell, why can't I name mine NMD?)\n\n\u003e [!IMPORTANT]\n\u003e **TL;DR**: download [last NMD CLI tool](#nmd-cli).\n\n## Overview\n\nNMD is a custom Markdown dialect designed to enhance the classic Markdown syntax with additional features for styling and enriching text. With NMD, you can effortlessly create beautifully formatted text for your projects while enjoying some unique features tailored to modern needs.\n\nNMD is full compatible with CommonMark standard.\n\n### Why NMD?\n\n#### Performance\n\nBeing developed in Rust, NMD has incredible performance. In single thread mode, NMD is 2 times faster than the compiler for VS Code, while in multi thread mode it is up to **10 times faster**, but having more features as more modifiers, integrated table of content and bibliography!\n\n#### Extended Syntax\n\nNMD introduces new modifiers and components to elevate your document styling.\n\nFor example, you can't emphasize section \"work in progress\" in common mark, but in NMD you can!\n\nYou can use [TODO](NMD.md#todo) modifier to emphasize a missed section:\n\n![TODO modifier](docs/assets/images/todo-modifier.png)\n\nAlternatively, do you want emphasize a section where you wrote a tip or warning comment? You can use [Focus Block](NMD.md#focus-block)\n\n![Focus Block modifier](docs/assets/images/focus-block-modifier.png)\n\n#### Order with Integrated Dossiers\n\nKeep your documents organized with integrated \"dossiers\" for more intuitive and structured management.\n\n#### Predefined Styles and Customization\n\n- **Built-in Styles**: Choose from three predefined styles like Light, Dark, and Vintage, for a personalized reading experience.\n- **Styling in Syntax**: Apply style directly in the text using NMD syntax.\n- **Additional Page Styling**: Further customize the look of your page with additional styles.\n\n- **Easy Integration**: Compile NMD files into HTML effortlessly for seamless integration with your web projects.\n- **Open Source**: This compiler is open source under the GPL-3.0 License, allowing you to modify and adapt it to suit your needs.\n\n#### Cool Factor\n\nWhy stick to Markdown when you can be cool using **NMD**?\n\n\n## Syntax\n\nYou can find the current NMD's syntax to build nmd documents go to this [link](https://github.com/nricciardi/nmd-core/blob/main/NMD.md).\n\n\n## NMD CLI\n\n### Getting Started\n\nDo you want **migrate from Markdown to New Markdown** easily and quickly? Read [how to do that](#markdown-to-new-markdown) using CLI!\n\n### TL;DR\n\n```shell\ncargo install nmd\n\nnmd generate dossier -p dossier/input/path -f -w\n\nnmd dossier -p dossier/input/path add -d new-document.nmd\n\nnmd build -i input/path\n```\n\n### Installation\n\nYou can install NMD using Cargo or downloading last release from Github.\n\n```shell\ncargo install nmd\n```\n\n\u003e [!IMPORTANT]\n\u003e In some cases, in Linux, you should install `libssl-dev` thought `apt`\n\n### Commands\n\n#### Generate a new dossier\n\nTo **generate a new dossier** you can use the following command:\n\n```shell\nnmd generate dossier -p dossier/input/path\n```\n\nThere are many *flags* that you can use in combination with `generate dossier`. For example, if you want *force* the generation you can use `-f`, or if you want a *welcome page* you can use `-w`.\n\n```shell\nnmd generate dossier -p dossier/input/path -f -w\n```\n\nThe Git support is planned, but not implemented yet. You can only add `.gitkeep` files in assets directories using `-k`.\n\n`-n` permits to specify dossier name.\n\n##### Markdown to New Markdown\n\nYou can easily convert a standard Markdown file in a New Markdown dossier using `--from-md \u003cmd-file-path\u003e` option. \n\n##### Add a new document\n\nTo **add a new document** you can use the following command:\n\n```shell\nnmd dossier -p dossier/input/path add -d new-document.nmd\n```\n\nIf the document name doesn't have `nmd` extension, it will be added automatically.\n\nYou can add more than one document at the same time:\n\n```shell\nnmd dossier -p dossier/input/path add -d new-document-1.nmd -d new-document-2.nmd -d new-document-3.nmd\n```\n\n##### Reset dossier configuration\n\n```shell\nnmd dossier -p dossier/input/path reset [ -p ]\n```\n\n`-p` reset flag to preserve documents list.\n\n#### Build\n\nYou can build a dossier or a single file through `build` command.\n\nThe only mandatory option is the input path. It can be a path to a directory (dossier) or a file.\n\n```shell\nnmd build -i input/path\n```\n\n`compile` command has a lot of options. You could specify the output format using `-f \u003cformat\u003e` (e.g. `html`, which is the default), the output path with `-o \u003coutput-path\u003e` or the theme using `-t \u003ctheme\u003e`. The available themes are:\n\n- `light`\n- `dark`\n- `vintage`\n- `scientific`\n- `none`\n\n\n```shell\nnmd compile -f html dossier -i dossier/input/path -o artifact/output/path\n```\n\nMoreover, if you watch dossier files and compile them if something changes, you should use watcher mode (`-w` option). Watcher mode compile dossier if any change is captured. Changes are captured only if a minimum time is elapsed. To set minimum time use `--watcher-time` option.\n\n`--fast-draft` to create a fast draft of dossier, generally compiler takes less time to generate it.\n\n`--parallelization` to parallelize work (default is single thread).\n\n`-s \u003cdocument1\u003e -s \u003cdocumentN\u003e` to compile only a subset of documents in dossier configuration list.\n\nIn the end, if you are writing in NMD and you want a preview, you could compile with `-p` option. `-p` renders a preview in a web server on `127.0.0.1:1234` (`--preview-scraping-interval \u003cinterval\u003e` to set client scraping interval in *milliseconds*).\n\n`--embed-local-image`, `--embed-remote-image`, `--strict-image-src-check` and `--embed-local-image` to manage images parsing.\n\nYou can use `--nuid` to add *NUID*.\n\n#### Analyze\n\nYou could want analyze a dossier or a document before build it. `analyze` command print on `stdout` the corresponding JSON.\n\n```shell\nnmd analyze -i input/path\n```\n\nYou can use `--nuid` to add *NUID* or `--pretty` to print pretty formatted JSON.\n\n## Develop\n\nDevelop [check list](DEVELOP.md)\n\n## Author\n\nNicola Ricciardi\n\n## Contributing\n\nIf you would like to contribute to the development of the NMD compiler, please follow [contribution guidelines](CONTRIBUTING.md).\n\n## License\n\nThis project is licensed under the GNU General Public License v3.0 - see the [LICENSE](LICENSE) file for details.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnricciardi%2Fnmd","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fnricciardi%2Fnmd","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnricciardi%2Fnmd/lists"}