{"id":27089115,"url":"https://github.com/fisothemes/highlightjs-iecst","last_synced_at":"2025-04-06T06:48:38.556Z","repository":{"id":283436623,"uuid":"951746615","full_name":"fisothemes/highlightjs-iecst","owner":"fisothemes","description":"This repository provides a Highlight.js language definition for TwinCAT Structured Text (ST), allowing for proper syntax highlighting in mdBook, web applications, and documentation.","archived":false,"fork":false,"pushed_at":"2025-03-23T04:17:00.000Z","size":1148,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-03-23T05:18:40.658Z","etag":null,"topics":["beckhoff","codesys","documentation","highlightjs","iec-st","iec61131-3","plc","syntax-highlighting","twincat"],"latest_commit_sha":null,"homepage":"https://fisothemes.github.io/highlightjs-iecst/","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/fisothemes.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}},"created_at":"2025-03-20T07:15:51.000Z","updated_at":"2025-03-23T04:08:53.000Z","dependencies_parsed_at":"2025-03-20T08:36:57.098Z","dependency_job_id":"e63f0b90-abad-403f-85bc-71f7b1739e51","html_url":"https://github.com/fisothemes/highlightjs-iecst","commit_stats":null,"previous_names":["fisothemes/highlightjs-twincat-st","fisothemes/highlightjs-iecst"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fisothemes%2Fhighlightjs-iecst","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fisothemes%2Fhighlightjs-iecst/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fisothemes%2Fhighlightjs-iecst/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fisothemes%2Fhighlightjs-iecst/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/fisothemes","download_url":"https://codeload.github.com/fisothemes/highlightjs-iecst/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247445651,"owners_count":20939956,"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":["beckhoff","codesys","documentation","highlightjs","iec-st","iec61131-3","plc","syntax-highlighting","twincat"],"created_at":"2025-04-06T06:48:37.568Z","updated_at":"2025-04-06T06:48:38.541Z","avatar_url":"https://github.com/fisothemes.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# IEC-ST (IEC 61131-3 Structured Text) – Language Grammar for [Highlight.js](https://highlightjs.org/)\n\nThis repository provides a third-party language definition for **IEC 61131-3 Structured Text (ST)** for use with [Highlight.js](https://highlightjs.org/).\n\nIEC 61131-3 Structured Text is a high-level programming language designed for industrial automation. It resembles Pascal, supports complex control logic, and is widely used in PLC programming across industries such as manufacturing, energy, and process control.\n\n## Example Page\n\nSee an example implementation here: **[fisothemes/highlightjs-iecst](https://fisothemes.github.io/highlightjs-iecst/)**\n\n## Usage\n\n### mdBook Integration\n\n1. In your `book.toml` root directory, create a `theme/` folder.\n1. Copy `dist/highlight.min.js` into it, and rename it to `highlight.js`.\n1. Your folder structure should look like:\n\n    ```mathematica\n    my-book/\n    ├── book/\n    ├── theme/\n    │   └── highlight.js\n    └── book.toml\n    ```\n1. In your Markdown code blocks, use the language identifier `iecst`:\n\n    ```markdown\n        ```iecst\n        PROGRAM MAIN\n        VAR\n          fSpeed : LREAL := 0.0;\n        END_VAR\n        fSpeed := 100.5;\n        END_PROGRAM\n        ```\n    ```\n\n### Browser Integration\n\nTo use the grammar in a standalone HTML page:\n\n```html\n\u003cscript src=\"path/to/highlight.min.js\"\u003e\u003c/script\u003e\n\u003cscript src=\"path/to/iecst.min.js\"\u003e\u003c/script\u003e\n\u003cscript\u003e\n  hljs.registerLanguage(\"iecst\", window.hljsDefineIecst);\n  hljs.highlightAll();\n\u003c/script\u003e\n```\n\nThen use:\n\n```html\n\u003cpre\u003e\u003ccode class=\"language-iecst\"\u003e\nPROGRAM MAIN\nVAR\n  fSpeed : LREAL := 0.0;\nEND_VAR\nfSpeed := 100.5;\nEND_PROGRAM\n\u003c/code\u003e\u003c/pre\u003e\n```\n\n\u003e [!IMPORTANT]\n\u003e - `highlight.min.js` is the **Highlight.js core** (v10).\n\u003e - `iecst.min.js` is the **standalone language definition**.\n\u003e - If you use `dist/highlight.min.js` (bundled by this repo), you **do not need to include** `iecst.min.js` separately — it's already embedded.\n\u003e - Use the class name `language-iecst` in `\u003ccode\u003e` blocks to activate the grammar.\n\n## Installation\n\n```bash\ngit clone https://github.com/fisothemes/highlightjs-iecst.git\ncd highlightjs-iecst\nnpm install\n```\n\n## Build\n\nTo build everything:\n\n- `dist/iecst.min.js` — standalone language definition\n- `dist/highlight.min.js` — Highlight.js v10 core with `iecst` bundled\n- `example/mdbook/theme/highlight.js` — copied for use with mdBook\n\nRun:\n\n```bash\nnpm run build\n```\n\nThis uses the local `tools/highlight.js` (v10-compatible), appends your language definition, and minifies the result using `terser`.","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffisothemes%2Fhighlightjs-iecst","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ffisothemes%2Fhighlightjs-iecst","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffisothemes%2Fhighlightjs-iecst/lists"}