https://github.com/marianpekar/highlightjs-odinlang
Highlight.js syntax definition for Odin programming language
https://github.com/marianpekar/highlightjs-odinlang
highlight-js highlightjs npm-package odin odin-lang syntax syntax-highlighting
Last synced: 3 months ago
JSON representation
Highlight.js syntax definition for Odin programming language
- Host: GitHub
- URL: https://github.com/marianpekar/highlightjs-odinlang
- Owner: marianpekar
- License: mit
- Created: 2025-01-23T01:19:57.000Z (5 months ago)
- Default Branch: main
- Last Pushed: 2025-01-27T21:17:24.000Z (5 months ago)
- Last Synced: 2025-04-13T12:13:13.207Z (3 months ago)
- Topics: highlight-js, highlightjs, npm-package, odin, odin-lang, syntax, syntax-highlighting
- Language: JavaScript
- Homepage: https://www.npmjs.com/package/highlightjs-odinlang
- Size: 27.3 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# [Highlight.js](https://highlightjs.org/) syntax definition for [Odin](https://odin-lang.com/) programming language
## Usage
Simply include the Highlight.js library in your webpage or Node app, then load this module.
### Static website or simple usage
Simply load the module after loading Highlight.js. You'll use the minified version found in the `dist` directory. This module is just a CDN build of the language, so it will register itself as the Javascript is loaded.
```html
hljs.highlightAll();
```
### Using directly from the [UNPKG](https://unpkg.com) CDN
#### Common JS
```html
```
#### ES6 Modules
```html
import hljs from 'https://unpkg.com/@highlightjs/[email protected]/es/highlight.min.js';
import hljsOdin from 'https://unpkg.com/[email protected]/dist/odin.es.min.js';
hljs.registerLanguage('odin', hljsOdin);```
### With Node or another build system
If you're using Node / Webpack / Rollup / Browserify, etc, simply require the language module, then register it with Highlight.js.
```javascript
var hljs = require('highlight.js');
var hljsOdin = require('highlightjs-odinlang');// or with ES modules
import hljs from 'highlight.js';
import hljsOdin from "highlightjs-odinlang"hljs.registerLanguage("odin", hljsOdin);
hljs.highlightAll();
```