{"id":29874286,"url":"https://github.com/huytd/highlightjs-focus","last_synced_at":"2025-07-31T00:12:01.445Z","repository":{"id":57264163,"uuid":"455716941","full_name":"huytd/highlightjs-focus","owner":"huytd","description":"Line focus plugin for Highlight.js","archived":false,"fork":false,"pushed_at":"2023-03-03T17:01:46.000Z","size":347,"stargazers_count":10,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2024-11-14T21:13:54.597Z","etag":null,"topics":["highlightjs","plugin"],"latest_commit_sha":null,"homepage":"","language":"TypeScript","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/huytd.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,"governance":null,"roadmap":null,"authors":null,"dei":null}},"created_at":"2022-02-04T22:38:07.000Z","updated_at":"2023-06-19T10:35:51.000Z","dependencies_parsed_at":"2024-01-31T12:12:01.601Z","dependency_job_id":null,"html_url":"https://github.com/huytd/highlightjs-focus","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/huytd/highlightjs-focus","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/huytd%2Fhighlightjs-focus","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/huytd%2Fhighlightjs-focus/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/huytd%2Fhighlightjs-focus/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/huytd%2Fhighlightjs-focus/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/huytd","download_url":"https://codeload.github.com/huytd/highlightjs-focus/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/huytd%2Fhighlightjs-focus/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":267963424,"owners_count":24172881,"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","status":"online","status_checked_at":"2025-07-30T02:00:09.044Z","response_time":70,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"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":["highlightjs","plugin"],"created_at":"2025-07-31T00:11:53.332Z","updated_at":"2025-07-31T00:12:01.435Z","avatar_url":"https://github.com/huytd.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Highlight.js Focus Plugin\n\nThis plugin provide the ability to highlight a focused line when using Highlight.js\n\n\u003cimg width=\"622\" alt=\"image\" src=\"https://user-images.githubusercontent.com/613943/152668852-63207574-93da-46d2-8a0d-f91b20985a44.png\"\u003e\n\nTo use, first, register this plugin with `addPlugin` command:\n\n```js\nhljs.addPlugin(new LineFocusPlugin({\n    focusedStyle: {\n        borderLeft: \"2px solid #78e08f55\",\n        background: \"#78e08f05\",\n        padding: \"2px\",\n        paddingLeft: \"10px\",\n    },\n    unfocusedStyle: {\n        borderLeft: \"2px solid transparent\",\n        paddingLeft: \"10px\",\n        opacity: \"0.5\",\n        filter: \"grayscale(1)\"\n    }\n}));\n```\n\nThen in your code, or in your markdown source, add the language with the format:\n\n```\n\u003clanguage\u003e@focus=\u003clines\u003e\n```\n\nFor example:\n\n```\njs@focus=5,8:12,14\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhuytd%2Fhighlightjs-focus","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fhuytd%2Fhighlightjs-focus","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhuytd%2Fhighlightjs-focus/lists"}