Skip to content
This repository has been archived by the owner on Nov 26, 2024. It is now read-only.

NinjasCL-archive/highlightjs-odin

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Odin plugin for Highlight.js

This grammar was Extracted from Odin Website

Odin is a general-purpose programming language with distinct typing built for high performance, modern systems and data-oriented programming.

Odin is the C alternative for the Joy of Programming.

package main 

import "core:fmt"

main :: proc() {
	fmt.println("Hellope!")
}

Code minified with: https://www.toptal.com/developers/javascript-minifier

Installing Odin

Learning Odin

Description

odin - a language grammar for highlightjs

Static website or simple usage

<script type="text/javascript" src="/path/to/highlight.min.js"></script>
<script type="text/javascript" charset="UTF-8"
  src="/path/to/highlightjs-odin/dist/odin.min.js"></script>
<script type="text/javascript">
  hljs.highlightAll();
</script>

Using directly from the UNPKG CDN

<script type="text/javascript"
  src="https://unpkg.com/[email protected]/dist/odin.min.js"></script>

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.

var hljs = require('highlightjs');
var hljsodin = require('highlightjs-odin');

hljs.registerLanguage("odin", hljsodin);
hljs.highlightAll();