Skip to content

Build your personal knowledge base with Trilium Notes

feat(website): FAQ accordion and scripting showcase section

Elian Doran41b8947bd8d2
diff --git a/apps/website/public/feature_scripting.webp b/apps/website/public/feature_scripting.webp
new file mode 100644
index 0000000000..471ede1ab2
Binary files /dev/null and b/apps/website/public/feature_scripting.webp differ
diff --git a/apps/website/src/assets/boxicons/bx-code-alt.svg b/apps/website/src/assets/boxicons/bx-code-alt.svg
new file mode 100644
index 0000000000..d4c58c30d1
--- /dev/null
+++ b/apps/website/src/assets/boxicons/bx-code-alt.svg
@@ -0,0 +1 @@
+<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><path d="m7.375 16.781 1.25-1.562L4.601 12l4.024-3.219-1.25-1.562-5 4a1 1 0 0 0 0 1.562l5 4zm9.25-9.562-1.25 1.562L19.399 12l-4.024 3.219 1.25 1.562 5-4a1 1 0 0 0 0-1.562l-5-4zm-1.649-4.003-4 18-1.953-.434 4-18z"/></svg>
\ No newline at end of file
diff --git a/apps/website/src/assets/boxicons/bx-layout.svg b/apps/website/src/assets/boxicons/bx-layout.svg
new file mode 100644
index 0000000000..a9bb76a339
--- /dev/null
+++ b/apps/website/src/assets/boxicons/bx-layout.svg
@@ -0,0 +1 @@
+<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><path d="M19 3H5c-1.103 0-2 .897-2 2v14c0 1.103.897 2 2 2h14c1.103 0 2-.897 2-2V5c0-1.103-.897-2-2-2zm0 2 .001 4H5V5h14zM5 11h8v8H5v-8zm10 8v-8h4.001l.001 8H15z"/></svg>
\ No newline at end of file
diff --git a/apps/website/src/assets/boxicons/bx-server.svg b/apps/website/src/assets/boxicons/bx-server.svg
new file mode 100644
index 0000000000..955337a2fc
--- /dev/null
+++ b/apps/website/src/assets/boxicons/bx-server.svg
@@ -0,0 +1 @@
+<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><path d="M20 3H4a2 2 0 0 0-2 2v4a2 2 0 0 0 2 2h16a2 2 0 0 0 2-2V5a2 2 0 0 0-2-2zM4 9V5h16v4zm16 4H4a2 2 0 0 0-2 2v4a2 2 0 0 0 2 2h16a2 2 0 0 0 2-2v-4a2 2 0 0 0-2-2zM4 19v-4h16v4z"/><path d="M17 6h2v2h-2zm-3 0h2v2h-2zm3 10h2v2h-2zm-3 0h2v2h-2z"/></svg>
\ No newline at end of file
diff --git a/apps/website/src/assets/boxicons/bx-window-alt.svg b/apps/website/src/assets/boxicons/bx-window-alt.svg
new file mode 100644
index 0000000000..3f41520ad2
--- /dev/null
+++ b/apps/website/src/assets/boxicons/bx-window-alt.svg
@@ -0,0 +1 @@
+<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><path d="M20 3H4c-1.103 0-2 .897-2 2v14c0 1.103.897 2 2 2h16c1.103 0 2-.897 2-2V5c0-1.103-.897-2-2-2zm0 2 .001 4H4V5h16zM4 19v-8h16.001l.001 8H4z"/><path d="M14 6h2v2h-2zm3 0h2v2h-2z"/></svg>
\ No newline at end of file
diff --git a/apps/website/src/pages/Home/index.css b/apps/website/src/pages/Home/index.css
index 02b69a6b93..a5f1d24148 100644
--- a/apps/website/src/pages/Home/index.css
+++ b/apps/website/src/pages/Home/index.css
@@ -170,14 +170,22 @@ section.organization .organization-cards {
gap: 1em;
}
-section.ai-integration .ai-integration-split {
+@media (max-width: 719.99px) {
+ section.organization .organization-screenshot img {
+ width: auto;
+ max-width: 100%;
+ max-height: 50vh;
+ }
+}
+
+.feature-split {
display: flex;
flex-direction: column;
gap: 2em;
align-items: center;
}
-section.ai-integration .ai-screenshot img {
+.feature-screenshot img {
display: block;
width: 100%;
height: auto;
@@ -185,7 +193,7 @@ section.ai-integration .ai-screenshot img {
box-shadow: 0 8px 24px rgba(0, 0, 0, 0.18);
}
-section.ai-integration .ai-cards {
+.feature-cards {
display: flex;
flex-direction: column;
gap: 1em;
@@ -217,18 +225,18 @@ section.ai-integration .ai-cards {
flex: 1;
}
- section.ai-integration .ai-integration-split {
+ .feature-split {
flex-direction: row;
align-items: center;
gap: 3em;
}
- section.ai-integration .ai-screenshot {
+ .feature-screenshot {
flex: 0 0 40%;
max-width: 420px;
}
- section.ai-integration .ai-cards {
+ .feature-cards {
flex: 1;
}
}
@@ -279,6 +287,69 @@ section.faq {
}
}
+.faq-list {
+ max-width: 46em;
+ margin: 0 auto;
+}
+
+.faq-item {
+ border-bottom: 1px solid color-mix(in srgb, var(--foreground-color) 12%, transparent);
+
+ summary {
+ display: flex;
+ align-items: center;
+ justify-content: space-between;
+ gap: 1em;
+ padding: 1em 0.25em;
+ cursor: pointer;
+ font-size: 1.05rem;
+ color: var(--foreground-color);
+ transition: color 0.15s ease;
+ /* Hide the native disclosure marker (Firefox + WebKit) */
+ list-style: none;
+
+ &::-webkit-details-marker {
+ display: none;
+ }
+
+ /* CSS-drawn chevron: points right when closed, down when open */
+ &::after {
+ content: "";
+ flex-shrink: 0;
+ width: 0.5em;
+ height: 0.5em;
+ margin-right: 0.35em;
+ border-right: 2px solid var(--muted-color);
+ border-bottom: 2px solid var(--muted-color);
+ transform: rotate(-45deg);
+ transition: transform 0.2s ease;
+ }
+
+ &:hover {
+ color: var(--brand-1);
+ }
+ }
+
+ &[open] summary::after {
+ transform: rotate(45deg);
+ }
+
+ .faq-answer {
+ padding: 0 0.25em 1.25em;
+ color: var(--muted-color);
+
+ @media (prefers-reduced-motion: no-preference) {
+ animation: showcase-fade 0.15s ease;
+ }
+ }
+}
+
+.faq-more {
+ margin-top: 2.5em;
+ text-align: center;
+ color: var(--muted-color);
+}
+
.tabbed-showcase {
display: grid;
gap: 1.5em;
diff --git a/apps/website/src/pages/Home/index.tsx b/apps/website/src/pages/Home/index.tsx
index b1b2febf20..cdc67c3c45 100644
--- a/apps/website/src/pages/Home/index.tsx
+++ b/apps/website/src/pages/Home/index.tsx
@@ -8,6 +8,7 @@ import botIcon from "../../assets/boxicons/bx-bot.svg?raw";
import calendarIcon from "../../assets/boxicons/bx-calendar.svg?raw";
import hoistingIcon from "../../assets/boxicons/bx-chevrons-up.svg?raw";
import codeIcon from "../../assets/boxicons/bx-code.svg?raw";
+import scriptApiIcon from "../../assets/boxicons/bx-code-alt.svg?raw";
import aiToolsIcon from "../../assets/boxicons/bx-cog.svg?raw";
import boardIcon from "../../assets/boxicons/bx-columns-3.svg?raw";
import dashboardIcon from "../../assets/boxicons/bx-dashboard.svg?raw";
@@ -19,6 +20,7 @@ import gitHubIcon from "../../assets/boxicons/bx-github.svg?raw";
import shareIcon from "../../assets/boxicons/bx-globe.svg?raw";
import revisionsIcon from "../../assets/boxicons/bx-history.svg?raw";
import apiKeyIcon from "../../assets/boxicons/bx-key.svg?raw";
+import widgetsIcon from "../../assets/boxicons/bx-layout.svg?raw";
import geomapIcon from "../../assets/boxicons/bx-map.svg?raw";
import mindmapIcon from "../../assets/boxicons/bx-network-chart.svg?raw";
import textNoteIcon from "../../assets/boxicons/bx-note.svg?raw";
@@ -27,11 +29,13 @@ import canvasIcon from "../../assets/boxicons/bx-pen.svg?raw";
import syncIcon from "../../assets/boxicons/bx-refresh-cw.svg?raw";
import searchIcon from "../../assets/boxicons/bx-search.svg?raw";
import jumpToIcon from "../../assets/boxicons/bx-send-alt.svg?raw";
+import backendIcon from "../../assets/boxicons/bx-server.svg?raw";
import protectedNotesIcon from "../../assets/boxicons/bx-shield.svg?raw";
import presentationIcon from "../../assets/boxicons/bx-slideshow.svg?raw";
import tableIcon from "../../assets/boxicons/bx-table.svg?raw";
import attributesIcon from "../../assets/boxicons/bx-tag.svg?raw";
import mermaidIcon from "../../assets/boxicons/bx-vector-square.svg?raw";
+import renderIcon from "../../assets/boxicons/bx-window-alt.svg?raw";
import markdownIcon from "../../assets/boxicons/bxs-markdown.svg?raw";
import anytypeIcon from "../../assets/import/anytype.svg?raw";
import evernoteIcon from "../../assets/import/evernote.svg?raw";
@@ -59,6 +63,7 @@ export function Home() {
<ExtensibilityBenefitsSection />
<ImportSection />
<CollectionsSection />
+ <ScriptingSection />
<AiIntegrationSection />
<FaqSection />
<FinalCta />
@@ -232,9 +237,8 @@ function ExtensibilityBenefitsSection() {
return (
<>
<Section className="benefits accented" title={t("extensibility_benefits.title")}>
- <div className="benefits-container grid-3-cols">
+ <div className="benefits-container grid-2-cols">
<Card iconSvg={shareIcon} title={t("extensibility_benefits.share_title")} moreInfoUrl="https://docs.triliumnotes.org/user-guide/advanced-usage/sharing">{t("extensibility_benefits.share_description")}</Card>
- <Card iconSvg={codeIcon} title={t("extensibility_benefits.scripting_title")} moreInfoUrl="https://docs.triliumnotes.org/user-guide/scripts">{t("extensibility_benefits.scripting_description")}</Card>
<Card iconSvg={restApiIcon} title={t("extensibility_benefits.api_title")} moreInfoUrl="https://docs.triliumnotes.org/user-guide/advanced-usage/etapi">{t("extensibility_benefits.api_description")}</Card>
</div>
</Section>
@@ -297,12 +301,12 @@ function CollectionsSection() {
function AiIntegrationSection() {
const { t } = useTranslation();
return (
- <Section className="benefits ai-integration" title={t("ai_integration.title")} subtitle={t("ai_integration.subtitle")} cta={{ text: t("ai_integration.learn_more"), href: "https://docs.triliumnotes.org/user-guide/llm" }}>
- <div className="ai-integration-split">
- <div className="ai-screenshot">
+ <Section className="benefits ai-integration accented" title={t("ai_integration.title")} subtitle={t("ai_integration.subtitle")} cta={{ text: t("ai_integration.learn_more"), href: "https://docs.triliumnotes.org/user-guide/llm" }}>
+ <div className="feature-split">
+ <div className="feature-screenshot">
<img src="/feature_llm.webp" alt={t("ai_integration.screenshot_alt")} loading="lazy" />
</div>
- <div className="benefits-container ai-cards">
+ <div className="benefits-container feature-cards">
<Card iconSvg={botIcon} title={t("ai_integration.chat_title")}>{t("ai_integration.chat_description")}</Card>
<Card iconSvg={aiToolsIcon} title={t("ai_integration.tools_title")}>{t("ai_integration.tools_description")}</Card>
<Card iconSvg={apiKeyIcon} title={t("ai_integration.providers_title")}>{t("ai_integration.providers_description")}</Card>
@@ -312,6 +316,25 @@ function AiIntegrationSection() {
);
}
+function ScriptingSection() {
+ const { t } = useTranslation();
+ return (
+ <Section className="benefits scripting" title={t("scripting.title")} subtitle={t("scripting.subtitle")} cta={{ text: t("scripting.learn_more"), href: "https://docs.triliumnotes.org/user-guide/scripts" }}>
+ <div className="feature-split">
+ <div className="feature-screenshot">
+ <img src="/feature_scripting.webp" alt={t("scripting.screenshot_alt")} loading="lazy" />
+ </div>
+ <div className="benefits-container feature-cards">
+ <Card iconSvg={widgetsIcon} title={t("scripting.widgets_title")}>{t("scripting.widgets_description")}</Card>
+ <Card iconSvg={backendIcon} title={t("scripting.backend_title")}>{t("scripting.backend_description")}</Card>
+ <Card iconSvg={renderIcon} title={t("scripting.render_title")}>{t("scripting.render_description")}</Card>
+ <Card iconSvg={scriptApiIcon} title={t("scripting.api_title")}>{t("scripting.api_description")}</Card>
+ </div>
+ </div>
+ </Section>
+ );
+}
+
function ImportSection() {
const { t } = useTranslation();
return (
@@ -385,7 +408,7 @@ function FaqSection() {
const { t } = useTranslation();
return (
<Section className="faq" title={t("faq.title")}>
- <div class="grid-2-cols">
+ <div className="faq-list">
<FaqItem question={t("faq.mobile_question")}>{t("faq.mobile_answer")}</FaqItem>
<FaqItem question={t("faq.database_question")}>{t("faq.database_answer")}</FaqItem>
<FaqItem question={t("faq.server_question")}>{t("faq.server_answer")}</FaqItem>
@@ -393,15 +416,25 @@ function FaqSection() {
<FaqItem question={t("faq.network_share_question")}>{t("faq.network_share_answer")}</FaqItem>
<FaqItem question={t("faq.security_question")}>{t("faq.security_answer")}</FaqItem>
</div>
+
+ <p className="faq-more">
+ <Trans
+ i18nKey="faq.more_questions"
+ components={[
+ <Link key="discussions" href="https://github.com/orgs/TriliumNext/discussions" openExternally />
+ ]}
+ />
+ </p>
</Section>
);
}
function FaqItem({ question, children }: { question: string; children: ComponentChildren }) {
return (
- <Card title={question}>
- {children}
- </Card>
+ <details className="faq-item">
+ <summary>{question}</summary>
+ <div className="faq-answer">{children}</div>
+ </details>
);
}
diff --git a/apps/website/src/translations/en/translation.json b/apps/website/src/translations/en/translation.json
index fe259ec36d..9ac3826f84 100644
--- a/apps/website/src/translations/en/translation.json
+++ b/apps/website/src/translations/en/translation.json
@@ -63,8 +63,6 @@
"title": "Sharing & extensibility",
"share_title": "Share notes on the web",
"share_description": "If you have a server, it can be used to share a subset of your notes with other people.",
- "scripting_title": "Advanced scripting",
- "scripting_description": "Build your own integrations within Trilium with custom widgets, or server-side logic.",
"api_title": "REST API",
"api_description": "Interact with Trilium programmatically using its builtin REST API."
},
@@ -114,6 +112,20 @@
"providers_description": "Connect OpenAI, Anthropic or Google with your own API key, or point Trilium at a self-hosted, OpenAI-compatible model. Expose your notes to external assistants over MCP.",
"learn_more": "Learn more"
},
+ "scripting": {
+ "title": "If you can imagine it, you can script it",
+ "subtitle": "Trilium isn't just a place to store notes, it's programmable. Write JavaScript that runs in the app or on the server, build your own interface, and automate your workflows, from a one-line tweak to a full custom app.",
+ "screenshot_alt": "A Trilium render note displaying an interactive analog clock built with a script",
+ "widgets_title": "Custom widgets",
+ "widgets_description": "Add your own buttons, panels and launcher widgets to Trilium's interface using frontend JavaScript.",
+ "backend_title": "Backend scripts & events",
+ "backend_description": "Run server-side scripts on a schedule or in response to events such as creating or changing a note.",
+ "render_title": "Render notes",
+ "render_description": "Build interactive dashboards and mini-apps that render right inside a note, like the clock shown here.",
+ "api_title": "Script API",
+ "api_description": "A typed API for notes, branches, attributes and search, available to both frontend and backend scripts.",
+ "learn_more": "Learn more about scripting"
+ },
"faq": {
"title": "Frequently Asked Questions",
"mobile_question": "Is there a mobile application?",
@@ -127,7 +139,8 @@
"network_share_question": "Can I share my database over a network drive?",
"network_share_answer": "No, it's generally not a good idea to share a SQLite database over a network drive. Although sometimes it might work, there are chances that the database will get corrupted due to imperfect file locks over a network.",
"security_question": "How is my data protected?",
- "security_answer": "By default, notes are not encrypted and can be read directly from the database. Once a note is marked as encrypted, the note is encrypted using AES-128-CBC."
+ "security_answer": "By default, notes are not encrypted and can be read directly from the database. Once a note is marked as encrypted, the note is encrypted using AES-128-CBC.",
+ "more_questions": "Still have questions? <0>Ask the community</0>"
},
"final_cta": {
"title": "Start building your knowledge base",