{"id":13929615,"url":"https://github.com/avitex/mdbook-tera","last_synced_at":"2025-07-01T02:38:35.618Z","repository":{"id":37850129,"uuid":"243183309","full_name":"avitex/mdbook-tera","owner":"avitex","description":"Tera preprocessor for mdBook","archived":false,"fork":false,"pushed_at":"2023-08-22T09:44:48.000Z","size":118,"stargazers_count":20,"open_issues_count":12,"forks_count":5,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-05-20T13:15:10.716Z","etag":null,"topics":["mdbook","rust-lang","tera"],"latest_commit_sha":null,"homepage":"","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/avitex.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":".github/FUNDING.yml","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},"funding":{"github":["avitex"]}},"created_at":"2020-02-26T06:14:14.000Z","updated_at":"2024-10-21T17:32:36.000Z","dependencies_parsed_at":"2024-01-17T05:21:45.368Z","dependency_job_id":"8a13c91e-350a-4e13-af9e-fa00cbc3e94b","html_url":"https://github.com/avitex/mdbook-tera","commit_stats":null,"previous_names":[],"tags_count":4,"template":false,"template_full_name":null,"purl":"pkg:github/avitex/mdbook-tera","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/avitex%2Fmdbook-tera","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/avitex%2Fmdbook-tera/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/avitex%2Fmdbook-tera/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/avitex%2Fmdbook-tera/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/avitex","download_url":"https://codeload.github.com/avitex/mdbook-tera/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/avitex%2Fmdbook-tera/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":261763336,"owners_count":23206212,"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","rust-lang","tera"],"created_at":"2024-08-07T18:02:26.811Z","updated_at":"2025-07-01T02:38:35.589Z","avatar_url":"https://github.com/avitex.png","language":"Rust","funding_links":["https://github.com/sponsors/avitex"],"categories":["others"],"sub_categories":[],"readme":"[![Build Status](https://github.com/avitex/mdbook-tera/workflows/build/badge.svg)](https://github.com/avitex/mdbook-tera/actions?query=workflow:build)\n[![Crate](https://img.shields.io/crates/v/mdbook-tera.svg)](https://crates.io/crates/mdbook-tera)\n[![Docs](https://docs.rs/mdbook-tera/badge.svg)](https://docs.rs/mdbook-tera)\n\n# mdbook-tera\n\n**[Tera](https://github.com/Keats/tera) preprocessor for [mdBook](https://github.com/rust-lang/mdBook)**  \nAPI documentation hosted on [docs.rs](https://docs.rs/mdbook-tera).\n\n```text\n$ mdbook-tera --help\nmdbook-tera 0.5.1\nA mdBook preprocessor that renders Tera\n\nUSAGE:\n    mdbook-tera [OPTIONS] [SUBCOMMAND]\n\nOPTIONS:\n    -h, --help                       Print help information\n        --json \u003cFILE\u003e                Sets context from JSON file\n        --template-include \u003cGLOB\u003e    Include tera templates matching a glob expression [default:\n                                     **/*.tera]\n        --template-root \u003cPATH\u003e       Root directory to include templates from [default: ./src]\n        --toml \u003cFILE\u003e                Sets context from TOML file\n    -V, --version                    Print version information\n\nSUBCOMMANDS:\n    help        Print this message or the help of the given subcommand(s)\n    supports    Check whether a renderer is supported by this preprocessor\n```\n\n## Usage\n\nFirst install the tera preprocessor.\n\n```text\ncargo install mdbook-tera\n```\n\nThen in your `book.toml` file, add the tera preprocessor as below.\n\n### Default Configuration\n\n```toml\n# Default options, load a TOML context file from ./src/context.toml\n[preprocessor.tera]\n```\n\n### JSON Configuration\n\n```toml\n[preprocessor.tera]\ncommand = \"mdbook-tera --json ./src/context.json\"\n```\n\n### Usage in Markdown files\n\nSee `example-book` for a basic usage.\n\nSimply define your values in the `context.toml` file, and use them in tera statements.\nYou can access the book context with the key `ctx`.\n\n```md\n# My Heading\n\n{{ my_value }}\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Favitex%2Fmdbook-tera","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Favitex%2Fmdbook-tera","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Favitex%2Fmdbook-tera/lists"}