mirror of
https://github.com/wahyd4/docsify.git
synced 2026-08-09 05:16:06 +10:00
* feat: support image resizing, resolve #508 * add docs
This commit is contained in:
+22
-12
@@ -60,17 +60,27 @@ You will get `<a href="/demo/">link</a>`html. Do not worry, you can still set ti
|
||||
## Github Task Lists
|
||||
|
||||
```md
|
||||
* [ ] foo
|
||||
* bar
|
||||
* [x] baz
|
||||
* [] bam <~ not working
|
||||
* [ ] bim
|
||||
* [ ] lim
|
||||
- [ ] foo
|
||||
- bar
|
||||
- [x] baz
|
||||
- [] bam <~ not working
|
||||
- [ ] bim
|
||||
- [ ] lim
|
||||
```
|
||||
|
||||
* [ ] foo
|
||||
* bar
|
||||
* [x] baz
|
||||
* [] bam <~ not working
|
||||
* [ ] bim
|
||||
* [ ] lim
|
||||
- [ ] foo
|
||||
- bar
|
||||
- [x] baz
|
||||
- [] bam <~ not working
|
||||
- [ ] bim
|
||||
- [ ] lim
|
||||
|
||||
## Image resizing
|
||||
|
||||
```md
|
||||

|
||||

|
||||
```
|
||||
|
||||

|
||||

|
||||
|
||||
+22
-12
@@ -66,17 +66,27 @@ You will get `<a href="/demo/">link</a>`html. Do not worry, you can still set ti
|
||||
## Github Task Lists
|
||||
|
||||
```md
|
||||
* [ ] foo
|
||||
* bar
|
||||
* [x] baz
|
||||
* [] bam <~ not working
|
||||
* [ ] bim
|
||||
* [ ] lim
|
||||
- [ ] foo
|
||||
- bar
|
||||
- [x] baz
|
||||
- [] bam <~ not working
|
||||
- [ ] bim
|
||||
- [ ] lim
|
||||
```
|
||||
|
||||
* [ ] foo
|
||||
* bar
|
||||
* [x] baz
|
||||
* [] bam <~ not working
|
||||
* [ ] bim
|
||||
* [ ] lim
|
||||
- [ ] foo
|
||||
- bar
|
||||
- [x] baz
|
||||
- [] bam <~ not working
|
||||
- [ ] bim
|
||||
- [ ] lim
|
||||
|
||||
## Image resizing
|
||||
|
||||
```md
|
||||

|
||||

|
||||
```
|
||||
|
||||

|
||||

|
||||
|
||||
+22
-12
@@ -56,17 +56,27 @@ docsify 扩展了一些 Markdown 语法,可以让文档更易读。
|
||||
## Github 任务列表
|
||||
|
||||
```md
|
||||
* [ ] foo
|
||||
* bar
|
||||
* [x] baz
|
||||
* [] bam <~ not working
|
||||
* [ ] bim
|
||||
* [ ] lim
|
||||
- [ ] foo
|
||||
- bar
|
||||
- [x] baz
|
||||
- [] bam <~ not working
|
||||
- [ ] bim
|
||||
- [ ] lim
|
||||
```
|
||||
|
||||
* [ ] foo
|
||||
* bar
|
||||
* [x] baz
|
||||
* [] bam <~ not working
|
||||
* [ ] bim
|
||||
* [ ] lim
|
||||
- [ ] foo
|
||||
- bar
|
||||
- [x] baz
|
||||
- [] bam <~ not working
|
||||
- [ ] bim
|
||||
- [ ] lim
|
||||
|
||||
## Image resizing
|
||||
|
||||
```md
|
||||

|
||||

|
||||
```
|
||||
|
||||

|
||||

|
||||
|
||||
@@ -257,6 +257,16 @@ export class Compiler {
|
||||
attrs += ` title="${title}"`
|
||||
}
|
||||
|
||||
const size = config.size
|
||||
if (size) {
|
||||
const sizes = size.split('x')
|
||||
if (sizes[1]) {
|
||||
attrs += 'width=' + sizes[0] + ' height=' + sizes[1]
|
||||
} else {
|
||||
attrs += 'width=' + sizes[0]
|
||||
}
|
||||
}
|
||||
|
||||
if (!isAbsolutePath(href)) {
|
||||
url = getPath(contentBase, getParentPath(router.getCurrentPath()), href)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user