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
- Host: GitHub
- URL: https://github.com/zcuric/vscode-discourse-plugin
- Owner: zcuric
- License: mit
- Created: 2020-04-03T07:21:56.000Z (about 6 years ago)
- Default Branch: master
- Last Pushed: 2020-04-07T13:46:57.000Z (about 6 years ago)
- Last Synced: 2025-03-24T13:37:16.245Z (about 1 year ago)
- Topics: discourse, discourse-theme, vscode, vscode-extension, vscode-language
- Homepage:
- Size: 20.5 KB
- Stars: 9
- Watchers: 1
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE
Awesome Lists containing this project
README
# discourse-plugin-syntax-highlighting
[](https://marketplace.visualstudio.com/items?itemName=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).