{"id":18694510,"url":"https://github.com/roelmagdaleno/wp-syntax-highlighting","last_synced_at":"2026-05-20T05:42:27.027Z","repository":{"id":144088842,"uuid":"582476832","full_name":"roelmagdaleno/wp-syntax-highlighting","owner":"roelmagdaleno","description":"A Gutenberg block that syntax highlights your code powered by Torchlight API.","archived":false,"fork":false,"pushed_at":"2022-12-27T23:19:59.000Z","size":39,"stargazers_count":2,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-05-18T23:33:50.829Z","etag":null,"topics":["gutenberg","php","torchlight","wordpress"],"latest_commit_sha":null,"homepage":"","language":"PHP","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/roelmagdaleno.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,"publiccode":null,"codemeta":null}},"created_at":"2022-12-27T00:46:36.000Z","updated_at":"2024-03-11T22:04:11.000Z","dependencies_parsed_at":null,"dependency_job_id":"63ebd678-1d13-4c95-ae61-778c4c481586","html_url":"https://github.com/roelmagdaleno/wp-syntax-highlighting","commit_stats":null,"previous_names":[],"tags_count":2,"template":false,"template_full_name":null,"purl":"pkg:github/roelmagdaleno/wp-syntax-highlighting","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/roelmagdaleno%2Fwp-syntax-highlighting","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/roelmagdaleno%2Fwp-syntax-highlighting/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/roelmagdaleno%2Fwp-syntax-highlighting/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/roelmagdaleno%2Fwp-syntax-highlighting/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/roelmagdaleno","download_url":"https://codeload.github.com/roelmagdaleno/wp-syntax-highlighting/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/roelmagdaleno%2Fwp-syntax-highlighting/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":266944042,"owners_count":24010481,"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-25T02:00:09.625Z","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":["gutenberg","php","torchlight","wordpress"],"created_at":"2024-11-07T11:11:08.683Z","updated_at":"2026-05-20T05:42:27.002Z","avatar_url":"https://github.com/roelmagdaleno.png","language":"PHP","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Syntax Highlighting powered by Torchlight\n\nThis WordPress plugin provides a Gutenberg block that syntax highlights your code powered by [Torchlight](https://torchlight.dev/).\n\n## Installation\n\nDownload this repository inside the `wp-content/plugins` folder, then access the folder and run the `composer install` command. This will install the required dependencies.\n\nBefore use this plugin you need to create an API Key from Torchlight. If you don't have an account, [register here](https://app.torchlight.dev/register).\n\nAfter you obtain the API Token, copy and paste it in the plugin's settings page: `Settings \u003e Syntax Highlighting`.\n\n## Usage\n\nIn your Gutenberg editor, insert a code block and paste your code. In the sidebar you'll see the Syntax Highlighting options:\n\n### Gutenberg Options\n\n- Language. The code block programming language.\n- Theme. The code block theme.\n- Line numbers. Whether to show line numbers in the code block.\n- Line number starts at. Start the line numbers at a specific number.\n- Diff indicators. Whether to show the diff indicators in the code block.\n\n## Server Side Rendering\n\nThe Gutenberg block won't use any JavaScript to syntax highlight your code. It will highlight your code using the [Torchlight API](https://torchlight.dev/) in the backend, and send the response to your frontend.\n\n## Cache\n\nWhen you syntax highlight your code for the first time, it will run a request to Torchlight API and the response will be stored in a WordPress transient.\n\nThe transient key contains a `md5` hash value constructed from the code block attributes and the content (or code).\n\nA transient key looks like this:\n\n```text\n_transient_syntax_highlighting_55116e908cd06545a7e4bef7f1ce2d2f\t\n```\n\nThe transient expiration is one month, that means when it expires the code block needs to run the API request again.\n\n## Settings\n\nThe plugin accepts 2 settings:\n\n- API Token. Your Torchlight API Token.\n- Theme. The default code theme. You can change the theme later for a specific block.\n\n## Themes\n\nSee the supported themes in the [documentation](https://torchlight.dev/docs/themes).\n\n## Languages\n\nSee the supported languages in the [documentation](https://torchlight.dev/docs/languages).\n\n## Credits\n\nWordPress Plugin written and maintained by [Roel Magdaleno](https://roelmagdaleno.com).\n\nPowered by [Torchlight](https://torchlight.dev/), built with love and care by [Aaron](https://twitter.com/aarondfrancis).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Froelmagdaleno%2Fwp-syntax-highlighting","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Froelmagdaleno%2Fwp-syntax-highlighting","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Froelmagdaleno%2Fwp-syntax-highlighting/lists"}