Plugin Settings
Using the NotePlan Plugin Settings interface you can customize various settings to control how how templates display information.
Step 1: Open NotePlan Preferences (NotePlan -> Preferences) and click the Plugins tab
Step 2: Find Templating
in the NotePlan Plugin list
Step 3: Click the gear icon to access Templating
settings
Plugin Setting Keys
Locale
Default: en-US
The locale which is used when creating date or time formats
- If locale is empty, the default language
en-US
will be used - If locale is set to
<system>
, the operating system locale will be usedSystem Preferences > Date & Time > Language & Region
First Name
Your first name, used when referencing user object (e.g. <%- user.first %>
)
Last Name
Your last name, used when referencing user object (e.g. <%- user.last %>
)
Your email, used when referencing user object (e.g. <%- user.email %>
)
Phone
Your phone number, used when referencing user object (e.g. <%- user.phone %>
)
Date Format
Default: <system>
Desired date format, used when referencing date object (e.g. <%- date.now() %
)
Time Format
Default: <system>
Desired date format, used when referencing time object (e.g. <% time.now() %
)
Timestamp Format
Default: <system>
Desired timestamp format, used when referencing timestamp object (e.g. <% date.timestamp() %
)
Weather Format
Desired weather format string when referencing web weather (e.g. <% web.weather() %
)
WEATHER TAGS
For more detailed information on supported weather tags refer to the weather examples.
Web Services
A JSON object which contains entries available when using web.services()
method
- For services which return a simple response, you can just supply URL
- For services which return a JSON object, you can define the
url
andkeys
Web Services Example
The following is an example of how web services
should be defined
Each service
is defined by a unique key (e.g. 'advice') and may contain a single value which is the desire url
or an object which has url
and keys
properties
<%- web.services('serviceName') %>
{
"advice": "https://api.adviceslip.com/advice",
"verse": {
"url": "https://labs.bible.org/api/?passage=random&type=json",
"keys": [
"> ππ» ",
"[0].bookname",
" ",
"[0].chapter",
":",
"[0].verse",
"\n> π£ \"",
"[0].text",
"\""
]
}
}
WEB MODULE
For more information about using web services, refer to Web Module .