{"id":15283937,"url":"https://github.com/bendmyers/eleventy-plugin-emphasis","last_synced_at":"2026-03-09T15:04:20.299Z","repository":{"id":57222308,"uuid":"432538202","full_name":"BenDMyers/eleventy-plugin-emphasis","owner":"BenDMyers","description":"An Eleventy plugin for your Markdown syntax which puts you in control of your emphasis markup.","archived":false,"fork":false,"pushed_at":"2021-11-28T18:45:24.000Z","size":8,"stargazers_count":6,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-04-10T05:41:31.516Z","etag":null,"topics":["eleventy","eleventy-plugin","markdown","markdown-it"],"latest_commit_sha":null,"homepage":"https://www.npmjs.com/package/eleventy-plugin-emphasis","language":"JavaScript","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/BenDMyers.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}},"created_at":"2021-11-27T18:34:11.000Z","updated_at":"2021-11-28T21:07:53.000Z","dependencies_parsed_at":"2022-09-05T07:00:38.836Z","dependency_job_id":null,"html_url":"https://github.com/BenDMyers/eleventy-plugin-emphasis","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/BenDMyers%2Feleventy-plugin-emphasis","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/BenDMyers%2Feleventy-plugin-emphasis/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/BenDMyers%2Feleventy-plugin-emphasis/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/BenDMyers%2Feleventy-plugin-emphasis/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/BenDMyers","download_url":"https://codeload.github.com/BenDMyers/eleventy-plugin-emphasis/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248643937,"owners_count":21138527,"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":["eleventy","eleventy-plugin","markdown","markdown-it"],"created_at":"2024-09-30T14:48:18.630Z","updated_at":"2026-03-09T15:04:20.235Z","avatar_url":"https://github.com/BenDMyers.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# eleventy-plugin-emphasis\n\n\u003e **An [Eleventy](https://11ty.dev) plugin for your Markdown syntax which puts you in control of your emphasis markup.**\n\n## What is this plugin for?\n\nMarkdown provides several syntaxes for emphasizing your text:\n\n* `*Single asterisks*` get converted into `\u003cem\u003e` tags\n* `**Double asterisks**` get converted into `\u003cstrong\u003e` tags\n* `_Single underscores_` get converted into `\u003cem\u003e` tags\n* `__Double underscores__` get converted into `\u003cstrong\u003e` tags\n\nThis syntax is redundant, and sometimes **(once in a blue moon)** [you *might* want to use `\u003cb\u003e` and `\u003ci\u003e` tags](https://www.w3.org/International/questions/qa-b-and-i-tags) instead of `\u003cstrong\u003e` and `\u003cem\u003e`. Alternatively, maybe you'd like to use some of this syntax for other tags such as `\u003cmark\u003e`!\n\n**This plugin lets you configure which tag your Eleventy project's `markdown-it` Markdown parser uses for text surrounded by single asterisks, double asterisks, single underscores, and double underscores.**\n\n## Setup\n\nIn your terminal, navigate into your Eleventy project and run the following:\n\n```bash\nnpm install eleventy-plugin-emphasis\n```\n\nThen, add this plugin to your Eleventy config file (`.eleventy.js`):\n\n```js\nconst emphasisOverrides = require('eleventy-plugin-emphasis');\n\nmodule.exports = function (eleventyConfig) {\n\televentyConfig.addPlugin(emphasisOverrides, {\n\t\t// See Options API section below for full configuration options!\n\t\t'_': 'i',\n\t\t'__': 'b'\n\t});\n\n\t// return {...};\n}\n```\n\n### I'm managing my own `markdown-it` instance!\n\nIf you're managing your own instance of `markdown-it` to provide other customizations to your Markdown parsing, you can supply that instance to `eleventy-plugin-emphasis` as the `md` property in your options object:\n\n```js\nconst markdownIt = require('markdown-it');\nconst emphasisOverrides = require('eleventy-plugin-emphasis');\n\nmodule.exports = function (eleventyConfig) {\n\tconst markdown = markdownIt({html: true});\n\n\televentyConfig.addPlugin(emphasisOverrides, {\n\t\t'md': markdown,\n\t\t'_': 'i',\n\t\t'__': 'b'\n\t});\n\n\televentyConfig.setLibrary('md', markdown);\n\n\t// return {...};\n}\n```\n\n## Options API\n\nAll options are completely optional.\n\n| Option |   Default  | Type                                 |                                                                                               Purpose                                                                                              |\n|:------:|:----------:|--------------------------------------|:--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------:|\n| `'md'` |            | `Object` (instance of `markdown-it`) | Pass your own instance of markdown-it to configure. If not provided, the plugin will create its own instance using the [same defaults as Eleventy](https://www.11ty.dev/docs/languages/markdown/). |\n| `'*'`  | `'em'`     | `String` (any valid HTML tag)        | Tag to use when text is surrounded in a single asterisk like `*this*`                                                                                                                              |\n| `'**'` | `'strong'` | `String` (any valid HTML tag)        | Tag to use when text is surrounded in double asterisks like `**this**`                                                                                                                             |\n| `'_'`  | `'em'`     | `String` (any valid HTML tag)        | Tag to use when text is surrounded in a single underscore like `_this_`                                                                                                                            |\n| `'__'` | `'strong'` | `String` (any valid HTML tag)        | Tag to use when text is surrounded in double underscores like `__this__`                                                                                                                           |","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbendmyers%2Feleventy-plugin-emphasis","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbendmyers%2Feleventy-plugin-emphasis","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbendmyers%2Feleventy-plugin-emphasis/lists"}