Skip to content

Build your personal knowledge base with Trilium Notes

feat(website): add link to documentation

Elian Doran4954fa89b59d
diff --git a/apps/website2/src/components/Header.tsx b/apps/website2/src/components/Header.tsx
index 1a29d53183..8793f0eedd 100644
--- a/apps/website2/src/components/Header.tsx
+++ b/apps/website2/src/components/Header.tsx
@@ -2,6 +2,16 @@ import "./Header.css";
import { useLocation } from 'preact-iso';
import DownloadButton from './DownloadButton';
+interface HeaderLink {
+ url: string;
+ text: string;
+ external?: boolean;
+}
+
+const HEADER_LINKS: HeaderLink[] = [
+ { url: "https://docs.triliumnotes.org/", text: "Documentation", external: true }
+]
+
export function Header() {
const { url } = useLocation();
@@ -13,9 +23,13 @@ export function Header() {
</a>
<nav>
- <a href="/404" class={url == '/404' && 'active'}>
- 404
- </a>
+ {HEADER_LINKS.map(link => (
+ <a
+ href={link.url}
+ className={url === link.url && 'active'}
+ target={link.external && "_blank"}
+ >{link.text}</a>
+ ))}
</nav>
<DownloadButton />