# Inject html only on one page

**URL:** https://meta.discourse.org/t/inject-html-only-on-one-page/409186
**Category:** Development
**Created:** [August 3, 2026, 7:11pm UTC](https://meta.discourse.org/t/inject-html-only-on-one-page/409186 "2026-08-03T19:11:57Z")
**Posts on this page:** 1
**Showing post:** 1

<div class="post-metadata">

### Author: ![Andrew\_Rowe](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/andrew_rowe/32/445877_2.png) [@Andrew\_Rowe](https://meta.discourse.org/u/Andrew_Rowe)
#### Post date: [August 3, 2026, 7:11pm UTC](https://meta.discourse.org/t/inject-html-only-on-one-page/409186/1 "2026-08-03T19:11:58Z")

</div>

I have something like this in my JS tab of my theme:

```plaintext
import { apiInitializer } from "discourse/lib/api";

export default apiInitializer("0.11.1", (api) => { 
    api.renderInOutlet("above-main-container",
        <template>
            <div>
              html stuff
            </div>
        </template>
     );
});

```

I copy pasted that, it works (just an example)

How do I make this render only on the home page or only on the categories page

sorry if this is not a good question

---

_[View the full topic](https://meta.discourse.org/t/inject-html-only-on-one-page/409186)._
