Skip to content

eta-dev/highlightjs-eta

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

highlights-eta

Add syntax highlighting to the Eta template engine (EJS will probably work too)

Usage

Browser

Load the module after Highlight.js

<script type="text/javascript" src="/path/to/highlight.min.js"></script>
<script
  type="text/javascript"
  src="/path/to/highlightjs-eta/dist/eta.min.js"
></script>
<script type="text/javascript">
  hljs.initHighlightingOnLoad()
</script>

You can also load from a CDN:

<script
  type="text/javascript"
  src="https://unpkg.com/highlightjs-eta/dist/eta.min.js"
></script>

Node

var hljs = require("highlightjs")
var hljsRobotsTxt = require("highlightjs-robots-txt")

hljs.registerLanguage("robots-txt", hljsRobotsTxt)
hljs.initHighlightingOnLoad()

Contributing

Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.

Please make sure to update tests as appropriate.

License

MIT

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Packages

No packages published