{"id":22293439,"url":"https://github.com/rrrodzilla/cargo-registry-preview","last_synced_at":"2025-07-29T00:31:03.779Z","repository":{"id":57536349,"uuid":"444623094","full_name":"rrrodzilla/cargo-registry-preview","owner":"rrrodzilla","description":"A cargo subcommand to preview your crate's readme file within your default browser in a near-pixel-perfect hot reloading mockup of the crates.io website.","archived":false,"fork":false,"pushed_at":"2022-01-20T20:23:12.000Z","size":881,"stargazers_count":2,"open_issues_count":0,"forks_count":1,"subscribers_count":1,"default_branch":"main","last_synced_at":"2024-08-09T09:28:48.028Z","etag":null,"topics":["cargo-subcommand","readme","rust","rust-crate","rust-lang","rust-library"],"latest_commit_sha":null,"homepage":"https://crates.io/crates/cargo-markdown","language":"HTML","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/rrrodzilla.png","metadata":{"files":{"readme":"readme.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2022-01-05T01:41:45.000Z","updated_at":"2022-09-13T19:11:28.000Z","dependencies_parsed_at":"2022-08-29T00:41:49.945Z","dependency_job_id":null,"html_url":"https://github.com/rrrodzilla/cargo-registry-preview","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rrrodzilla%2Fcargo-registry-preview","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rrrodzilla%2Fcargo-registry-preview/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rrrodzilla%2Fcargo-registry-preview/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rrrodzilla%2Fcargo-registry-preview/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/rrrodzilla","download_url":"https://codeload.github.com/rrrodzilla/cargo-registry-preview/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":227964975,"owners_count":17848330,"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":["cargo-subcommand","readme","rust","rust-crate","rust-lang","rust-library"],"created_at":"2024-12-03T17:29:09.175Z","updated_at":"2024-12-03T17:29:09.717Z","avatar_url":"https://github.com/rrrodzilla.png","language":"HTML","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003ch1 align=\"center\"\u003ecargo-markdown\u003c/h1\u003e\n\n![image](https://github.com/rrrodzilla/cargo-registry-preview/raw/main/assets/cargo_markdown_logo.png)\n\n---\n\n\u003ch3 align=\"center\"\u003eCreate great readme files for your crates.io page fast!\u003c/h3\u003e\n\nA cargo subcommand to preview your crate's readme file within your default browser in a near-pixel-perfect hot reloading mockup of the crates.io website.\n\n## ⚡Quick Start\n\n\nMake sure you have Rust and Cargo installed, then install with:\n```bash\ncargo install cargo-markdown\n```\nFrom your project directory, run:\n```bash\n# your readme file must already exist at the path you specify\ncargo markdown ./readme.md \n```\n\u003cimg class=\"align-center\" src=\"https://github.com/rrrodzilla/cargo-registry-preview/raw/main/assets/demo.gif\" alt=\"An animated image showing the output of cargo-markdown when run from a terminal\" align=\"center\" /\u003e\n\nOpen your browser to the address given and you'll see your readme file in a mockup of the crates.io website.\n\nNow you can edit your readme file in the editor of your choice. Each time you save the file, the preview web page will hot reload immediately.\n\n\n## 🎯 Features\n\n- Same markdown rendering code and styles as the official crates.io website\n- Same responsive breakpoints so you can test the layout in a mobile format\n- Ultra fast hot reloading when your readme file is updated\n- Test from a [live mobile device](#-testing-on-mobile) using [ngrok](https://ngrok.com)\n- Automatically open your default browser by passing the `--open` flag\n- Keeps track of how many readme updates you've made each session\n\n## ⚙️ Usage\n\n```bash\nUSAGE:\n    cargo markdown [OPTIONS] \u003cREADME\u003e [PORT]\n\nARGS:\n    \u003cREADME\u003e    📄 The path to your readme file\n    \u003cPORT\u003e      🚢 The port used by the preview server [default: 8080]\n\n\u003cOPTIONS\u003e\n    -h, --help           ❔ Print help information\n    -p, --port \u003cPORT\u003e    🚢 The port used by the preview server [default: 8080]\n    --host \u003cHOSTNAME\u003e    🏨 The hostname used by the hot-reload server [default: 127.0.0.1]\n    -o, --open \u003copen\u003e    🌐 Automagically open your browser on startup [default: false]\n    -V, --version        🎬 Print version information\n```\n\n### Opening your default browser\n\nSimply pass the `--open` flag to have *cargo-markdown* automatically open your default browser on startup.\n\nDon't pass `--open` if you don't want your browser to automatically open.  You can browse to the displayed url on your own.  This is great for when you already have a tab open to your preview website but you've closed down *cargo-markdown*.  When you re-open *cargo-markdown* any tabs you have open will automatically reconnect within 5 seconds.\n\n\n## 🧪 Testing on mobile\n\nYou can use a tool like [ngrok](https://ngrok.com/) to open a public url to your local preview site and then connect to it on your mobile device (or any other device with internet access).\n\nOnce you have ngrok installed on your system, run it like so:\n```bash\n./ngrok http 8080\n```\n\nngrok will show you a public url to your localhost:8080 address.  ![image](https://github.com/rrrodzilla/cargo-registry-preview/raw/main/assets/ngrok_ui.png)\n\nNow simply run *cargo-markdown* passing in the host from ngrok.\n```bash\ncargo markdown readme.md --host 62cf2a5454d8.ngrok.io\n\n```\n\nYou can now use another machine or a mobile device to access your crates.io mockup on another device complete with hot reloading by browsing to: http://62cf2a5454d8.ngrok.io (or whatever address ngrok gave you)\n\n\u003e **note:** hot reload over ngrock might be slower since the site is reloading over the internet and via a proxy instead of directly from localhost\n\n---\n\n## ❤️ Like this tool?\n\n\u003e ⭐ Star     https://github.com/rrrodzilla/cargo-registry-preview\n\n\u003e 🐦 Follow   https://twitter.com/rrrodzilla\n\n\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frrrodzilla%2Fcargo-registry-preview","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Frrrodzilla%2Fcargo-registry-preview","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frrrodzilla%2Fcargo-registry-preview/lists"}