[go: nahoru, domu]

Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

perf: pager component display logical optimization #67

Merged
merged 7 commits into from
May 28, 2022
Merged
Show file tree
Hide file tree
Changes from 3 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
43 changes: 37 additions & 6 deletions docs/docs/md-enhance/others.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,17 +15,19 @@ Code related to the disabled features will not be included in your site's bundle

- Footnote
- Mark
- Subscript
- Superscript

You can enable all features simply by:

```js
theme: gungnirTheme({
themePlugins: {
mdPlus: {
all: true, // enable all features (default: false)
all: true // enable all features (default: false)
}
}
})
});
```

or enable them separately:
Expand All @@ -34,34 +36,63 @@ or enable them separately:
theme: gungnirTheme({
themePlugins: {
mdPlus: {
footnote: true, // Footnote (default: false)
mark: true // Mark (default: false)
footnote: true, // Footnote (default: false)
mark: true, // Mark (default: false)
rainbowatcher marked this conversation as resolved.
Show resolved Hide resolved
sub: true, // Mark (default: false)
sup: true // Mark (default: false)
}
}
})
});
```

## Footnote

Add footnotes for text[^1]

::: details Syntax

```
Add footnotes for text[^1]

[^1]: Write your footnote here.
```
:::

:::

## Mark

Mark important information: "Excuse me. Can you tell me how much the shirt is?" "Yes, it's ==nine fifteen==."

::: details Syntax

```
Yes, it's ==nine fifteen==.
```

:::

## Subscript

H~2~O

::: details Syntax

```markdown
H~2~O
```

:::

## Superscript

29^th^

::: details Syntax

```
29^th^
```

:::

---
Expand Down
43 changes: 35 additions & 8 deletions docs/docs/plugins/md-plus.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,8 @@ A plugin for enhancing Markdown in [VuePress 2](https://v2.vuepress.vuejs.org/).

- footnote (supported by [markdown-it-footnote](https://github.com/markdown-it/markdown-it-footnote))
- mark (supported by [markdown-it-footnote](https://github.com/markdown-it/markdown-it-mark))

- Subscript (supported by [markdown-it-sub](https://github.com/markdown-it/markdown-it-sub))
- Superscript (supported by [markdown-it-sup](https://github.com/markdown-it/markdown-it-sup))

## Install

Expand Down Expand Up @@ -49,7 +50,6 @@ npm install @renovamen/vuepress-plugin-md-plus@next
</CodeGroupItem>
</CodeGroup>


## Configuration

You can enable all features simply by:
Expand All @@ -60,10 +60,10 @@ const { mdPlusPlugin } = require("@renovamen/vuepress-plugin-md-plus");
module.exports = {
plugins: [
mdPlusPlugin({
all: true, // Enable all features or not, this will rewrite all the following options (default: false)
all: true // Enable all features or not, this will rewrite all the following options (default: false)
})
]
}
};
```

or enable them separately:
Expand All @@ -72,36 +72,63 @@ or enable them separately:
module.exports = {
plugins: [
mdPlusPlugin({
rainbowatcher marked this conversation as resolved.
Show resolved Hide resolved
footnote: true, // Enable footnote or not (default: false)
mark: true // Enable mark or not (default: false)
footnote: true, // Enable footnote or not (default: false)
mark: true // Enable mark or not (default: false)
})
]
}
};
```


## Usage

### Footnote

Add footnotes for text[^1]

::: details Syntax

```
Add footnotes for text[^1]

[^1]: Write your footnote here.
```

:::

### Mark

Mark important information: "Excuse me. Can you tell me how much the shirt is?" "Yes, it's ==nine fifteen==."

::: details Syntax

```
Mark important information: "Excuse me. Can you tell me how much the shirt is?" "Yes, it's ==nine fifteen==."
```

:::

## Subscript
rainbowatcher marked this conversation as resolved.
Show resolved Hide resolved

H~2~O

::: details Syntax

```markdown
H~2~O
```

:::

## Superscript
rainbowatcher marked this conversation as resolved.
Show resolved Hide resolved

29^th^

::: details Syntax

```
29^th^
```

:::

---
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
---
layout: Post
title: Hello Word with a long title, it should requires two lines to display.
rainbowatcher marked this conversation as resolved.
Show resolved Hide resolved
subtitle: A Test Post with a Header Image
author: Renovamen
date: 2021-12-26
useHeaderImage: true
headerImage: /img/in-post/2021-12-25/header.jpg
headerMask: rgba(40, 57, 101, .4)
tags:
- test
---
11 changes: 11 additions & 0 deletions docs/posts/2022-05-24.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
---
layout: Post
title: Hello World 4
date: 2022-05-24
useHeaderImage: false
headerImage: /img/in-post/2021-12-24/header.jpg
headerMask: rgba(0, 0, 0, .4)
catalog: false
hide: false
tags: [test]
---
Renovamen marked this conversation as resolved.
Show resolved Hide resolved
42 changes: 37 additions & 5 deletions docs/zh/docs/md-enhance/others.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,17 +15,19 @@ date: 2022-03-12

- 脚注
- 高亮标记
- 下标
- 上标

你可以一键启用所有功能:

```js
theme: gungnirTheme({
themePlugins: {
mdPlus: {
all: true, // 全部启用(默认:false)
all: true // 全部启用(默认:false)
}
}
})
});
```

也可以分别启用:
Expand All @@ -34,33 +36,63 @@ theme: gungnirTheme({
theme: gungnirTheme({
themePlugins: {
mdPlus: {
footnote: true, // 脚注(默认:false)
mark: true // 高亮标记(默认:false)
footnote: true, // 脚注(默认:false)
mark: true, // 高亮标记(默认:false)
sub: true, // 下标(默认:false)
sup: true // 上标(默认:false)
}
}
})
});
```

## 脚注

给文字加上脚注[^1]

::: details 语法

```
给文字加上脚注[^1]

[^1]: 脚注内容
```

:::

## 高亮标记

高亮标记重要的内容:衬衫的价格是 ==九磅十五便士==

::: details 语法

```
衬衫的价格是 ==九磅十五便士==
```

:::

## 下标

H~2~O

::: details 语法

```markdown
H~2~O
```

:::

## 上标

29^th^

::: details 语法

```
29^th^
```

:::

---
Expand Down
Loading