An open API service indexing awesome lists of open source software.

https://github.com/zcuric/vscode-discourse-plugin

VSCode extension for discourse plugin syntax highlighting
https://github.com/zcuric/vscode-discourse-plugin

discourse discourse-theme vscode vscode-extension vscode-language

Last synced: 8 months ago
JSON representation

VSCode extension for discourse plugin syntax highlighting

Awesome Lists containing this project

README

          

# discourse-plugin-syntax-highlighting

[![vs-marketplace
version](https://badgen.net/vs-marketplace/v/zcuric.vscode-discourse-plugin)](https://marketplace.visualstudio.com/items?itemName=zcuric.vscode-discourse-plugin)
[![github license](https://badgen.net/github/license/zcuric/vscode-discourse-plugin)](https://github.com/zcuric/vscode-discourse-plugin/blob/master/LICENSE)

Syntax highlighting support for HTML `` tags using `type="text/discourse-plugin"` which is actually javascript.

For example

```html
<script type="text/discourse-plugin">
const settings = Discourse.SiteSettings,
taggingEnabled = settings.tagging_enabled,
title = settings.title;

if (taggingEnabled) {
console.log("Yay! "+title+" has tagging enabled!")
} else {
console.log("Ohh nooos! "+title+"Does not allow tagging.")
}

```

More on discourse theme plugin development [here](https://meta.discourse.org/t/developer-s-guide-to-discourse-themes/93648).