Skip to content

Commit

Permalink
feat: Update nodemailer docs.
Browse files Browse the repository at this point in the history
  • Loading branch information
SamTolmay committed Sep 14, 2023
1 parent d1b3bae commit 03d23b5
Show file tree
Hide file tree
Showing 5 changed files with 94 additions and 17 deletions.
24 changes: 24 additions & 0 deletions apps/docs/community-plugin-nodemailer/EmailProvider.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
_ref:
path: templates/general.yaml.njk
vars:
pageId: EmailProvider
pageTitle: EmailProvider
section: '@lowdefy/community-plugin-nodemailer'
content:
- id: markdown
type: MarkdownWithCode
properties:
content: |
#### Properties
The `EmailProvider` provider extends the standard [NextAuth email provider](https://next-auth.js.org/providers/email) with support for email templates. This provider uses the auth theme settings that are set in `auth.theme`.
- `server: string | object`: **Required** - Nodemailer server/transport configuration.
- `from: string`: **Required** - The email address from which emails are sent.
- `maxAge: number`: How long until the e-mail can be used to log the user in seconds. Defaults to 1 day.
- `templates: object`: Nunjucks templates to customise the email message.
- `html: string`: Email HTML content template.
- `text: string`: Email text content template.
- `subject: string`: Email subject template.
- `templateVariables: object`: Data to use in the email nunjucks template. The default templates use the `appName` and `logoHeight` template variables.
- `returnPageId: string`: A pageId of a page in the Lowdefy app the user should be linked to instead of the standard `/api/auth/callback/email` route. This can be useful as email security software sometimes visit links in emails which expire the verification tokens. You can use a button on this page to link to the `/api/auth/callback/email` route
6 changes: 4 additions & 2 deletions apps/docs/lowdefy.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,8 @@ plugins:
- name: '@lowdefy/community-plugin-nodemailer'
version: 'workspace:*'

menus:
_ref: menus.yaml

pages:
- id: home
type: PageHeaderMenu
- _ref: community-plugin-nodemailer/EmailProvider.yaml
12 changes: 12 additions & 0 deletions apps/docs/menus.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
- id: default
links:
- id: community-plugin-nodemailer
type: MenuGroup
properties:
title: Nodemailer
links:
- id: EmailProvider
type: MenuLink
pageId: EmailProvider
properties:
title: EmailProvider
54 changes: 54 additions & 0 deletions apps/docs/templates/general.yaml.njk
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
id: "{{ pageId }}"
type: PageSiderMenu
properties:
title: {{ pageTitle }}
header:
theme: light
menu:
forceSubMenuRender: true
sider:
width: 256px
initialCollapsed:
_or:
- _eq:
- _media: size
- md
- _eq:
- _media: size
- lg
layout:
style:
background: '#FFFFFF'
footer:
style:
background: '#FFFFFF'
padding: 16px 0px 0px 0px
breadcrumb:
list:
{% if section %}
- '{{ section }}'
- '{{ pageTitle }}'
{% endif %}

areas:
content:
justify: center
blocks:
- id: max_width
type: Box
layout:
flex: 0 1 800px
blocks:
{% if pageTitle %}
- id: page_title
type: Title
properties:
content:
_var: pageTitle
{% endif %}
- id: content
type: Box
layout:
contentGutter: 16
blocks:
_var: content
15 changes: 0 additions & 15 deletions plugins/community-plugin-nodemailer/README.md

This file was deleted.

0 comments on commit 03d23b5

Please sign in to comment.