{"id":15017148,"url":"https://github.com/geckoeidechse/mdbook-obsidian","last_synced_at":"2025-07-12T15:09:37.139Z","repository":{"id":220984334,"uuid":"753124220","full_name":"GeckoEidechse/mdbook-obsidian","owner":"GeckoEidechse","description":"mdBook preprocessor to render Obsidian specific syntax ","archived":false,"fork":false,"pushed_at":"2024-11-01T18:27:53.000Z","size":1291,"stargazers_count":14,"open_issues_count":6,"forks_count":0,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-06-06T17:08:13.626Z","etag":null,"topics":["mdbook","mdbook-preprocessor","obsidian","obsidian-md","rust"],"latest_commit_sha":null,"homepage":"https://crates.io/crates/mdbook-obsidian","language":"Rust","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mpl-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/GeckoEidechse.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","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}},"created_at":"2024-02-05T14:16:00.000Z","updated_at":"2025-05-14T18:36:32.000Z","dependencies_parsed_at":"2024-04-23T12:46:43.629Z","dependency_job_id":"b58115bb-eb01-4901-9730-f2a28db6e777","html_url":"https://github.com/GeckoEidechse/mdbook-obsidian","commit_stats":null,"previous_names":["geckoeidechse/mdbook-obsidian"],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/GeckoEidechse/mdbook-obsidian","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/GeckoEidechse%2Fmdbook-obsidian","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/GeckoEidechse%2Fmdbook-obsidian/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/GeckoEidechse%2Fmdbook-obsidian/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/GeckoEidechse%2Fmdbook-obsidian/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/GeckoEidechse","download_url":"https://codeload.github.com/GeckoEidechse/mdbook-obsidian/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/GeckoEidechse%2Fmdbook-obsidian/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":265009215,"owners_count":23697154,"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":["mdbook","mdbook-preprocessor","obsidian","obsidian-md","rust"],"created_at":"2024-09-24T19:49:57.332Z","updated_at":"2025-07-12T15:09:37.066Z","avatar_url":"https://github.com/GeckoEidechse.png","language":"Rust","funding_links":[],"categories":[],"sub_categories":[],"readme":"# mdbook-obsidian\n\n[![crates.io](https://img.shields.io/crates/v/mdbook-obsidian.svg)](https://crates.io/crates/mdbook-obsidian)\n[![MPL 2.0 LICENSE](https://img.shields.io/github/license/GeckoEidechse/mdbook-obsidian.svg)](LICENSE)\n[![docs.rs](https://docs.rs/mdbook-obsidian/badge.svg)](https://docs.rs/mdbook-obsidian)\n[![Build](https://github.com/GeckoEidechse/mdbook-obsidian/actions/workflows/build.yml/badge.svg)](https://github.com/GeckoEidechse/mdbook-obsidian/actions/workflows/build.yml)\n[![Test](https://github.com/GeckoEidechse/mdbook-obsidian/actions/workflows/test.yml/badge.svg)](https://github.com/GeckoEidechse/mdbook-obsidian/actions/workflows/test.yml)\n\n\n[mdBook](https://github.com/rust-lang/mdBook) preprocessor to render [Obsidian](https://obsidian.md/) specific syntax in mdBook.\n\nTo see the preprocessor in action, check out [this rendered example book](https://geckoeidechse.github.io/mdbook-obsidian/).\n\nTo see the list of existing and supported syntax, see [this GitHub issue](https://github.com/GeckoEidechse/mdbook-obsidian/issues/1).\n\n\u003e ⚠️ WIP ⚠️\n\u003e\n\u003e This mdBook preprocessor is very much work-in-progress and currently only supports a small subset of the total Obsidian specific syntax.\n\u003e Contributions to expand the supported syntax are more than welcome \u003c3\n\u003e\n\u003e If you'd like to take over maintainership or ownership of this crate, please get in touch via an issue in the GitHub repo of this crate.\n\n## Usage\n\nFirst, install the preprocessor:\n\n```bash\ncargo install mdbook-obsidian\n```\n\nThen, add the preprocessor to your `book.toml`:\n\n```toml\n[book]\nauthors = [\"Jill Doe\"]\nlanguage = \"en\"\nmultilingual = false\nsrc = \"src\"\ntitle = \"My awesome Book\"\n\n# ADD THIS\n[preprocessor.obsidian]\n\n```\n\n## Development\n\n### How it works\n\nThe way this preprocessor works is primarily by using regexes to search for specific patterns like\n\n```markdown\n\u003e [!CALLOUT_TYPE]\n\u003e CALLOUT_BODY\n```\n\nand then replacing it with the corresponding HTML code like\n\n```html\n\u003cstyle\u003e\n  /* a bunch of CSS */\n\u003c/style\u003e\n\u003cdiv class=\"mdbook-obsidian-callouts mdbook-obsidian-callouts-{kind}\"\u003e\n  \u003cp class=\"mdbook-obsidian-callouts-title\"\u003e\n    \u003cspan class=\"mdbook-obsidian-callouts-icon\"\u003e\u003c/span\u003e\n    CALLOUT_TYPE\n  \u003c/p\u003e\n\n  CALLOUT_BODY\n\n\u003c/div\u003e\n```\n\n### Expanding the preprocessor\n\nThe currently supported syntax is tracked in [this GitHub issue](https://github.com/GeckoEidechse/mdbook-obsidian/issues/1)\n\nTo add support for some currently unsupported syntax, expand the existing existing main render loop in `lib.rs`\n\n```rust\n/// Apply to all chapters\nfn handle_chapter(chapter: \u0026mut Chapter) -\u003e Result\u003c(), Error\u003e {\n    chapter.content = callouts::render(\u0026chapter.content)?;\n    // Add your additional syntax parsing here\n\n    Ok(())\n}\n```\n\nwith a function that calls the corresponding parsing logic.\n\nIn your parsing logic, use regex or any other methods to scan for the specific pattern of the syntax you want to support and replace it with the corresponding HTML code.\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgeckoeidechse%2Fmdbook-obsidian","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fgeckoeidechse%2Fmdbook-obsidian","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgeckoeidechse%2Fmdbook-obsidian/lists"}