This project is currently in need of a maintainer. If you're interested please open an issue in the main Highlight.js project.
-
Three files are required.
-
A style
.cssfile. -
The
highlight.pack.jsfile. -
The
terraform.jsfile located in this repository.
-
-
Clone this repository to your localhost using the following command:
git clone git@github.com:highlightjs/highlightjs-terraform.git. -
Head to the Highlightjs download page.
-
Under the heading Custom package, Click download.
-
Extract the downloaded
.zipfile. -
In the extracted
.zipfile, choose a.cssstyle in./stylesand copy it to your project. -
In the extracted
.zipfile, copy thehighlight.pack.jsfile to your project. -
From this repo, copy the
terraform.jsfile to your project. -
Add the following lines to your website's
<head>tag:<link rel="stylesheet" href="/path/to/style.css"> <script type="text/javascript" src="/path/to/highlight.pack.js"></script> <script type="text/javascript" src="/path/to/terraform.js"></script> <script type="text/javascript"> hljs.registerLanguage('terraform', window.hljsDefineTerraform); hljs.highlightAll(); </script>
That's it! Write some terraform code within <pre><code class="tf">Some terraform code here!</code></pre> and behold, your coloured terraform code.