mirror of
https://github.com/jackyzha0/quartz.git
synced 2025-12-19 19:04:06 -06:00
feat:ReplyByEmail button
Updated documentation for the component
This commit is contained in:
parent
93aed112af
commit
5a74a17d9b
@ -4,9 +4,9 @@ tags:
|
|||||||
- component
|
- component
|
||||||
---
|
---
|
||||||
|
|
||||||
The Reply By Email Button is a feature that allows users to display a button under their notes, allowing visitors to send them an email to an obfuscated email address.
|
The Reply By Email Button is a feature that allows users to display a button under their notes, allowing visitors to comment or submited feedback for your notes via email.
|
||||||
- The email address is base64 encoded to provide some basic protection from bots.
|
- The email address is base64 encoded to provide some basic protection from bots.
|
||||||
- The subject line of the email will be taken from the page Title where the button is clicked.
|
- The subject line of the email will be taken from the page title where the button is clicked.
|
||||||
- You can specify on what notes the button should be displayed or excluded.
|
- You can specify on what notes the button should be displayed or excluded.
|
||||||
- The label on the button can also be customised.
|
- The label on the button can also be customised.
|
||||||
|
|
||||||
@ -17,13 +17,12 @@ The Reply By Email Button is disabled by default. To enable it, you can add the
|
|||||||
Minimal configuration:
|
Minimal configuration:
|
||||||
```ts
|
```ts
|
||||||
Component.ReplyByEmail({
|
Component.ReplyByEmail({
|
||||||
username: "Y29udGFjdA==", // "contact" encoded in base64, as in contact@example.com
|
email: "contact@example.com"
|
||||||
domain: "ZXhhbXBsZS5jb20=", // "example.com" encoded in base64, as in contact@example.com
|
|
||||||
}),
|
}),
|
||||||
```
|
```
|
||||||
You can specify under which notes to display the button by adding the following:
|
You can specify under which notes to display the button by adding the following:
|
||||||
```ts
|
```ts
|
||||||
includeTitles: ["Welcome to Quartz 4", "Reply by Email Button"],
|
includeTitles: ["Welcome to Quartz 4", "Reply by Email Button", "Contact"],
|
||||||
```
|
```
|
||||||
Alternatively, you can include the button by default by ommiting the `includeTitles` line, and specify notes under which the button should not be displayed:
|
Alternatively, you can include the button by default by ommiting the `includeTitles` line, and specify notes under which the button should not be displayed:
|
||||||
```ts
|
```ts
|
||||||
@ -42,8 +41,7 @@ The natural placement for the Reply By Email Button is within `afterBody` in the
|
|||||||
```ts
|
```ts
|
||||||
afterBody: [
|
afterBody: [
|
||||||
Component.ReplyByEmail({
|
Component.ReplyByEmail({
|
||||||
username: "Y29udGFjdA==", // "contact" encoded in base64, as in contact@example.com
|
email: "contact@example.com", // The email address to be linked to
|
||||||
domain: "ZXhhbXBsZS5jb20=", // "example.com" encoded in base64, as in contact@example.com
|
|
||||||
// includeTitles: ["Welcome to Quartz 4"], // You can specify which page titles to include or comment out the line to include on all pages
|
// includeTitles: ["Welcome to Quartz 4"], // You can specify which page titles to include or comment out the line to include on all pages
|
||||||
excludeTitles: ["Welcome to Quartz 4", "Home"], // You can specify which page titles to exclude when includeTitles is empty
|
excludeTitles: ["Welcome to Quartz 4", "Home"], // You can specify which page titles to exclude when includeTitles is empty
|
||||||
buttonLabel: "Submit feedback by email" // You can override the default button text "Reply by email"
|
buttonLabel: "Submit feedback by email" // You can override the default button text "Reply by email"
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user