mirror of
https://github.com/TiddlyWiki/TiddlyWiki5.git
synced 2026-04-25 05:54:35 +00:00
Improve plugin readmes
Now every plugin has a short, introductory readme tiddler that is shown in the online plugin library.
This commit is contained in:
@@ -2,5 +2,6 @@
|
||||
"title": "$:/plugins/tiddlywiki/highlight",
|
||||
"description": "Highlight.js: syntax highlighting",
|
||||
"author": "JoaoBolila",
|
||||
"list": "license"
|
||||
"core-version": ">=5.0.0",
|
||||
"list": "readme usage license"
|
||||
}
|
||||
|
||||
5
plugins/tiddlywiki/highlight/readme.tid
Normal file
5
plugins/tiddlywiki/highlight/readme.tid
Normal file
@@ -0,0 +1,5 @@
|
||||
title: $:/plugins/tiddlywiki/highlight/readme
|
||||
|
||||
This plugin provides syntax highlighting of code blocks using [[highlight.js|https://github.com/isagalaev/highlight.js]] from Ivan Sagalaev.
|
||||
|
||||
[[Source code|https://github.com/Jermolene/TiddlyWiki5/blob/master/plugins/tiddlywiki/highlight]]
|
||||
16
plugins/tiddlywiki/highlight/usage.tid
Normal file
16
plugins/tiddlywiki/highlight/usage.tid
Normal file
@@ -0,0 +1,16 @@
|
||||
title: $:/plugins/tiddlywiki/highlight/usage
|
||||
|
||||
! Usage
|
||||
|
||||
Fenced code blocks can have a language specifier added to trigger highlighting in a specific language. Otherwise heuristics are used to detect the language.
|
||||
|
||||
```
|
||||
```js
|
||||
var a = b + c; // Highlighted as JavaScript
|
||||
```
|
||||
```
|
||||
! Adding Themes
|
||||
|
||||
You can add themes from highlight.js by copying the CSS to a new tiddler and tagging it with [[$:/tags/Stylesheet]]. The available themes can be found on GitHub:
|
||||
|
||||
https://github.com/isagalaev/highlight.js/tree/master/src/styles
|
||||
Reference in New Issue
Block a user