forked from MarkBind/markbind
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'MarkBind:master' into master
- Loading branch information
Showing
226 changed files
with
10,010 additions
and
16 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,66 @@ | ||
### Plugin: DataTable | ||
|
||
The [DataTable](https://datatables.net) plugin enhances the functionality of tables in your MarkBind site by integrating the DataTables library. It allows you to add searching and sorting capabilities to your tables with minimal configuration. The necessary CSS and JavaScript files are already included in the project, so no additional CDN or plugin context configuration is required. | ||
|
||
To enable this plugin, simply add `dataTable` to your site's plugins: | ||
|
||
```js {heading="site.json"} | ||
{ | ||
... | ||
"plugins": [ | ||
"dataTable" | ||
] | ||
} | ||
``` | ||
|
||
To create a table with DataTable features, use one of the following syntaxes: | ||
|
||
{{ icon_example }} Sortable Table: | ||
|
||
<include src="codeAndOutput.md" boilerplate > | ||
<variable name="highlightStyle">html</variable> | ||
<variable name="code"> | ||
<d-table sortable> | ||
| Product | Price | Quantity | | ||
|-----------|-------|----------| | ||
| Apple | $0.50 | 100 | | ||
| Banana | $0.75 | 50 | | ||
| Orange | $0.60 | 75 | | ||
</d-table> | ||
</variable> | ||
</include> | ||
|
||
{{ icon_example }} Searchable Table: | ||
|
||
<include src="codeAndOutput.md" boilerplate > | ||
<variable name="highlightStyle">html</variable> | ||
<variable name="code"> | ||
<d-table searchable> | ||
| Book Title | Author | Year Published | | ||
|---------------------------|------------------|----------------| | ||
| To Kill a Mockingbird | Harper Lee | 1960 | | ||
| 1984 | George Orwell | 1949 | | ||
| Pride and Prejudice | Jane Austen | 1813 | | ||
| The Great Gatsby | F. Scott Fitzgerald | 1925 | | ||
</d-table> | ||
</variable> | ||
</include> | ||
|
||
{{ icon_example }} Sortable and Searchable Table: | ||
|
||
<include src="codeAndOutput.md" boilerplate > | ||
<variable name="highlightStyle">html</variable> | ||
<variable name="code"> | ||
<d-table sortable searchable> | ||
| City | Country | Population | | ||
|-------------|-----------|------------| | ||
| New York | USA | 8,336,817 | | ||
| London | UK | 9,002,488 | | ||
| Paris | France | 2,161,063 | | ||
| Tokyo | Japan | 13,960,236 | | ||
| Sydney | Australia | 5,367,206 | | ||
</d-table> | ||
</variable> | ||
</include> | ||
|
||
The DataTable plugin automatically renders the table with the specified features based on the presence of the `sortable` and `searchable` attributes in the `<d-table>` tag. You can use either one or both attributes to control the desired functionality for each table. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,112 @@ | ||
### Plugin: Mermaid | ||
|
||
<div id="content"> | ||
|
||
This plugin allows you to utilize [Mermaid](https://mermaid-js.github.io/mermaid/) by automatically importing the library and initializing the rendering of the diagrams. | ||
|
||
> Mermaid is a JavaScript based diagramming and charting tool that renders Markdown-inspired text definitions to create and modify diagrams dynamically. | ||
<box type="info"> | ||
|
||
All supported diagrams are available in [the Mermaid official documentation](https://mermaid-js.github.io/mermaid/). | ||
|
||
</box> | ||
|
||
To enable this plugin, add `mermaid` to your site's plugins. | ||
|
||
```js {heading="site.json"} | ||
{ | ||
... | ||
"plugins": [ | ||
"mermaid" | ||
] | ||
} | ||
``` | ||
|
||
<panel header="Optional: Specify an alternative URL to load the Mermaid code"> | ||
|
||
By default, the plugin loads the Mermaid code from a CDN URL. However, you can optionally specify an alternative URL to load the Mermaid code from a different source. | ||
|
||
```js {heading="site.json"} | ||
{ | ||
... | ||
"plugins": [ | ||
"mermaid" | ||
], | ||
"pluginsContext": { | ||
"mermaid": { | ||
"address": "https://unpkg.com/mermaid@10/dist/mermaid.esm.min.mjs" // replace with URL of your choice | ||
} | ||
} | ||
} | ||
``` | ||
|
||
</panel> | ||
|
||
To create a Mermaid diagram, use the `<mermaid>` tag and provide the diagram definition within the tag. | ||
|
||
{{ icon_example }} Pie Chart: | ||
|
||
<include src="codeAndOutput.md" boilerplate > | ||
<variable name="highlightStyle">html</variable> | ||
<variable name="code"> | ||
<mermaid> | ||
pie title Pets adopted by volunteers | ||
"Dogs" : 386 | ||
"Cats" : 85 | ||
"Rats" : 15 | ||
</mermaid> | ||
</variable> | ||
</include> | ||
|
||
{{ icon_example }} Flowchart: | ||
|
||
<include src="codeAndOutput.md" boilerplate > | ||
<variable name="highlightStyle">html</variable> | ||
<variable name="code"> | ||
<mermaid> | ||
flowchart TD | ||
A[Start] --> B{Is it?} | ||
B -->|Yes| C[OK] | ||
C --> D[Rethink] | ||
D --> B | ||
B ---->|No| E[End] | ||
</mermaid> | ||
</variable> | ||
</include> | ||
|
||
{{ icon_example }} User Journey Diagram: | ||
|
||
<include src="codeAndOutput.md" boilerplate > | ||
<variable name="highlightStyle">html</variable> | ||
<variable name="code"> | ||
<mermaid> | ||
journey | ||
title My working day | ||
section Go to work | ||
Make tea: 5: Me | ||
Go upstairs: 3: Me | ||
Do work: 1: Me, Cat | ||
</mermaid> | ||
</variable> | ||
</include> | ||
|
||
{{ icon_example }} Gitgraph Diagram: | ||
|
||
<include src="codeAndOutput.md" boilerplate > | ||
<variable name="highlightStyle">html</variable> | ||
<variable name="code"> | ||
<mermaid> | ||
gitGraph | ||
commit | ||
branch develop | ||
checkout develop | ||
commit | ||
checkout main | ||
merge develop | ||
</mermaid> | ||
</variable> | ||
</include> | ||
|
||
The plugin automatically converts the `<mermaid>` tags into appropriate `<div>` elements with the necessary classes and attributes for rendering the diagrams using the Mermaid library. | ||
<div> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.