Ecosyste.ms: Awesome

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

Awesome Lists | Featured Topics | Projects

https://github.com/highlightjs/highlightjs-robots-txt

robots.txt - a language grammar for highlight.js
https://github.com/highlightjs/highlightjs-robots-txt

highlightjs highlightjs-syntax

Last synced: about 2 months ago
JSON representation

robots.txt - a language grammar for highlight.js

Awesome Lists containing this project

README

        

# robots.txt - a language grammar for highlight.js

![version](https://badgen.net/npm/v/highlightjs-robots-txt) ![license](https://badgen.net/badge/license/MIT/blue)
![install size](https://badgen.net/packagephobia/install/highlightjs-robots-txt) ![minified size](https://badgen.net/bundlephobia/min/highlightjs-robots-txt)

## 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 CDN

```html

```

- More info:

### 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 hljsRobotsTxt = require('highlightjs-robots-txt');

hljs.registerLanguage("robots-txt", hljsRobotsTxt);
hljs.highlightAll();
```

## License

Highlight.js is released under the MIT License. See [LICENSE][1] file
for details.

### Author

Thomas LÉVEIL

### Maintainer

Josh Goebel

## Links

- The official site for the Highlight.js library is .
- The Highlight.js GitHub project:
- Learn more about robots.txt:

[1]: https://github.com/highlightjs/highlightjs-robots-txt/blob/master/LICENSE