{"id":16677214,"url":"https://github.com/folyd/mdbook-hub","last_synced_at":"2025-08-11T04:04:55.401Z","repository":{"id":97218471,"uuid":"554013040","full_name":"Folyd/mdbook-hub","owner":"Folyd","description":"The hub for mdbook","archived":false,"fork":false,"pushed_at":"2022-10-25T16:40:04.000Z","size":6,"stargazers_count":2,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-07-29T23:51:04.140Z","etag":null,"topics":["mdbook","rust"],"latest_commit_sha":null,"homepage":"https://mdbook.org","language":"Rust","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Folyd.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}},"created_at":"2022-10-19T05:34:41.000Z","updated_at":"2024-11-14T07:45:00.000Z","dependencies_parsed_at":"2023-03-15T09:30:22.509Z","dependency_job_id":null,"html_url":"https://github.com/Folyd/mdbook-hub","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/Folyd/mdbook-hub","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Folyd%2Fmdbook-hub","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Folyd%2Fmdbook-hub/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Folyd%2Fmdbook-hub/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Folyd%2Fmdbook-hub/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Folyd","download_url":"https://codeload.github.com/Folyd/mdbook-hub/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Folyd%2Fmdbook-hub/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":269827296,"owners_count":24481500,"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","status":"online","status_checked_at":"2025-08-11T02:00:10.019Z","response_time":75,"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":["mdbook","rust"],"created_at":"2024-10-12T13:25:36.565Z","updated_at":"2025-08-11T04:04:55.329Z","avatar_url":"https://github.com/Folyd.png","language":"Rust","funding_links":[],"categories":[],"sub_categories":[],"readme":"# mdbook-hub\n\nThe hub for mdbook.\n\n## What is mdbook-hub?\n\n`mdbook-hub` is a decentralized book hosting platform for books generated by `mdbook`. If `mdbook` is the `librustdoc`, then `mdbook-hub` is the `docs.rs`.\n\n## Why mdbook-hub?\n\n`mdbook-hub` aimed to bring the best publishing, and hosting experience to `mdbook` users. Imagine, we run `mdbook publish` in the directory of *The Rust Programming Language Book*, we can publish the book with the unique url `https://mdbook.org/rust-lang/book` effortlessly, no Github Pages setup required, no CI required.\n\nThe `mdbook publish` is similar to `cargo publish` which can publish our crate to [crates.io](https://crates.io) and get a unique url on [docs.rs](https://docs.rs).\n\n\u003e mdbook has no `publish` subcommand yet, we need to add it.\n\n## How mdbook-hub works?\n\n`mdbook-hub` mainly has two concepts:\n\n- User\n- Book\n\n### User\n\nThe user is the organization or individual who owns the book (the author of the book). Every user has a unique handle, such as `rust-lang` (organization), `folyd`(individual). The `https://mdbook.org/{handle}` is the profile page to list all of public books of this user. For example, we can visit `https://mdbook.org/rust-lang` to view all books from Rust official.\n\n### Book\n\nJust an ordinary book generated by `mdbook`. However, the book must have at least one author. If a user is the author or co-author of a book, the user profile page can display this book.\n\nEvery published book has its unique url. For instance, the `https://mdbook.org/rust-lang/book` is the book whose id is `book` owned by `rust-lang` user.\n\nYes, this is like the relationship between a GitHub user and a GitHub repository.  So, you can get why we call **mdbook-hub**.\n\n## Technical design\n\nTechnically, `mdbook-hub` is very similar to the combination of `crates.io` and `docs.rs`, except it is for books. We use `mdbook` to automatically generate HTML pages once a user publishes a new version of his book. The generated static book will be uploaded to AWS S3 or other similar static hosting platforms.\n\n`mdbook-hub` has several critical components:\n\n- Server\n- `mdbook` subcommand \n\n### Server\n\n`mdbook-hub` is a web server used to handle API requests such as but not limited to user authentication and book publishing.\n\n### Subcommand\n\nWe need to add two subcommands to `mdbook`:\n\n- `mdbook login` - Authenticate a user with an API token generated from `mdbook-hub` server. \n\n- `mdbook publish` - Publish the book to `mdbook-hub` if the user is authenticated.\n\n### Alternative\n\nA `mdbook-hub` cargo subcommand is another good choice if we cannot add above two subcommands to `mdbook`.\n\n```sh\n$ cargo install mdbook-hub\n\n$ cargo mdbook login # alternative to `mdbook login`\n\n$ cargo mdbook publish # alternative to `mdbook publish`\n```\n\n## Roadmap\n\n- Support login with API token\n- Support publish book\n- Support book i18n\n- Book page view statistics","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffolyd%2Fmdbook-hub","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ffolyd%2Fmdbook-hub","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffolyd%2Fmdbook-hub/lists"}