Skip to content

Commit 1780a71

Browse files
committed
Merge branch 'develop'
2 parents 1f0a397 + c97a5a1 commit 1780a71

File tree

3 files changed

+26
-3
lines changed

3 files changed

+26
-3
lines changed

CHANGELOG.md

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,17 @@
11
# ChangeLog
22

3+
## v1.3.0
4+
5+
### Features
6+
7+
- Add support for `<a href="...">` in HTML / JSX [#16](https://github.com/akabekobeko/npm-gatsby-remark-copy-relative-linked-files/pull/16) by [karlhorky](https://github.com/karlhorky)
8+
- Add support for video poster attribute [#17](https://github.com/akabekobeko/npm-gatsby-remark-copy-relative-linked-files/pull/17) by [karlhorky](https://github.com/karlhorky)
9+
- Add filename function option [#19](https://github.com/akabekobeko/npm-gatsby-remark-copy-relative-linked-files/pull/19) by [karlhorky](https://github.com/karlhorky)
10+
11+
### Fixes
12+
13+
- Reassign value with result of replace [#18](https://github.com/akabekobeko/npm-gatsby-remark-copy-relative-linked-files/pull/18) by [karlhorky](https://github.com/karlhorky)
14+
315
## v1.2.0
416

517
### Features

README.md

Lines changed: 13 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -56,11 +56,13 @@ diagram.png
5656
<img src="sales-growth.png" alt="Diagram of the sales growth" />
5757

5858
<audio src="sample.mp3" controls></audio>
59-
<video src="sample.mp4" controls></video>
59+
<video src="sample.mp4" poster="thumbnail.jpg" controls></video>
6060

6161
<video controls>
6262
<source src="sample2.mp4" type="video/mp4">
6363
</video>
64+
65+
<a href="sample.svg">SVG Image</a>
6466
````
6567

6668
`image.gif`, `archive.zip`, `sample.pdf` and `report.html` should be in the same directory as the Markdown file. When you build your site, the files will be copied to the public folder and the markdown HTML will be modified to point to it.
@@ -69,6 +71,10 @@ Similarly, `report.css` and `diagram.png` should be in the same directory as the
6971

7072
The copy target is a relative link. Therefore, links starting with `XXXX://` or `//` are ignored. In this example `not-copy.rar` is not copied.
7173

74+
**v1.3.0**
75+
76+
[Pull request](https://github.com/akabekobeko/npm-gatsby-remark-copy-relative-linked-files/pull/8) by [karlhorky](https://github.com/karlhorky) also copied the `href` attribute of `<a>` tag, and `poster` attribute of `<video>` tag.
77+
7278
**v1.1.0**
7379

7480
[Pull request](https://github.com/akabekobeko/npm-gatsby-remark-copy-relative-linked-files/pull/8) by [karlhorky](https://github.com/karlhorky) also copied the `src` attribute of `<audio>`/`<video>`/`<source>` tag.
@@ -87,9 +93,12 @@ plugins: [
8793
options: {
8894
// By default, `.md` is specified
8995
// ignoreFileExtensions: ['.md']
90-
96+
//
9197
// These files will not be copied
9298
ignoreFileExtensions: ['.md', '.pdf', '.d.ts'],
99+
100+
// Would generate file-1abcb33beeb811dca15f0ac3e47b88d9.pdf
101+
filename: ({hash, name, extension}) => `${name}-${hash}.${extension}`
93102
},
94103
},
95104
],
@@ -99,6 +108,8 @@ plugins: [
99108
```
100109

101110
- **ignoreFileExtensions** `string[]` - Specify the file extension to be ignored from copying. This plugin is for `remark` (Markdown), so it specifies `.md` by default.
111+
- **filename** `(hash: string, name: string, extension: string) => string` - Can control the file name as you like. See [#15](https://github.com/akabekobeko/npm-gatsby-remark-copy-relative-linked-files/issues/15) for details.
112+
102113

103114
# ChangeLog
104115

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"name": "gatsby-remark-copy-relative-linked-files",
33
"description": "Copies local files relative linked to/from markdown to your public folder with preserve directory structure.",
4-
"version": "1.2.0",
4+
"version": "1.3.0",
55
"author": "akabeko (http://akabeko.me/)",
66
"license": "MIT",
77
"homepage": "https://github.com/akabekobeko/npm-gatsby-remark-copy-relative-linked-files#readme",

0 commit comments

Comments
 (0)