Adds Terms of Service and Privacy Policy pages under src/routes/[[lang]]/terms/ (service and privacy). Uses the MOTA addon CLI (e.g. from dapp-starter).
Templates use *.ejs.t so variables (tosContent, privacyContent, etc.) are substituted at install time.
The default ToS and Privacy templates use these placeholders in the HTML:
| Placeholder | Meaning | When replaced |
|---|---|---|
[SERVICE] |
Your service / company name | Replaced if you enter a value at install; otherwise left as [SERVICE] in the generated page. |
[EMAIL] |
Support / contact email | Replaced if you enter a value; otherwise left as [EMAIL]. |
[DATE] |
Last Updated date | Always replaced: with the date you enter, or today’s date (YYYY-MM-DD) if left blank. |
You can also keep [SERVICE] and [EMAIL] in the generated files and replace them later in your repo.
- SvelteKit project with MOTA addon CLI (hygen, prompts).
From your project root:
npx addon <repo> terms installExample:
npx addon bchainhub/mota-addon-terms terms installDuring install you will be prompted for:
- Your service name — Replaces
[SERVICE]in the documents. Leave as[SERVICE]to keep the placeholder. - Support email address — Replaces
[EMAIL]. Leave as[EMAIL]to keep the placeholder. - Last Updated date — YYYY-MM-DD; replaces
[DATE]. Leave blank for today’s date. - Terms of Service — Use the default template or paste your own HTML.
- Privacy Policy — Use the default template or paste your own HTML.
- Routes
src/routes/[[lang]]/terms/service/+page.svelte— Terms of Service.src/routes/[[lang]]/terms/privacy/+page.svelte— Privacy Policy.
Page templates are *.ejs.t so EJS can inject the collected content and variables.
The default ToS template does not include jurisdiction or venue; the default Privacy template does not include a minimum-age variable (children’s section is generic).
- Terms of Service:
/{lang}/terms/serviceor/terms/service(if default locale is stripped). - Privacy Policy:
/{lang}/terms/privacyor/terms/privacy.
From your project root:
npx addon <repo> terms uninstallsrc/routes/[[lang]]/terms/service/+page.sveltesrc/routes/[[lang]]/terms/privacy/+page.svelte- Empty
terms/service,terms/privacy, andtermsdirectories.
| Flag | Short | Description |
|---|---|---|
--cache |
-c |
Use cache dir for repo. |
--dry-run |
-d |
No writes; scripts skipped. |
--no-scripts |
-ns |
Skip _scripts execution. |
Append #<ref> to the repo:
npx addon bchainhub/mota-addon-terms#v1.0.0 terms installLicensed under the MIT License.