# Discourse OneCompiler Code Runner

**URL:** https://meta.discourse.org/t/discourse-onecompiler-code-runner/395478
**Category:** Theme component
**Tags:** code
**Created:** [February 8, 2026, 6:01pm UTC](https://meta.discourse.org/t/discourse-onecompiler-code-runner/395478 "2026-02-08T18:01:24Z")
**Posts on this page:** 1
**Showing post:** 1

<div class="post-metadata">

### Author: ![NateDhaliwal](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/natedhaliwal/32/313494_2.png) [@NateDhaliwal](https://meta.discourse.org/u/NateDhaliwal)
#### Post date: [February 8, 2026, 6:01pm UTC](https://meta.discourse.org/t/discourse-onecompiler-code-runner/395478/1 "2026-02-08T18:01:24Z")

</div>

| | | |
| --- | --- | --- |
| ℹ | **Summary** | Run codeblock code with a OneCompiler embded |
| 🛠 | **Repository** | [GitHub - NateDhaliwal/Discourse-OneCompiler-Code-Runner · GitHub](https://github.com/NateDhaliwal/Discourse-OneCompiler-Code-Runner) |
| ❓ | **Install Guide** | [How to install a theme or theme component](https://meta.discourse.org/t/how-do-i-install-a-theme-or-theme-component/63682) |
| 📖 | **New to Discourse Themes?** | [Beginner’s guide to using Discourse Themes](https://meta.discourse.org/t/beginners-guide-to-using-discourse-themes/91966) |

Install this theme component

## Description

This component allows you to run code in codeblocks. This may not be applicable to every scenario, though, so not all code can be run.

This uses [OneCompiler](https://onecompiler.com) to embed code editors using iFrames. OneCompiler supports [many languages](https://onecompiler.com/#:~:text=Twitter-,Languages,-Java), but not all are supported in this Theme Component. For example, this does not support CSS frameworks, since only 1 codeblock ↔ 1 file.

## Screenshots

Fullscreen code modal:

 ![image](https://global.discourse-cdn.com/meta/original/4X/2/b/4/2b4063b6422760132e580177ceaf796a293b7ffb.png)

Code editor loaded and run:

 ![image](https://global.discourse-cdn.com/meta/original/4X/5/7/e/57e7de6d9ac59c1fd298e202cd34b5c4ca666334.png)

## Settings

`default_file_name`: The filename of the file in the OneCompiler embedded editor. Defaults to `main`.

`show_language_switcher`: Show the language switcher to change the language of the embedded editor. Defaults to `false`.

`show_create_new_file_button`: Show the + button to add new files of the same language, or to add dependencies to the project, where applicable. Defaults to `true`.

---

_[View the full topic](https://meta.discourse.org/t/discourse-onecompiler-code-runner/395478)._
