https://github.com/highlightjs/highlightjs-sentinel
HashiCorp's Sentinel policy-as-code language
https://github.com/highlightjs/highlightjs-sentinel
Last synced: 4 months ago
JSON representation
HashiCorp's Sentinel policy-as-code language
- Host: GitHub
- URL: https://github.com/highlightjs/highlightjs-sentinel
- Owner: highlightjs
- License: other
- Created: 2019-11-20T21:24:58.000Z (over 5 years ago)
- Default Branch: master
- Last Pushed: 2022-02-25T21:22:09.000Z (over 3 years ago)
- Last Synced: 2024-12-28T10:47:49.835Z (6 months ago)
- Language: JavaScript
- Size: 7.81 KB
- Stars: 0
- Watchers: 6
- Forks: 2
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# `sentinel` - a language definition for highlight.js
This is a [highlight.js](https://highlightjs.org/) language definition for
[Sentinel](https://docs.hashicorp.com/sentinel/), HashiCorp's policy as code
language.For more about highlight.js, see https://highlightjs.org/
For more about Sentinel, see https://docs.hashicorp.com/sentinel/.
### Usage
Simply include the `highlight.js` script package in your webpage or node app,
load up this module and apply it to `hljs`.If you're not using a build system and just want to embed this in your webpage:
```html
hljs.registerLanguage('sentinel', hljsDefineSentinel);
hljs.highlightAll();```
If you're using webpack / rollup / browserify / node:
```javascript
var hljs = require('highlightjs');
var hljsDefineSentinel = require('highlightjs-sentinel');hljsDefineSentinel(hljs);
hljs.highlightAll();
```### Advanced
This is a pretty simple package, the only thing you might want to do differently
is name the language something other than `sentinel`. If you want to do this,
simply `import { definer } from 'highlightjs-sentinel';` and use it like:
`hljs.registerLanguage('othername', definer);`.### Author
Chris Marchesi
Based on the Go highlight.js language definition, by Stephan Kountso
and Evgeny Stepanischev .### Maintainer
Chris Marchesi