# .gjs syntax highlighting on Discourse 🎉

**URL:** https://discuss.emberjs.com/t/gjs-syntax-highlighting-on-discourse/20312
**Category:** Meta
**Created:** [November 10, 2023, 7:44pm UTC](https://discuss.emberjs.com/t/gjs-syntax-highlighting-on-discourse/20312 "2023-11-10T19:44:10Z")
**Posts on this page:** 2
**Page:** 1

<div class="post-metadata">

### Author: ![davidtaylorhq](https://sea1.discourse-cdn.com/flex019/user_avatar/discuss.emberjs.com/davidtaylorhq/32/17110_2.png) [@davidtaylorhq](https://discuss.emberjs.com/u/davidtaylorhq)
#### Post date: [November 10, 2023, 7:44pm UTC](https://discuss.emberjs.com/t/gjs-syntax-highlighting-on-discourse/20312/1 "2023-11-10T19:44:10Z")

</div>

I’ve just installed a new Discourse [theme component](https://github.com/discourse/discourse-highlightjs-glimmer) here which enables syntax highlighting for gjs (template-tag) files. To use it, tag your code fences with `gjs` like this:

````
```gjs
/* Code goes here */
```

````

For example:

```gjs
import WeatherSummary from './weather-summary.js';

const Greeting = <template>
  <p>Hello, {{@name}}!</p>
</template>;

function isBirthday(dateOfBirth) {
  const now = new Date();
  return (
    dateOfBirth.getDate() === now.getDate() &&
    dateOfBirth.getMonth() === now.getMonth()
  );
}

<template>
  <div>
    <Greeting @name="Chris" />
    {{#if (isBirthday @user.dateOfBirth)}}
      <Celebration type='birthday' />
    {{/if}}
    <WeatherSummary />
  </div>
</template>

```

Thanks to @NullVoxPopuli for the [highlightjs-glimmer package](https://github.com/NullVoxPopuli/highlightjs-glimmer) which we’re leaning on for this 🤩

---

<div class="post-metadata">

### Author: ![NullVoxPopuli](https://sea1.discourse-cdn.com/flex019/user_avatar/discuss.emberjs.com/nullvoxpopuli/32/18691_2.png) [@NullVoxPopuli](https://discuss.emberjs.com/u/NullVoxPopuli)
#### Post date: [November 10, 2023, 8:36pm UTC](https://discuss.emberjs.com/t/gjs-syntax-highlighting-on-discourse/20312/2 "2023-11-10T20:36:30Z")

</div>

yay!!! 🎉

I have some bugfixes to land in there that I’ve found while making a documentation system over at [https://ember-primitives.pages.dev/](https://ember-primitives.pages.dev/) 😅
