An open API service indexing awesome lists of open source software.

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

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();
```