{"id":18718535,"url":"https://github.com/highlightjs/highlightjs-mde-languages","last_synced_at":"2025-10-24T14:47:20.737Z","repository":{"id":44741029,"uuid":"232348664","full_name":"highlightjs/highlightjs-mde-languages","owner":"highlightjs","description":"MDE language grammars for Highlight.js","archived":false,"fork":false,"pushed_at":"2023-05-07T16:55:17.000Z","size":189,"stargazers_count":8,"open_issues_count":7,"forks_count":3,"subscribers_count":6,"default_branch":"master","last_synced_at":"2024-03-25T19:59:39.139Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"bsd-3-clause","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/highlightjs.png","metadata":{"files":{"readme":"README.adoc","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}},"created_at":"2020-01-07T15:00:35.000Z","updated_at":"2023-03-03T08:52:23.000Z","dependencies_parsed_at":"2024-01-30T00:02:48.589Z","dependency_job_id":null,"html_url":"https://github.com/highlightjs/highlightjs-mde-languages","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/highlightjs%2Fhighlightjs-mde-languages","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/highlightjs%2Fhighlightjs-mde-languages/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/highlightjs%2Fhighlightjs-mde-languages/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/highlightjs%2Fhighlightjs-mde-languages/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/highlightjs","download_url":"https://codeload.github.com/highlightjs/highlightjs-mde-languages/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":223519436,"owners_count":17158875,"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-11-07T13:21:50.010Z","updated_at":"2025-10-24T14:47:20.662Z","avatar_url":"https://github.com/highlightjs.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"= Highlight.js Grammars for MDE languages\n\n== Provided grammars\n\n* https://www.eclipse.org/atl/[ATL] - Atlanmod Transformation Language\n* https://www.omg.org/spec/OCL/[OCL] - Object Constraint Language\n* https://wiki.eclipse.org/Xcore[Xcore] - Extended concrete syntax for https://www.eclipse.org/modeling/emf/[Ecore]\n\n== Download\n\nThe _minified_ and _browserified_ pakage is available https://github.com/highlightjs/highlightjs-mde-languages/releases[here].\n\n== Usage \n\n=== Web page or Node.js\n\nInclude the Highlight.js library in your webpage or Node app, then load this module.\n\n[source,html]\n----\n\u003cscript type=\"text/javascript\" src=\"/path/to/highlight.min.js\"\u003e\u003c/script\u003e\n\u003cscript type=\"text/javascript\" charset=\"UTF-8\"\n  src=\"/path/to/highlightjs-mde-languages/dist/mde-languages.min.js\"\u003e\u003c/script\u003e\n\u003cscript type=\"text/javascript\"\u003e\n  hljs.highlightAll();\n\u003c/script\u003e\n----\n\n=== Reveal.js\n\nUsing link:https://asciidoctor.org/docs/asciidoctor-revealjs/[Asciidoctor Reveal.js]\n\nFirst, set the `revealjs_plugins` attribute in the beginning of your Asciidoc document:\n\n[source,asciidoc]\n----\n:revealjs_plugins: revealjs-plugins.js\n----\n\nSecond, create the `revealjs-plugins.js` file, next to your Asciidoc document (you can specify a different path, of you want):\n\n[source,js]\n----\n{src: 'mde-languages.min.js', async:true, callback: function() { hljs.initHighlightingOnLoad(); }}\n----\n\n*Asciidoctor Reveal.js* will add this line to the generated Reveal.js configuration,\nallowing it to load the highlighjs-mde grammars.\n\nFinally, compile your code and take a look at the generated html file.\nIn the bottom, you should find the following lines:\n\n[source,js]\n----\n  // Optional libraries used to extend on reveal.js\n  dependencies: [\n      { src: 'reveal.js/lib/js/classList.js', condition: function() { return !document.body.classList; } },\n      { src: 'reveal.js/plugin/highlight/highlight.js', async: true, callback: function() { hljs.initHighlightingOnLoad(); } },\n      { src: 'reveal.js/plugin/zoom-js/zoom.js', async: true },\n      { src: 'reveal.js/plugin/notes/notes.js', async: true },\n      {src: 'mde-languages.min.js', async:true, callback: function() { hljs.initHighlightingOnLoad(); }}\n  ],\n----\n\nAs you see, *Asciidoctor Reveal.js* just adds the contents of the `revealjs-plugins.js`\nto Reveal.js list of dependencies.\n\n== Examples\n\nI use these grammars in the slides of my Model-driven Engineering course:\n\n* https://naomod.univ-nantes.io/mde/slides/#/[MDE] slides (https://gitlab.univ-nantes.fr/naomod/mde/slides[sources]).\n* https://sunye.github.io/ocl/#/[OCL] slides (https://github.com/sunye/ocl[sources]).\n\n== Local build\n\n. Use *npm* to install dependencies: `npm install`\n. Run the build script: `npm run build`\n. The packaged file (`mde-languages.min.js`) is placed in the build folder.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhighlightjs%2Fhighlightjs-mde-languages","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fhighlightjs%2Fhighlightjs-mde-languages","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhighlightjs%2Fhighlightjs-mde-languages/lists"}