{"id":22208881,"url":"https://github.com/bioruebe/markdown-it-variable","last_synced_at":"2025-06-28T12:32:19.186Z","repository":{"id":202903357,"uuid":"625035718","full_name":"Bioruebe/markdown-it-variable","owner":"Bioruebe","description":"A markdown-it plugin, which allows defining variables","archived":false,"fork":false,"pushed_at":"2024-04-21T09:28:37.000Z","size":142,"stargazers_count":2,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-06-03T11:51:37.091Z","etag":null,"topics":["markdown-it","markdown-it-plugin","variable","variables"],"latest_commit_sha":null,"homepage":"","language":"TypeScript","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/Bioruebe.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":"2023-04-07T22:23:48.000Z","updated_at":"2025-04-26T17:35:34.000Z","dependencies_parsed_at":"2024-11-20T10:38:57.445Z","dependency_job_id":"4ba92c28-847b-4664-8e30-22ac2e76506e","html_url":"https://github.com/Bioruebe/markdown-it-variable","commit_stats":{"total_commits":37,"total_committers":1,"mean_commits":37.0,"dds":0.0,"last_synced_commit":"4d6a4ce6ffa5b78e062d632fd6c881bd9e16695c"},"previous_names":["bioruebe/markdown-it-variable"],"tags_count":3,"template":false,"template_full_name":"Bioruebe/markdown-it-plugin-template","purl":"pkg:github/Bioruebe/markdown-it-variable","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Bioruebe%2Fmarkdown-it-variable","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Bioruebe%2Fmarkdown-it-variable/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Bioruebe%2Fmarkdown-it-variable/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Bioruebe%2Fmarkdown-it-variable/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Bioruebe","download_url":"https://codeload.github.com/Bioruebe/markdown-it-variable/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Bioruebe%2Fmarkdown-it-variable/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":259786606,"owners_count":22911013,"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":["markdown-it","markdown-it-plugin","variable","variables"],"created_at":"2024-12-02T19:23:30.807Z","updated_at":"2025-06-28T12:32:19.168Z","avatar_url":"https://github.com/Bioruebe.png","language":"TypeScript","readme":"# markdown-it-variable\n\n[![npm](https://img.shields.io/npm/v/markdown-it-variable)](https://www.npmjs.com/package/markdown-it-variable) ![Tests](https://github.com/Bioruebe/markdown-it-variable/actions/workflows/node.js.yml/badge.svg) ![markdown-it](https://img.shields.io/npm/dependency-version/markdown-it-variable/peer/markdown-it)\n\n\u003e A markdown-it plugin, which allows defining variables, which can then be referenced in the document and are auto-replaced with the specified content\n\n## Usage\n\n### Install\n\n```bash\nnpm install markdown-it-variable\n```\n\n### Enable\n\n```js\n// ESM\nimport MarkdownIt from \"markdown-it\";\nimport MarkdownItVariable from \"markdown-it-variable\";\nconst md = new MarkdownIt().use(MarkdownItVariable, options);\n\n// CommonJS\nconst markdownIt = require(\"markdown-it\");\nconst markdownItVariable = require(\"markdown-it-variable\");\nconst md = markdownIt().use(markdownItVariable);\n```\n\n### Syntax\n\nYou can define variables at any position of the document:\n\n```md\n{{\u003e variableName variableContent }}\n{{\u003e anotherVariable moreContent }}\n```\n\nThen, reference it anywhere:\n\n```md\nThis will be replaced: {{ variableName }}\n```\n\nwill be rendered as\n\n```html\nThis will be replaced: variableContent\n```\n\n#### Variable definition\n\n- Each variable must be on its **own line**.\n\n- The variable name must not contain any spaces or special characters, **only alphanumeric characters** are allowed.\n\n- The **definitions will not be rendered** to keep your document clean. However, if a variable is not referenced, the definition will be visible to make you aware of this fact.\n\n- Definitions can be **placed anywhere** in the document.\n\n#### Variable content\n\n- Formatting via Markdown is possible:\n  \n  ```md\n  {{\u003e title *Markdown-it* **Variables** plugin }}\n  ```\n\n- Variables can only span **a single line**, you cannot reference whole paragraphes or complex markup such as lists.\n\n- Variable content can contain markup handled by other plugins.\n\n- Spaces around the brackets are optional:\n  \n  ```md\n  This is the {{title}}\n  ```\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbioruebe%2Fmarkdown-it-variable","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbioruebe%2Fmarkdown-it-variable","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbioruebe%2Fmarkdown-it-variable/lists"}