Skip to main content

Markdown Enhance

kfkfka zkye...About 3 minGuideMarkdown

vuepress-theme-hope enables more syntax in Markdown via the built-in md-enhanceopen in new window plugin.

Enable all

You can set themeconfig.mdEnhance.enableAll to enable all features of the md-enhanceopen in new window plugin.

module.exports = {
  themeConfig: {
    mdEnhance: {
      enableAll: true,
    },
  },
};


 
 
 


New Feature

Superscript and Subscript

19th H2O

Code
19^th^ H~2~O

Align

I am center

I am right align

Code
::: center

I am center

:::

::: right

I am right align

:::

Footnote

This text has footnote[1].

Code
This text has footnote[^first].

[^first]: This is footnote content

Mark

You can mark important words .

Code
You can mark ==important words== .

Tasklist

Code
- [x] Plan A
- [ ] Plan B

Flowchart

cond=>condition: Process?
process=>operation: Process
e=>end: End

cond(yes)->process->e
cond(no)->e
Code
```flow
cond=>condition: Process?
process=>operation: Process
e=>end: End

cond(yes)->process->e
cond(no)->e
```

Mermaid

Code
```mermaid
graph TD;
    A-->B;
    A-->C;
    B-->D;
    C-->D;
```

Tex

rωr(yωω)=(yωω){(logy)r+i=1r(1)ir(ri+1)(logy)riωi} \frac {\partial^r} {\partial \omega^r} \left(\frac {y^{\omega}} {\omega}\right) = \left(\frac {y^{\omega}} {\omega}\right) \left\{(\log y)^r + \sum_{i=1}^r \frac {(-1)^i r \cdots (r-i+1) (\log y)^{r-i}} {\omega^i} \right\}

Code
$$
\frac {\partial^r} {\partial \omega^r} \left(\frac {y^{\omega}} {\omega}\right)
= \left(\frac {y^{\omega}} {\omega}\right) \left\{(\log y)^r + \sum_{i=1}^r \frac {(-1)^i r \cdots (r-i+1) (\log y)^{r-i}} {\omega^i} \right\}
$$

Demo

::: demo A normal demo

<h1>ET-yzk</h1>
<p>Is <span id="very">very</span> handsome</p>
document.querySelector("#very").addEventListener("click", () => {
  alert("Very handsome!");
});
span {
  color: red;
}

:::

Code
::: demo A normal demo

```html
<h1>ET-yzk</h1>
<p>Is <span id="very">very</span> handsome</p>
```

```js
document.querySelector("#very").addEventListener("click", () => {
  alert("Very handsome!");
});
```

```css
span {
  color: red;
}
```

:::

::: demo [react] A react demo

export default class App extends React.Component {
  constructor(props) {
    super(props);
    this.state = { message: "very handsome" };
  }
  render() {
    return (
      <div className="box-react">
        zkye is <span>{this.state.message}</span>
      </div>
    );
  }
}
.box-react span {
  color: red;
}

:::

Code
::: demo [react] A react demo

```js
export default class App extends React.Component {
  constructor(props) {
    super(props);
    this.state = { message: "very handsome" };
  }
  render() {
    return (
      <div className="box-react">
        zkye is <span>{this.state.message}</span>
      </div>
    );
  }
}
```

```css
.box-react span {
  color: red;
}
```

:::

::: demo [vue] A vue demo

<template>
  <div class="box">
    zkye is <span>{{ message }}</span>
  </div>
</template>
<script>
export default {
  data: () => ({ message: "very handsome" }),
};
</script>
<style>
.box span {
  color: red;
}
</style>

:::

Code
::: demo [vue] A vue demo

```vue
<template>
  <div class="box">
    zkye is <span>{{ message }}</span>
  </div>
</template>
<script>
export default {
  data: () => ({ message: "very handsome" }),
};
</script>
<style>
.box span {
  color: red;
}
</style>
```

:::

::: demo A normal demo

# Title

is very handsome.
const message: string = "ET-yzk";

document.querySelector("h1").innerHTML = message;
h1 {
  font-style: italic;

  + p {
    color: red;
  }
}

:::

Code
::: demo A normal demo

```md
# Title

is very handsome.
```

```ts
const message: string = "ET-yzk";

document.querySelector("h1").innerHTML = message;
```

```scss
h1 {
  font-style: italic;

  + p {
    color: red;
  }
}
```

:::

Presentation

@slidestart

Slide 1

A paragraph with some text and a linkopen in new window


Slide 2

  • Item 1
  • Item 2

Slide 3.1

const a = 1;

--

Slide 3.2

J(θ0,θ1)=i=0 J(\theta_0,\theta_1) = \sum_{i=0}

@slideend

Code
@slidestart

## Slide 1

A paragraph with some text and a [link](https://mrhope.site)

---

## Slide 2

- Item 1
- Item 2

---

## Slide 3.1

```js
const a = 1;
```

--

## Slide 3.2

$$
J(\theta_0,\theta_1) = \sum_{i=0}
$$

@slideend

Other Syntax

custom title

A custom information container

custom title

A custom tip container

custom title

A custom warning container

custom Title

A custom danger container

custom title

A custom details container

Code
::: info custom title

A custom information container

:::

::: tip custom title

A custom tip container

:::

::: warning custom title

A custom warning container

:::

::: danger custom Title

A custom danger container

:::

::: details custom title

A custom details container

:::

  1. This is footnote content ↩︎

Comments
  • Latest
  • Oldest
  • Hottest
Powered by Waline v2.15.8