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
.css
file. -
The
highlight.pack.js
file. -
The
terraform.js
file 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
.zip
file. -
In the extracted
.zip
file, choose a.css
style in./styles
and copy it to your project. -
In the extracted
.zip
file, copy thehighlight.pack.js
file to your project. -
From this repo, copy the
terraform.js
file 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.