{"id":51239717,"url":"https://github.com/skvggor/mugdoc","last_synced_at":"2026-06-28T23:30:57.642Z","repository":{"id":344453078,"uuid":"1181780422","full_name":"skvggor/mugdoc","owner":"skvggor","description":"Generate a documentation site from your project's README using Astro and Starlight.","archived":false,"fork":false,"pushed_at":"2026-03-25T21:11:31.000Z","size":145,"stargazers_count":2,"open_issues_count":1,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2026-03-26T20:11:53.118Z","etag":null,"topics":["astro-build","developer-experience","developer-tools","docs","documentation","documentation-generator","dx","ssr","starlight","starlight-astro","static-site-generator"],"latest_commit_sha":null,"homepage":"https://mugdoc.reposito.rio.br","language":"Shell","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/skvggor.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"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,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2026-03-14T16:05:12.000Z","updated_at":"2026-03-25T21:11:35.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/skvggor/mugdoc","commit_stats":null,"previous_names":["skvggor/mugdoc"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/skvggor/mugdoc","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/skvggor%2Fmugdoc","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/skvggor%2Fmugdoc/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/skvggor%2Fmugdoc/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/skvggor%2Fmugdoc/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/skvggor","download_url":"https://codeload.github.com/skvggor/mugdoc/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/skvggor%2Fmugdoc/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":34907985,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-06-28T02:00:05.809Z","response_time":54,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"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":["astro-build","developer-experience","developer-tools","docs","documentation","documentation-generator","dx","ssr","starlight","starlight-astro","static-site-generator"],"created_at":"2026-06-28T23:30:53.770Z","updated_at":"2026-06-28T23:30:57.638Z","avatar_url":"https://github.com/skvggor.png","language":"Shell","funding_links":[],"categories":[],"sub_categories":[],"readme":"# mugdoc\n\nGenerate a documentation site from your project's README using Astro and Starlight.\n\n---\n\n\u003cimg height=\"50\" src=\"assets/star.svg\" alt=\"if you liked it, give it a star\" /\u003e\n\n---\n\n## How it works\n\nClone this repo into your project, run `setup.sh`, and get a static documentation site. The setup script detects your project name and description, converts your README into the site content, copies referenced images, installs dependencies, and removes itself.\n\nThe generated site is a single page with your README content, no sidebar, and a table of contents on the right. If you provide `--repo`, a floating \"Star on GitHub\" button will appear in the bottom-right corner.\n\n## Usage\n\n```bash\ngit clone --depth 1 git@github.com:skvggor/mugdoc.git docs \u0026\u0026 rm -rf docs/.git \u0026\u0026 ./docs/setup.sh\n```\n\n### Options\n\n| Flag | Description | Required |\n|---|---|---|\n| `--domain` | Base domain for the site URL | Yes |\n| `--deploy` | Absolute path on the server to deploy via SSH | No |\n| `--port` | Container port for the docs site (requires --deploy) | No |\n| `--repo` | URL to your GitHub repository (shows floating star button) | No |\n\n### Examples\n\nWith a custom domain:\n\n```bash\n./docs/setup.sh --domain example.com\n```\n\nWith original repository link:\n\n```bash\n./docs/setup.sh --domain example.com --repo https://github.com/user/my-project\n```\n\nDeploy to a VPS:\n\n```bash\n./docs/setup.sh --domain example.com --deploy /root/projects/my-project\n```\n\nDeploy with custom port:\n\n```bash\n./docs/setup.sh --domain example.com --deploy /root/projects/my-project --port 3001\n```\n\nAfter setup:\n\n```bash\ncd docs \u0026\u0026 npm run dev       # development server\ncd docs \u0026\u0026 npm run build     # build static site\ncd docs \u0026\u0026 npm run preview   # preview build\n```\n\n## Project detection\n\nThe setup script detects your project name from (in order):\n\n| File | Field |\n|---|---|\n| `package.json` | `name` |\n| `Cargo.toml` | `[package] name` |\n| `go.mod` | `module` |\n| `pyproject.toml` | `[project] name` |\n\nFalls back to the parent directory name.\n\nDescription is extracted from the first text line in the README (skipping headings, HTML tags, links, and code blocks), then from `package.json` description, then a generic fallback.\n\n## Images\n\nLocal images referenced in the README (both markdown and HTML `\u003cimg\u003e` syntax) are automatically copied to the site's public directory and their paths are rewritten. External URLs are left unchanged.\n\nIf the project has an `assets/` directory at the root, its contents are also copied.\n\n## Videos\n\nBare video URLs in the README are automatically converted to `\u003cvideo\u003e` tags in the generated site. This covers:\n\n- GitHub user-attachment URLs (e.g. `https://github.com/user-attachments/assets/...`)\n- Direct links to `.mp4`, `.webm`, and `.mov` files\n\nOn GitHub, pasting a video URL on its own line auto-embeds a player. Since Astro/Starlight doesn't do this, mugdoc handles the conversion during setup.\n\n## Deploy\n\nThe `--deploy` flag generates everything needed to deploy the docs site to a VPS using Docker, Caddy, and GitHub Actions.\n\nThis creates:\n\n- `docs/Dockerfile` -- multi-stage build: Node builds the Astro site, Caddy serves the static files\n- `docs/compose.yml` -- Docker Compose service with [caddy-docker-proxy](https://github.com/lucaslorentz/caddy-docker-proxy) labels for automatic HTTPS\n- `.github/workflows/deploy-docs.yml` -- GitHub Actions workflow that deploys via SSH on push to `main`\n\nThe site URL is `https://{project-name}.{domain}`.\n\nThe workflow uses [appleboy/ssh-action](https://github.com/appleboy/ssh-action) and requires these repository secrets:\n\n| Secret | Description |\n|---|---|\n| `HOST` | Server IP or hostname |\n| `USERNAME` | SSH user |\n| `SSH_PRIVATE_KEY` | Private key for authentication |\n| `PORT` | SSH port (optional, defaults to 22) |\n\nWithout `--deploy`, the deploy files are removed and only the local development setup is kept.\n\n## Requirements\n\n- Node.js\n- npm, pnpm, or yarn\n\n## Stack\n\n- [Astro](https://astro.build) + [Starlight](https://starlight.astro.build)\n- [Tailwind CSS](https://tailwindcss.com) via `@astrojs/starlight-tailwind`\n\n## License\n\n[GNU General Public License v3.0](LICENSE)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fskvggor%2Fmugdoc","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fskvggor%2Fmugdoc","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fskvggor%2Fmugdoc/lists"}