Skip to content

Commit

Permalink
Update: release 1.5.0
Browse files Browse the repository at this point in the history
  • Loading branch information
yzane committed Sep 8, 2023
1 parent 25dc900 commit ceeaada
Show file tree
Hide file tree
Showing 5 changed files with 1,287 additions and 973 deletions.
8 changes: 8 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,13 @@
# Change Log

## 1.5.0 (2023/09/05)
* The default date format for headers and footers has been changed to the ISO-based format (YYYY-MM-DD).
* Improve: Support different date formats in templates [#197](https://github.com/yzane/vscode-markdown-pdf/pull/197)
* Improve: Avoid TimeoutError: Navigation timeout of 30000 ms exceeded and TimeoutError: waiting for Page.printToPDF failed: timeout 30000ms exceeded [#266](https://github.com/yzane/vscode-markdown-pdf/pull/266)
* README
* Add: Specification Changes
* Fix: Broken link

## 1.4.4 (2020/03/19)
* Change: mermaid javascript reads from URL instead of from local file
* Add: `markdown-pdf.mermaidServer` option
Expand Down
47 changes: 37 additions & 10 deletions README.ja.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
## 目次
<!-- TOC depthFrom:2 depthTo:2 updateOnSave:false -->

- [仕様変更](#仕様変更)
- [機能](#機能)
- [インストール](#インストール)
- [使い方](#使い方)
Expand All @@ -20,6 +21,13 @@

<div class="page"/>

## 仕様変更

- PDFのヘッダーとフッターのデフォルトの日付書式変更
- バージョン1.5.0から、ヘッダーとフッターのデフォルトの日付書式がISOベースの書式(YYYY-MM-DD)に変更されました。
- この変更は、以前の書式が環境によって異なる可能性があったため、日付表示の一貫性を向上させることを目的としています。
- 以前の書式を使用したい場合は、[markdown-pdf.headerTemplate](#markdown-pdfheadertemplate)を参照してください。

## 機能

以下の機能をサポートしています。
Expand Down Expand Up @@ -393,9 +401,20 @@ Markdown PDF をインストールして、Visual Studio Code で Markdownファ
#### `markdown-pdf.displayHeaderFooter`
- ヘッダーとフッター表示を有効にします
- boolean. Default: true
- このオプションを有効にすると、ヘッダーとフッターが両方表示されます
- 片方を表示したくない場合は、もう片方の値を削除します
- ヘッダー非表示
```javascript
"markdown-pdf.headerTemplate": "",
```
- フッター非表示
```javascript
"markdown-pdf.footerTemplate": "",
```

#### `markdown-pdf.headerTemplate`, `markdown-pdf.footerTemplate`
- ヘッダーとフッターを出力する為のHTMLテンプレートを指定します
#### `markdown-pdf.headerTemplate`
- ヘッダーを出力する為のHTMLテンプレートを指定します
- このオプションを使用するには、`markdown-pdf.displayHeaderFooter``true` に設定する必要があります。
- `<span class='date'></span>` : 日付。フォーマットは環境に依存します
- `<span class='title'></span>` : Markdown ファイル名
- `<span class='url'></span>` : Markdown フルパスファイル名
Expand All @@ -404,11 +423,18 @@ Markdown PDF をインストールして、Visual Studio Code で Markdownファ
- `%%ISO-DATETIME%%` : 現在の日付と時刻。ISOベース フォーマット (`YYYY-MM-DD hh:mm:ss`)
- `%%ISO-DATE%%` : 現在の日付。ISOベース フォーマット (`YYYY-MM-DD`)
- `%%ISO-TIME%%` : 現在の時刻。ISOベース フォーマット (`hh:mm:ss`)
- Default (headerTemplate):
- Default (version1.5.0以降): Markdown ファイル名 と 日付を `%%ISO-DATE%%` で表示します
```javascript
"markdown-pdf.headerTemplate": "<div style=\"font-size: 9px; margin-left: 1cm;\"> <span class='title'></span></div> <div style=\"font-size: 9px; margin-left: auto; margin-right: 1cm; \">%%ISO-DATE%%</div>",
```
- Default (version1.4.4以前): Markdown ファイル名 と 日付を `<span class='date'></span>` で表示します
```javascript
"markdown-pdf.headerTemplate": "<div style=\"font-size: 9px; margin-left: 1cm;\"> <span class='title'></span></div> <div style=\"font-size: 9px; margin-left: auto; margin-right: 1cm; \">%%ISO-DATE%%</div>"
"markdown-pdf.headerTemplate": "<div style=\"font-size: 9px; margin-left: 1cm;\"> <span class='title'></span></div> <div style=\"font-size: 9px; margin-left: auto; margin-right: 1cm; \"> <span class='date'></span></div>",
```
- Default (footerTemplate):
#### `markdown-pdf.footerTemplate`
- フッターを出力する為のHTMLテンプレートを指定します
- 詳細は、[markdown-pdf.headerTemplate](#markdown-pdfheadertemplate) を参照してください
- Default: {現在のページ番号} / {ドキュメントの総ページ数} を表示します
```javascript
"markdown-pdf.footerTemplate": "<div style=\"font-size: 9px; margin: 0 auto;\"> <span class='pageNumber'></span> / <span class='totalPages'></span></div>",
```
Expand Down Expand Up @@ -580,12 +606,13 @@ Visual Studio Code の `files.autoGuessEncoding` オプションを使うと、

## [Release Notes](CHANGELOG.md)

### 1.5.0 (2023/xx/xx)
* Fix: Broken link in README
### 1.5.0 (2023/09/05)
* The default date format for headers and footers has been changed to the ISO-based format (YYYY-MM-DD).
* Improve: Support different date formats in templates [#197](https://github.com/yzane/vscode-markdown-pdf/pull/197)
* Improve: Avoid TimeoutError: Navigation timeout of 30000 ms exceeded and TimeoutError: waiting for Page.printToPDF failed: timeout 30000ms exceeded [#266](https://github.com/yzane/vscode-markdown-pdf/pull/266)
* Improve: Support different date formats in templates [#197](https://github.com/yzane/vscode-markdown-pdf/pull/197)
* The default date format has been changed to ISO-based format (YYYY-MM-DD).

* README
* Add: Specification Changes
* Fix: Broken link

## License

Expand Down
49 changes: 38 additions & 11 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ This extension converts Markdown files to pdf, html, png or jpeg files.
## Table of Contents
<!-- TOC depthFrom:2 depthTo:2 updateOnSave:false -->

- [Specification Changes](#specification-changes)
- [Features](#features)
- [Install](#install)
- [Usage](#usage)
Expand All @@ -22,6 +23,13 @@ This extension converts Markdown files to pdf, html, png or jpeg files.

<div class="page"/>

## Specification Changes

- Default Date Format for PDF Headers and Footers Modified
- Starting from version 1.5.0, the default date format for headers and footers has been changed to the ISO-based format (YYYY-MM-DD).
- This change aims to improve the consistency of date displays, as the previous format could vary depending on the environment.
- If you wish to use the previous format, please refer to [markdown-pdf.headerTemplate](#markdown-pdfheadertemplate).

## Features

Supports the following features
Expand Down Expand Up @@ -396,12 +404,22 @@ If the download is not successful or you want to avoid downloading every time yo
- pdf only. [puppeteer page.pdf options](https://github.com/puppeteer/puppeteer/blob/main/docs/api/puppeteer.pdfoptions.md)

#### `markdown-pdf.displayHeaderFooter`
- Enable display header and footer
- Enables header and footer display
- boolean. Default: true
- Activating this option will display both the header and footer
- If you wish to display only one of them, remove the value for the other
- To hide the header
```javascript
"markdown-pdf.headerTemplate": "",
```
- To hide the footer
```javascript
"markdown-pdf.footerTemplate": "",
```

#### `markdown-pdf.headerTemplate`
#### `markdown-pdf.footerTemplate`
- HTML template for the print header and footer
- Specifies the HTML template for outputting the header
- To use this option, you must set `markdown-pdf.displayHeaderFooter` to `true`
- `<span class='date'></span>` : formatted print date. The format depends on the environment
- `<span class='title'></span>` : markdown file name
- `<span class='url'></span>` : markdown full path name
Expand All @@ -410,11 +428,19 @@ If the download is not successful or you want to avoid downloading every time yo
- `%%ISO-DATETIME%%` : current date and time in ISO-based format (`YYYY-MM-DD hh:mm:ss`)
- `%%ISO-DATE%%` : current date in ISO-based format (`YYYY-MM-DD`)
- `%%ISO-TIME%%` : current time in ISO-based format (`hh:mm:ss`)
- Default (headerTemplate):
- Default (version 1.5.0 and later): Displays the Markdown file name and the date using `%%ISO-DATE%%`
```javascript
"markdown-pdf.headerTemplate": "<div style=\"font-size: 9px; margin-left: 1cm;\"> <span class='title'></span></div> <div style=\"font-size: 9px; margin-left: auto; margin-right: 1cm; \">%%ISO-DATE%%</div>",
```
- Default (version 1.4.4 and earlier): Displays the Markdown file name and the date using `<span class='date'></span>`
```javascript
"markdown-pdf.headerTemplate": "<div style=\"font-size: 9px; margin-left: 1cm;\"> <span class='title'></span></div> <div style=\"font-size: 9px; margin-left: auto; margin-right: 1cm; \">%%ISO-DATE%%</div>"
"markdown-pdf.headerTemplate": "<div style=\"font-size: 9px; margin-left: 1cm;\"> <span class='title'></span></div> <div style=\"font-size: 9px; margin-left: auto; margin-right: 1cm; \"> <span class='date'></span></div>",
```
- Default (footerTemplate):

#### `markdown-pdf.footerTemplate`
- Specifies the HTML template for outputting the footer
- For more details, refer to [markdown-pdf.headerTemplate](#markdown-pdfheadertemplate)
- Default: Displays the {current page number} / {total pages in the document}
```javascript
"markdown-pdf.footerTemplate": "<div style=\"font-size: 9px; margin: 0 auto;\"> <span class='pageNumber'></span> / <span class='totalPages'></span></div>",
```
Expand Down Expand Up @@ -586,12 +612,13 @@ Please use the following to insert a page break.

## [Release Notes](CHANGELOG.md)

### 1.5.0 (2023/xx/xx)
* Fix: Broken link in README
### 1.5.0 (2023/09/05)
* The default date format for headers and footers has been changed to the ISO-based format (YYYY-MM-DD).
* Improve: Support different date formats in templates [#197](https://github.com/yzane/vscode-markdown-pdf/pull/197)
* Improve: Avoid TimeoutError: Navigation timeout of 30000 ms exceeded and TimeoutError: waiting for Page.printToPDF failed: timeout 30000ms exceeded [#266](https://github.com/yzane/vscode-markdown-pdf/pull/266)
* Improve: Support different date formats in templates [#197](https://github.com/yzane/vscode-markdown-pdf/pull/197)
* The default date format has been changed to ISO-based format (YYYY-MM-DD).

* README
* Add: Specification Changes
* Fix: Broken link

## License

Expand Down
Loading

0 comments on commit ceeaada

Please sign in to comment.