Skip to content

Commit 006ca60

Browse files
committed
- Add stuff to README.md
1 parent 1c78942 commit 006ca60

5 files changed

Lines changed: 22 additions & 4 deletions

File tree

‎README.md‎

Lines changed: 16 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,10 @@
11
# CodeBlocks++
22
[CodeBlocks++](https://github.com/CommandJoo/CodeBlocksPlusPlus) is a plugin for Obsidian that allows you to define custom Codeblocks
33
which can be highlighted and executed. It allows for general customization aswell as individual styling using metadata properties.
4+
5+
> Note that this plugin will execute programs defined by the User.
6+
You should never run any programs or code that you dont understand or dont trust the author completely.
7+
48
![img.png](images/example.png)
59

610
## Installation
@@ -11,9 +15,11 @@ git clone https://github.com/CommandJoo/CodeBlocksPlusPlus.git
1115
```
1216
Go into your Obsidian Settings / Community Plugins and enable it.
1317

18+
Or install it directly via the Obsidian Community Plugins portal
19+
1420
## Usage
1521
### Codeblock Syntax
16-
To use executable Codeblocks define a Codeblock with the language "cbpp".
22+
To use executable Codeblocks define a Codeblock with the language "cbpp". This language should ideally be registered in your settings under [Registered Languages](#registering-languages)
1723

1824
Settings for a specific Codeblock can be specified by the "@cbpp:" prefix.
1925
~~~markdown
@@ -53,6 +59,15 @@ This allows for a much cleaner syntax.
5359
In order to execute Codeblocks you need to register languages with an interpreter
5460
in the Settings tab of this Plugin
5561

62+
| Field | Value | Description |
63+
|------------|-----------------------|-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
64+
| Name | \<string> | The default name of the language, to be primarily used for the lang [Codeblock property](#list-of-codeblock-settings) |
65+
| Aliases | \<string> | A comma seperated string of alternative names to specify the language for a Codeblock |
66+
| Executable | \<string> & \<string> | The first field specifies the path to the executable binary file of the interpreter you want to use to run this language. The second one specifies any additional flags or arguments you want to pass to the executable |
67+
| Preamble | \<multiline string> | Lets you specify code you want to run before each Codeblock written in that language. For example things like imports or constants |
68+
69+
Languages can also always be deleted if they aren't provided by the plugin by default.
70+
5671
## Credits
5772
- [Shiki](https://github.com/shikijs/shiki), used for Syntax highlighting in rendered Codeblocks
5873

‎TODO‎

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,4 @@
11
Add Options for
22
- Codeblock size (always full size, or scroll at threshold)
3+
4+
Generalize Shiki Settings to Codeblock Styling

‎manifest.json‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"id": "codeblocks-plus-plus",
33
"name": "CodeBlocks++",
4-
"version": "1.2.0",
4+
"version": "1.2.1",
55
"minAppVersion": "1.13.0",
66
"description": "Enhances Codeblocks by letting them execute the code.",
77
"author": "Johannes Hans",

‎package.json‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "codeblocks-plus-plus",
3-
"version": "1.2.0",
3+
"version": "1.2.1",
44
"description": "This is a sample plugin for Obsidian (https://obsidian.md)",
55
"main": "CBPP.js",
66
"type": "module",

‎versions.json‎

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,5 +9,6 @@
99
"1.1.2": "1.13.0",
1010
"1.1.3": "1.13.0",
1111
"1.1.4": "1.13.0",
12-
"1.2.0": "1.13.0"
12+
"1.2.0": "1.13.0",
13+
"1.2.1": "1.13.0"
1314
}

0 commit comments

Comments
 (0)