{"id":13612293,"url":"https://github.com/bdesham/inline_highlight","last_synced_at":"2025-04-13T11:31:54.516Z","repository":{"id":24598211,"uuid":"28006690","full_name":"bdesham/inline_highlight","owner":"bdesham","description":"A tag for inline syntax highlighting in Jekyll.","archived":false,"fork":false,"pushed_at":"2020-12-02T20:44:28.000Z","size":9,"stargazers_count":30,"open_issues_count":0,"forks_count":11,"subscribers_count":4,"default_branch":"main","last_synced_at":"2024-04-24T19:32:29.493Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Ruby","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/bdesham.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2014-12-14T20:20:32.000Z","updated_at":"2023-11-29T10:22:05.000Z","dependencies_parsed_at":"2022-07-24T02:02:06.485Z","dependency_job_id":null,"html_url":"https://github.com/bdesham/inline_highlight","commit_stats":null,"previous_names":[],"tags_count":4,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bdesham%2Finline_highlight","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bdesham%2Finline_highlight/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bdesham%2Finline_highlight/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bdesham%2Finline_highlight/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/bdesham","download_url":"https://codeload.github.com/bdesham/inline_highlight/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248705717,"owners_count":21148581,"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":[],"created_at":"2024-08-01T20:00:26.812Z","updated_at":"2025-04-13T11:31:54.204Z","avatar_url":"https://github.com/bdesham.png","language":"Ruby","funding_links":[],"categories":["Tags"],"sub_categories":[],"readme":"# inline_highlight\n\nA tag for inline syntax highlighting in Jekyll.\n\n[Jekyll](http://jekyllrb.com) has a syntax-highlighting facility that you can invoke with the “highlight” tag:\n\n    It looks like you just forgot to include\n\n    {% highlight python %}\n    from random import random\n    {% endhighlight %}\n    \n    at the top of your file.\n\nUnfortunately this syntax highlighting can’t be used in the middle of a paragraph: it always starts a new `\u003cfigure\u003e` in the generated HTML. The inline_highlight plugin provides an “ihighlight” tag that works in the same way as the built-in “highlight” tag except that it wraps the highlighted code within a `\u003ccode\u003e` instead of a `\u003cfigure\u003e`. You can use the tag like this:\n\n    It looks like you just forgot to include {% ihighlight python %} from random\n    import random {% endihighlight %} at the top of your file.\n\n## Installation\n\nThe easiest way to install this plugin is to copy the [jekyll_inline_highlight.rb file](lib/jekyll_inline_highlight.rb) to a folder named “\\_plugins” in your Jekyll project.\n\nFor more detailed instructions, see the [“installing a plugin”](https://jekyllrb.com/docs/plugins/#installing-a-plugin) section of the Jekyll documentation.\n\n## Usage\n\nThe “ihighlight” tag uses whichever syntax highlighter (Pygments or Rouge) you have specified in your site’s “\\_config.yml”. (It also accepts the same options as the built-in “highlight” tag, although at the moment the only such option turns on line numbering, which is probably not something you want in your inline code.)\n\nThe “ihighlight” tag produces HTML that has the following structure:\n\n    \u003ccode class=\"highlight\"\u003e\n        ...\n    \u003c/code\u003e\n\nBy contrast, the “highlight” tag produces HTML like this:\n\n    \u003cfigure class=\"highlight\"\u003e\n        \u003cpre\u003e\n            \u003ccode\u003e\n                ...\n            \u003c/code\u003e\n        \u003c/pre\u003e\n    \u003c/figure\u003e\n\nIf you have custom CSS set up for syntax highlighting then you can just create a rule for `.highlight` to catch both forms. The “...” is identical in both cases. (There are some additional attributes added to the `\u003ccode\u003e` element, but I’ve omitted them above because they aren’t part of the inline_highlight public API.)\n\n## Author\n\nThis plugin was created by [Benjamin Esham](https://esham.io).\n\nThis project is [hosted on GitHub](https://github.com/bdesham/inline_highlight). Please feel free to submit pull requests.\n\n## Version history\n\nThe version numbers of this project conform to [Semantic Versioning 2.0](http://semver.org/).\n\n* 3.0.1 (2020-08-19): The plugin now works with Jekyll 4 (in addition to Jekyll 3).\n* 3.0 (2015-11-03): The plugin now works with Jekyll 3.0.x; it no longer works with Jekyll 2.x.\n* 2.0 (2015-02-07): Placing a line break before the `ihighlight` tag would incorrectly start a new paragraph. Thanks to [iosdev-republicofapps](https://github.com/iosdev-republicofapps) for the fix!\n* 1.0 (2014-12-14): Initial release.\n\n## License\n\nThis script is based on code from Jekyll, which is released under the MIT license as described in [the project’s LICENSE file](https://github.com/jekyll/jekyll/blob/master/LICENSE).\n\nThe original portions of this plugin are hereby released into the public domain. To the extent possible, the author places no restrictions upon their use, modification, or redistribution.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbdesham%2Finline_highlight","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbdesham%2Finline_highlight","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbdesham%2Finline_highlight/lists"}