Skip to content

Commit

Permalink
feat: Merge pull request #144 from samuele-cozzi:134-highlighting-mis…
Browse files Browse the repository at this point in the history
…sing

134-highlighting-missing
  • Loading branch information
samuele-cozzi committed Mar 9, 2024
2 parents e4a4472 + 04e94c4 commit 50c4453
Show file tree
Hide file tree
Showing 24 changed files with 1,910 additions and 1,097 deletions.
17 changes: 16 additions & 1 deletion docs/12.Configuration.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ parent: Getting Started

![Settings](pictures/Settings.png)


## Chrome Path

Sets the custom path for Chrome or Chromium-based browser to export PDF, PPTX, and image. If it\'s empty, Marp will find out the installed Google Chrome / Chromium / Microsoft Edge.
Expand All @@ -29,4 +30,18 @@ Controls math syntax and the default library for rendering math in Marp Core. A

## HTML Export

Controls HTML library for eporting HTML File in Marp Cli. bespoke.js is experimental
**This is an EXPERIMENTAL feature**

Controls HTML library for eporting HTML File in Marp Cli. bespoke.js is experimental

## Sync Preview

**This is an EXPERIMENTAL feature**

Sync the slide preview with the editor cursor

## Markdown It Plugins

**This is an EXPERIMENTAL feature**

Enable the [Markdown It Plugins](30.Markdown-it-Plugins.md) (Mark, Containers, Kroki)
23 changes: 23 additions & 0 deletions docs/30.Markdown-it-Plugins.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
---
title: Markdown-It Plugins
nav_order: 4
---

Markdown-it is a powerful and flexible Markdown parser that allows you to convert Markdown syntax into HTML. It’s widely used for rendering Markdown content on websites, blogs, and documentation.

## Markdown-it Plugins

Markdown-it supports community-written plugins. The Plugins can be loaded like this:

```js
const md = markdownit
.use(plugin1)
.use(plugin2, opts, ...)
.use(plugin3);
```

## Marp Slides Markdown-It Plugins

- [Mark](31.Markdown-it-Mark.md)
- [Containers](32.Markdown-it-Conteiners.md)
- [Kroki](33.Markdown-it-Kroki.md)
25 changes: 25 additions & 0 deletions docs/31.Markdown-it-Mark.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
---
title: Markdown-It Mark
parent: Markdown-It Plugins
---
Markup uses the same conditions as CommonMark [emphasis](http://spec.commonmark.org/0.15/#emphasis-and-strong-emphasis).

`==marked==` => `<mark>inserted</mark>`

## Sample

```markdown
---
# Text Highlights

**[markdown-it-mark](https://github.com/markdown-it/markdown-it-mark)**

This is ==marked== text
---
```

![alt text](pictures/plugin-mark.png)

## References

- [markdown-it-mark](https://github.com/markdown-it/markdown-it-mark)
55 changes: 55 additions & 0 deletions docs/32.Markdown-it-Conteiners.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
---
title: Markdown-It Conteiners
parent: Markdown-It Plugins
---

With this plugin you can create block containers like:

```markdown
::: container
*here be dragons*
:::
```

.... and specify how they should be rendered. If no renderer defined, `<div>` with
container name class will be created:

```html
<div class="container">
<em>here be dragons</em>
</div>
```

## Sample

```markdown
---

<!-- _class: box-flex -->
# Columns Containers

**[markdown-it-container](https://github.com/markdown-it/markdown-it-container)**

::: container
## Colum 1

text dadadas text text text text text text text text text text

:::

::: container
## Colum 2

text

:::

---
```

![1709827719273](attachments/32.Markdown-it-Conteiners/1709827719273.png)


## References

- [markdown-it-container](https://github.com/markdown-it/markdown-it-container)
48 changes: 48 additions & 0 deletions docs/33.Markdown-it-Kroki.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
---
title: Markdown-It Kroki
parent: Markdown-It Plugins
---

# markdown-it-kroki

> This library was designed to embed [Kroki.io](https://kroki.io/) diagram into [Marp](https://marp.app/) slide decks!!
This library is a plugin for markdown-it to embed figure created by textual syntax.
To use this package, you can embed **Software Diagram** (like UML) written by **code** in Marp slide decks.

## Sample

```plantuml[platuml image]
@startuml
left to right direction
actor Guest as g
package Professional {
actor Chef as c
actor "Food Critic" as fc
}
package Restaurant {
usecase "Eat Food" as UC1
usecase "Pay for Food" as UC2
usecase "Drink" as UC3
usecase "Review" as UC4
}
fc --> UC4
g --> UC1
g --> UC2
g --> UC3
@enduml
```

![alt text](pictures/plugin-kroki.png)

If you want to write diagrams, you can use various syntaxes (such as [PlantUML](https://plantuml.com/) or [Mermaid](https://mermaid-js.github.io/mermaid/#/)) within fenced code blocks.


> [!NOTE]
> This package depends on [Kroki.io](https://kroki.io).
> If you want to know which **diagram languages are supported**,
> please check the official website at [https://kroki.io/](https://kroki.io/).
## References

- [markdown-it-kroki](https://github.com/kazumatu981/markdown-it-kroki)
2 changes: 1 addition & 1 deletion docs/30.Examples.md → docs/40.Examples.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
title: Examples
nav_order: 4
nav_order: 5
---

# Examples
Expand Down
2 changes: 1 addition & 1 deletion docs/DeveloperGuide.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
title: Developer Guide
nav_order: 5
nav_order: 6
---

# Developer Guide
Expand Down
64 changes: 64 additions & 0 deletions docs/pictures/Sample Markdown-it Plugins.html

Large diffs are not rendered by default.

Binary file modified docs/pictures/Settings.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/pictures/plugin-container.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/pictures/plugin-kroki.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/pictures/plugin-mark.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading

0 comments on commit 50c4453

Please sign in to comment.