{"id":22050435,"url":"https://github.com/chuckfairy/cornerstone-code-blocks","last_synced_at":"2026-02-21T10:32:16.691Z","repository":{"id":252312475,"uuid":"787036762","full_name":"chuckfairy/cornerstone-code-blocks","owner":"chuckfairy","description":"Using Highlight.js create a new Cornerstone element that outputs a code block","archived":false,"fork":false,"pushed_at":"2026-01-29T13:59:15.000Z","size":231,"stargazers_count":2,"open_issues_count":0,"forks_count":1,"subscribers_count":1,"default_branch":"master","last_synced_at":"2026-01-30T03:38:45.599Z","etag":null,"topics":["cornerstone","highlightjs","pro","syntax-highlighting","wordpress","x"],"latest_commit_sha":null,"homepage":"","language":"PHP","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/chuckfairy.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,"zenodo":null}},"created_at":"2024-04-15T19:12:02.000Z","updated_at":"2026-01-29T13:57:20.000Z","dependencies_parsed_at":"2025-01-14T17:49:07.040Z","dependency_job_id":"02cbda93-64cc-44be-bf89-8f073456893c","html_url":"https://github.com/chuckfairy/cornerstone-code-blocks","commit_stats":null,"previous_names":["chuckfairy/cornerstone-code-blocks"],"tags_count":4,"template":false,"template_full_name":null,"purl":"pkg:github/chuckfairy/cornerstone-code-blocks","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/chuckfairy%2Fcornerstone-code-blocks","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/chuckfairy%2Fcornerstone-code-blocks/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/chuckfairy%2Fcornerstone-code-blocks/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/chuckfairy%2Fcornerstone-code-blocks/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/chuckfairy","download_url":"https://codeload.github.com/chuckfairy/cornerstone-code-blocks/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/chuckfairy%2Fcornerstone-code-blocks/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29679049,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-21T09:33:50.764Z","status":"ssl_error","status_checked_at":"2026-02-21T09:33:19.949Z","response_time":107,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"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":["cornerstone","highlightjs","pro","syntax-highlighting","wordpress","x"],"created_at":"2024-11-30T14:23:25.468Z","updated_at":"2026-02-21T10:32:16.674Z","avatar_url":"https://github.com/chuckfairy.png","language":"PHP","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Cornerstone Code Blocks\n\nUsing [Highlight.js](https://github.com/highlightjs/highlight.js) create a new [Themeco Cornerstone](https://theme.co/pro) element that outputs a code block.\n\n![Main Element](https://raw.githubusercontent.com/chuckfairy/cornerstone-code-blocks/master/screenshots/main_element.png)\n\n![Code Area Prefab](https://raw.githubusercontent.com/chuckfairy/cornerstone-code-blocks/master/screenshots/code_area_prefab.png)\n\n\n## Features\n\n- Cornerstone native controls including loopers, conditions, styles, custom attributes, and custom CSS\n- Sample Prefab with copy code button\n- Over 200 colorschemes\n- Support for over 150 languages and file types\n- Will not output any CSS or JS to your page if it is not being used\n\n\n## Requirements\n\n- [WordPress](https://wordpress.com)\n- [Themeco X / Cornerstone / Pro](https://theme.co), works best on Cornerstone 7.5.0+\n\n\n## Parameters\n\nYou can setup a Dynamic select box with `dynamic:code_blocks_languages` for the languages and `dynamic:code_blocks_color_schemes` for the color schemes.\n\n```json\n{\n  \"language\": {\n    \"type\": \"select\",\n    \"initial\": \"javascript\",\n    \"options\": \"dynamic:code_blocks_languages\"\n  },\n  \"colorScheme\": {\n    \"type\": \"select\",\n    \"initial\": \"tomorrow-night-bright\",\n    \"options\": \"dynamic:code_blocks_color_schemes\"\n  }\n}\n```\n\n## Filters\n\n### Changing the Default values\n\nThe filters in place are the following as well as their default values.\n\n```php\n// Defaults\n$language = apply_filters('cs_code_blocks_default_language', 'javascript');\n$tabSize = apply_filters('cs_code_blocks_default_tab_size', 2);\n$colorScheme = apply_filters('cs_code_blocks_default_tab_size', 'tomorrow-night-bright');\n```\n\n## Building\n\nRequires\n\n- `bash`\n- `npm i -g esbuild`\n- `npm i -g node-sass`\n\nBuilding\n\n```sh\nnpm run build;\n\n# Or individually\nnpm run build-css;\nnpm run build-js;\nnpm run build-languages;\nnpm run build-plugin;\n\n# Scripts are also in ./bin/\n```\n\n## Developing Cornerstone Elements\n\nWhen editing TSS, Cornerstone will cache the output of styles. To turn off this feature, tap into the following filter.\n\n```php\nadd_filter('cs_disable_style_cache', '__return_true');\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fchuckfairy%2Fcornerstone-code-blocks","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fchuckfairy%2Fcornerstone-code-blocks","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fchuckfairy%2Fcornerstone-code-blocks/lists"}