Skip to content

Commit

Permalink
Prepare version 1.0.0
Browse files Browse the repository at this point in the history
  • Loading branch information
joleaf committed Jun 16, 2024
1 parent eda1aea commit 2a84a87
Show file tree
Hide file tree
Showing 5 changed files with 26 additions and 18 deletions.
9 changes: 8 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,13 @@

All changes to this plugin are listed here.

## 1.0.0 (2024-06-16)

### New

- Use variables in all fields
- #13 Use variables from the properties (only first level of properties)

## 0.6.0 (2023-08-17)

### New
Expand Down Expand Up @@ -30,7 +37,7 @@ All changes to this plugin are listed here.

### Fixed

- Use `"""` for second parameter in `getFirstLinkpathDest` if absolute path
- Use `"""` for second parameter in `getFirstLinkpathDest` if absolute path

## 0.3.1 (2023-01-12)

Expand Down
29 changes: 15 additions & 14 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,6 @@ You can use the `variables` parameter to replace placeholders in your body text
To include a variable in the body text just add a placeholder `{{myvar}}`.
Variables from fontmatter data can be used as well.


... with a body text after the yaml:

````
Expand All @@ -64,6 +63,7 @@ JB
````

... you can use properties, like variables, on the subject or within the body:

````
```email
to: [email protected]
Expand All @@ -80,19 +80,20 @@ FI

You can customize the view with the following parameters:

| Parameter | Description | Values |
|------------|-----------------------------------------------------------------------|----------------------------|
| to | The main receiver of the mail. Multiple receiver seperated by ",". | String value |
| cc | The cc receiver of the mail. Multiple receiver seperated by ",". | String value |
| bcc | The bcc receiver of the mail. Multiple receiver seperated by ",". | String value |
| subject | The subject of the email. Plain text or combined text with variables | String value |
| body | The body of the email. Plain text or a link to a \[\[NoteFile\]\] (x). | String value |
| showmailto | Show the "mailto" link after the mail body. | true/false (Default: true) |
| variables | A map of placeholder variables. | YAML Object |
| from | A from field (only for documentation). | String value |

x) Note that no formatting is supported (only new
lines) ([reason](https://stackoverflow.com/questions/5620324/mailto-link-with-html-body)).
| Parameter | Description | Values | Required |
|------------|------------------------------------------------------------------------|--------------------------------|----------|
| to | The main receiver of the mail. Multiple receiver seperated by ",". | String / List of Strings | |
| cc | The cc receiver of the mail. Multiple receiver seperated by ",". | String / List of Strings | |
| bcc | The bcc receiver of the mail. Multiple receiver seperated by ",". | String value / List of Strings | |
| subject | The subject of the email. Plain text or combined text with variables | String value | x |
| body (1) | The body of the email. Plain text or a link to a \[\[NoteFile\]\] (2). | String value | x |
| showmailto | Show the "mailto" link after the mail body. | true/false (Default: true) | |
| variables | A map of placeholder variables. | YAML Object | |
| from | A from field (only for documentation). | String value | |

1) The body can be appended after the yaml with a "---" separation
2) No formatting is supported (only new
lines) ([reason](https://stackoverflow.com/questions/5620324/mailto-link-with-html-body)).

### Example

Expand Down
2 changes: 1 addition & 1 deletion main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,7 @@ export default class MailBlockPlugin extends Plugin {
parameters.body = extraBody;
}

// Variables
// Variables
if (parameters.variables === undefined) {
parameters.variables = {};
}
Expand Down
2 changes: 1 addition & 1 deletion manifest.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"id": "email-block-plugin",
"name": "Email code block",
"version": "0.6.0",
"version": "1.0.0",
"minAppVersion": "0.15.0",
"description": "This plugin renders an email code block.",
"author": "JoLeaf",
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "email-block-plugin",
"version": "0.6.0",
"version": "1.0.0",
"description": "This plugin renders an email code block.",
"main": "main.js",
"scripts": {
Expand Down

0 comments on commit 2a84a87

Please sign in to comment.