Merge remote-tracking branch 'origin/main' into react/type_widgets
; Conflicts: ; apps/client/src/widgets/react/hooks.tsx ; apps/client/src/widgets/type_widgets/abstract_text_type_widget.ts
@ -38,7 +38,7 @@
|
|||||||
"@playwright/test": "1.55.1",
|
"@playwright/test": "1.55.1",
|
||||||
"@stylistic/eslint-plugin": "5.4.0",
|
"@stylistic/eslint-plugin": "5.4.0",
|
||||||
"@types/express": "5.0.3",
|
"@types/express": "5.0.3",
|
||||||
"@types/node": "22.18.6",
|
"@types/node": "22.18.8",
|
||||||
"@types/yargs": "17.0.33",
|
"@types/yargs": "17.0.33",
|
||||||
"@vitest/coverage-v8": "3.2.4",
|
"@vitest/coverage-v8": "3.2.4",
|
||||||
"eslint": "9.36.0",
|
"eslint": "9.36.0",
|
||||||
|
|||||||
@ -41,7 +41,7 @@
|
|||||||
"draggabilly": "3.0.0",
|
"draggabilly": "3.0.0",
|
||||||
"force-graph": "1.51.0",
|
"force-graph": "1.51.0",
|
||||||
"globals": "16.4.0",
|
"globals": "16.4.0",
|
||||||
"i18next": "25.5.2",
|
"i18next": "25.5.3",
|
||||||
"i18next-http-backend": "3.0.2",
|
"i18next-http-backend": "3.0.2",
|
||||||
"jquery": "3.7.1",
|
"jquery": "3.7.1",
|
||||||
"jquery.fancytree": "2.38.5",
|
"jquery.fancytree": "2.38.5",
|
||||||
@ -53,7 +53,7 @@
|
|||||||
"mark.js": "8.11.1",
|
"mark.js": "8.11.1",
|
||||||
"marked": "16.3.0",
|
"marked": "16.3.0",
|
||||||
"mermaid": "11.12.0",
|
"mermaid": "11.12.0",
|
||||||
"mind-elixir": "5.2.1",
|
"mind-elixir": "5.3.1",
|
||||||
"normalize.css": "8.0.1",
|
"normalize.css": "8.0.1",
|
||||||
"panzoom": "9.4.3",
|
"panzoom": "9.4.3",
|
||||||
"preact": "10.27.2",
|
"preact": "10.27.2",
|
||||||
@ -73,8 +73,8 @@
|
|||||||
"@types/mark.js": "8.11.12",
|
"@types/mark.js": "8.11.12",
|
||||||
"@types/tabulator-tables": "6.2.11",
|
"@types/tabulator-tables": "6.2.11",
|
||||||
"copy-webpack-plugin": "13.0.1",
|
"copy-webpack-plugin": "13.0.1",
|
||||||
"happy-dom": "19.0.1",
|
"happy-dom": "19.0.2",
|
||||||
"script-loader": "0.7.2",
|
"script-loader": "0.7.2",
|
||||||
"vite-plugin-static-copy": "3.1.2"
|
"vite-plugin-static-copy": "3.1.3"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -21,6 +21,7 @@ import dayjs from "dayjs";
|
|||||||
import type NoteContext from "../components/note_context.js";
|
import type NoteContext from "../components/note_context.js";
|
||||||
import type NoteDetailWidget from "../widgets/note_detail.js";
|
import type NoteDetailWidget from "../widgets/note_detail.js";
|
||||||
import type Component from "../components/component.js";
|
import type Component from "../components/component.js";
|
||||||
|
import { formatLogMessage } from "@triliumnext/commons";
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* A whole number
|
* A whole number
|
||||||
@ -455,7 +456,7 @@ export interface Api {
|
|||||||
/**
|
/**
|
||||||
* Log given message to the log pane in UI
|
* Log given message to the log pane in UI
|
||||||
*/
|
*/
|
||||||
log(message: string): void;
|
log(message: string | object): void;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -696,7 +697,7 @@ function FrontendScriptApi(this: Api, startNote: FNote, currentNote: FNote, orig
|
|||||||
this.log = (message) => {
|
this.log = (message) => {
|
||||||
const { noteId } = this.startNote;
|
const { noteId } = this.startNote;
|
||||||
|
|
||||||
message = `${utils.now()}: ${message}`;
|
message = `${utils.now()}: ${formatLogMessage(message)}`;
|
||||||
|
|
||||||
console.log(`Script ${noteId}: ${message}`);
|
console.log(`Script ${noteId}: ${message}`);
|
||||||
|
|
||||||
|
|||||||
@ -35,8 +35,7 @@ async function getLinkIcon(noteId: string, viewMode: ViewMode | undefined) {
|
|||||||
return icon;
|
return icon;
|
||||||
}
|
}
|
||||||
|
|
||||||
// TODO: Remove `string` once all the view modes have been mapped.
|
export type ViewMode = "default" | "source" | "attachments" | "contextual-help";
|
||||||
type ViewMode = "default" | "source" | "attachments" | "contextual-help" | string;
|
|
||||||
|
|
||||||
export interface ViewScope {
|
export interface ViewScope {
|
||||||
/**
|
/**
|
||||||
|
|||||||
@ -119,11 +119,6 @@ describe("shortcuts", () => {
|
|||||||
metaKey: options.metaKey || false
|
metaKey: options.metaKey || false
|
||||||
} as KeyboardEvent);
|
} as KeyboardEvent);
|
||||||
|
|
||||||
it("should match simple key shortcuts", () => {
|
|
||||||
const event = createKeyboardEvent({ key: "a", code: "KeyA" });
|
|
||||||
expect(matchesShortcut(event, "a")).toBe(true);
|
|
||||||
});
|
|
||||||
|
|
||||||
it("should match shortcuts with modifiers", () => {
|
it("should match shortcuts with modifiers", () => {
|
||||||
const event = createKeyboardEvent({ key: "a", code: "KeyA", ctrlKey: true });
|
const event = createKeyboardEvent({ key: "a", code: "KeyA", ctrlKey: true });
|
||||||
expect(matchesShortcut(event, "ctrl+a")).toBe(true);
|
expect(matchesShortcut(event, "ctrl+a")).toBe(true);
|
||||||
@ -148,6 +143,20 @@ describe("shortcuts", () => {
|
|||||||
expect(matchesShortcut(event, "a")).toBe(false);
|
expect(matchesShortcut(event, "a")).toBe(false);
|
||||||
});
|
});
|
||||||
|
|
||||||
|
it("should not match when no modifiers are used", () => {
|
||||||
|
const event = createKeyboardEvent({ key: "a", code: "KeyA" });
|
||||||
|
expect(matchesShortcut(event, "a")).toBe(false);
|
||||||
|
});
|
||||||
|
|
||||||
|
it("should match function keys even with no modifiers", () => {
|
||||||
|
let event = createKeyboardEvent({ key: "F1", code: "F1" });
|
||||||
|
expect(matchesShortcut(event, "F1")).toBeTruthy();
|
||||||
|
expect(matchesShortcut(event, "f1")).toBeTruthy();
|
||||||
|
|
||||||
|
event = createKeyboardEvent({ key: "F1", code: "F1", shiftKey: true });
|
||||||
|
expect(matchesShortcut(event, "Shift+F1")).toBeTruthy();
|
||||||
|
});
|
||||||
|
|
||||||
it("should handle alternative modifier names", () => {
|
it("should handle alternative modifier names", () => {
|
||||||
const ctrlEvent = createKeyboardEvent({ key: "a", code: "KeyA", ctrlKey: true });
|
const ctrlEvent = createKeyboardEvent({ key: "a", code: "KeyA", ctrlKey: true });
|
||||||
expect(matchesShortcut(ctrlEvent, "control+a")).toBe(true);
|
expect(matchesShortcut(ctrlEvent, "control+a")).toBe(true);
|
||||||
|
|||||||
@ -172,6 +172,12 @@ export function matchesShortcut(e: KeyboardEvent, shortcut: string): boolean {
|
|||||||
const expectedShift = modifiers.includes('shift');
|
const expectedShift = modifiers.includes('shift');
|
||||||
const expectedMeta = modifiers.includes('meta') || modifiers.includes('cmd') || modifiers.includes('command');
|
const expectedMeta = modifiers.includes('meta') || modifiers.includes('cmd') || modifiers.includes('command');
|
||||||
|
|
||||||
|
// Refuse key combinations that don't include modifiers because they interfere with the normal usage of the application.
|
||||||
|
// Function keys are an exception.
|
||||||
|
if (!(expectedCtrl || expectedAlt || expectedShift || expectedMeta) && !/f\d+/.test(key)) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
return e.ctrlKey === expectedCtrl &&
|
return e.ctrlKey === expectedCtrl &&
|
||||||
e.altKey === expectedAlt &&
|
e.altKey === expectedAlt &&
|
||||||
e.shiftKey === expectedShift &&
|
e.shiftKey === expectedShift &&
|
||||||
|
|||||||
@ -279,7 +279,9 @@
|
|||||||
"preview_not_available": "La vista previa no está disponible para este tipo de notas.",
|
"preview_not_available": "La vista previa no está disponible para este tipo de notas.",
|
||||||
"diff_off": "Mostrar contenido",
|
"diff_off": "Mostrar contenido",
|
||||||
"diff_on": "Mostrar diferencia",
|
"diff_on": "Mostrar diferencia",
|
||||||
"diff_off_hint": "Haga clic para mostrar el contenido de la nota"
|
"diff_off_hint": "Haga clic para mostrar el contenido de la nota",
|
||||||
|
"diff_not_available": "Diferencias no disponibles.",
|
||||||
|
"diff_on_hint": "Haga clic para ver las diferencias"
|
||||||
},
|
},
|
||||||
"sort_child_notes": {
|
"sort_child_notes": {
|
||||||
"sort_children_by": "Ordenar hijos por...",
|
"sort_children_by": "Ordenar hijos por...",
|
||||||
@ -590,7 +592,18 @@
|
|||||||
"september": "Septiembre",
|
"september": "Septiembre",
|
||||||
"october": "Octubre",
|
"october": "Octubre",
|
||||||
"november": "Noviembre",
|
"november": "Noviembre",
|
||||||
"december": "Diciembre"
|
"december": "Diciembre",
|
||||||
|
"week": "Semana",
|
||||||
|
"week_previous": "Semana anterior",
|
||||||
|
"week_next": "Semana siguiente",
|
||||||
|
"month": "Mes",
|
||||||
|
"month_previous": "Mes anterior",
|
||||||
|
"month_next": "Mes siguiente",
|
||||||
|
"year": "Año",
|
||||||
|
"year_previous": "Año anterior",
|
||||||
|
"year_next": "Año siguiente",
|
||||||
|
"list": "Lista",
|
||||||
|
"today": "Hoy"
|
||||||
},
|
},
|
||||||
"close_pane_button": {
|
"close_pane_button": {
|
||||||
"close_this_pane": "Cerrar este panel"
|
"close_this_pane": "Cerrar este panel"
|
||||||
@ -751,7 +764,8 @@
|
|||||||
"book_properties": "Propiedades de colección",
|
"book_properties": "Propiedades de colección",
|
||||||
"table": "Tabla",
|
"table": "Tabla",
|
||||||
"geo-map": "Mapa Geo",
|
"geo-map": "Mapa Geo",
|
||||||
"board": "Tablero"
|
"board": "Tablero",
|
||||||
|
"include_archived_notes": "Mostrar notas archivadas"
|
||||||
},
|
},
|
||||||
"edited_notes": {
|
"edited_notes": {
|
||||||
"no_edited_notes_found": "Aún no hay notas editadas en este día...",
|
"no_edited_notes_found": "Aún no hay notas editadas en este día...",
|
||||||
|
|||||||
@ -15,6 +15,9 @@
|
|||||||
},
|
},
|
||||||
"widget-error": {
|
"widget-error": {
|
||||||
"title": "Widgetin luonti epäonnistui"
|
"title": "Widgetin luonti epäonnistui"
|
||||||
|
},
|
||||||
|
"bundle-error": {
|
||||||
|
"title": "Mukautetun skriptin lataus epäonnistui"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"add_link": {
|
"add_link": {
|
||||||
|
|||||||
@ -587,7 +587,18 @@
|
|||||||
"october": "Octobre",
|
"october": "Octobre",
|
||||||
"november": "Novembre",
|
"november": "Novembre",
|
||||||
"december": "Décembre",
|
"december": "Décembre",
|
||||||
"cannot_find_week_note": "Impossible de trouver la note de la semaine"
|
"cannot_find_week_note": "Impossible de trouver la note de la semaine",
|
||||||
|
"week": "Semaine",
|
||||||
|
"week_previous": "Semaine précédente",
|
||||||
|
"week_next": "Semaine suivante",
|
||||||
|
"month": "Mois",
|
||||||
|
"month_previous": "Mois précédent",
|
||||||
|
"month_next": "Mois suivant",
|
||||||
|
"year": "Année",
|
||||||
|
"year_previous": "Année précédente",
|
||||||
|
"year_next": "Année suivante",
|
||||||
|
"list": "Liste",
|
||||||
|
"today": "Aujourd'hui"
|
||||||
},
|
},
|
||||||
"close_pane_button": {
|
"close_pane_button": {
|
||||||
"close_this_pane": "Fermer ce volet"
|
"close_this_pane": "Fermer ce volet"
|
||||||
@ -732,7 +743,8 @@
|
|||||||
"note_type": "Type de note",
|
"note_type": "Type de note",
|
||||||
"editable": "Modifiable",
|
"editable": "Modifiable",
|
||||||
"basic_properties": "Propriétés de base",
|
"basic_properties": "Propriétés de base",
|
||||||
"language": "Langage"
|
"language": "Langage",
|
||||||
|
"configure_code_notes": "Configurer les notes de code..."
|
||||||
},
|
},
|
||||||
"book_properties": {
|
"book_properties": {
|
||||||
"view_type": "Type d'affichage",
|
"view_type": "Type d'affichage",
|
||||||
@ -747,7 +759,8 @@
|
|||||||
"book_properties": "Propriétés de la collection",
|
"book_properties": "Propriétés de la collection",
|
||||||
"table": "Tableau",
|
"table": "Tableau",
|
||||||
"geo-map": "Carte géographique",
|
"geo-map": "Carte géographique",
|
||||||
"board": "Tableau de bord"
|
"board": "Tableau de bord",
|
||||||
|
"include_archived_notes": "Afficher les notes archivées"
|
||||||
},
|
},
|
||||||
"edited_notes": {
|
"edited_notes": {
|
||||||
"no_edited_notes_found": "Aucune note modifiée ce jour-là...",
|
"no_edited_notes_found": "Aucune note modifiée ce jour-là...",
|
||||||
@ -948,7 +961,9 @@
|
|||||||
"no_attachments": "Cette note ne contient aucune pièce jointe."
|
"no_attachments": "Cette note ne contient aucune pièce jointe."
|
||||||
},
|
},
|
||||||
"book": {
|
"book": {
|
||||||
"no_children_help": "Cette note de type Livre n'a aucune note enfant, donc il n'y a rien à afficher. Consultez le <a href=\"https://triliumnext.github.io/Docs/Wiki/book-note.html\">wiki</a> pour plus de détails."
|
"no_children_help": "Cette note de type Livre n'a aucune note enfant, donc il n'y a rien à afficher. Consultez le <a href=\"https://triliumnext.github.io/Docs/Wiki/book-note.html\">wiki</a> pour plus de détails.",
|
||||||
|
"drag_locked_title": "Edition verrouillée",
|
||||||
|
"drag_locked_message": "Le glisser-déposer n'est pas autorisé car l'édition de cette collection est verrouillé."
|
||||||
},
|
},
|
||||||
"editable_code": {
|
"editable_code": {
|
||||||
"placeholder": "Saisir le contenu de votre note de code ici..."
|
"placeholder": "Saisir le contenu de votre note de code ici..."
|
||||||
@ -1690,6 +1705,72 @@
|
|||||||
"anthropic_configuration": "Configuration Anthropic",
|
"anthropic_configuration": "Configuration Anthropic",
|
||||||
"voyage_configuration": "Configuration IA Voyage",
|
"voyage_configuration": "Configuration IA Voyage",
|
||||||
"voyage_url_description": "Défaut: https://api.voyageai.com/v1",
|
"voyage_url_description": "Défaut: https://api.voyageai.com/v1",
|
||||||
"ollama_configuration": "Configuration Ollama"
|
"ollama_configuration": "Configuration Ollama",
|
||||||
|
"total_notes": "Notes totales",
|
||||||
|
"progress": "Progrès",
|
||||||
|
"queued_notes": "Notes dans la file d'attente",
|
||||||
|
"refresh_stats": "Rafraîchir les statistiques",
|
||||||
|
"enable_ai_features": "Activer les fonctionnalités IA/LLM",
|
||||||
|
"enable_ai_description": "Activer les fonctionnalités IA telles que le résumé des notes, la génération de contenu et autres fonctionnalités LLM",
|
||||||
|
"openai_tab": "OpenAI",
|
||||||
|
"anthropic_tab": "Anthropic",
|
||||||
|
"voyage_tab": "Voyage AI",
|
||||||
|
"ollama_tab": "Ollama",
|
||||||
|
"enable_ai": "Activer les fonctionnalités IA/LLM",
|
||||||
|
"enable_ai_desc": "Activer les fonctionnalités IA telles que le résumé des notes, la génération de contenu et autres fonctionnalités LLM",
|
||||||
|
"provider_configuration": "Configuration du fournisseur IA",
|
||||||
|
"provider_precedence_description": "Liste de fournisseurs séparés par virgule, par ordre de préférence (ex. 'openai,anthopic,ollama')",
|
||||||
|
"temperature": "Température",
|
||||||
|
"temperature_description": "Contrôle de l'aléatoirité dans les réponses (0 = déterministe, 2 = hasard maximum)",
|
||||||
|
"system_prompt": "Prompt système",
|
||||||
|
"system_prompt_description": "Prompt système par défaut pour toutes les intéractions IA",
|
||||||
|
"openai_configuration": "Configuration OpenAI",
|
||||||
|
"openai_settings": "Options OpenAI",
|
||||||
|
"api_key": "Clef API",
|
||||||
|
"url": "URL de base",
|
||||||
|
"model": "Modèle",
|
||||||
|
"openai_api_key_description": "Votre clef API OpenAI pour accéder à leurs services IA",
|
||||||
|
"anthropic_api_key_description": "Votre clef API Anthropic pour accéder aux modèles Claude",
|
||||||
|
"default_model": "Modèle par défaut",
|
||||||
|
"openai_model_description": "Exemples : gpt-4o, gpt-4-turbo, gpt-3.5-turbo",
|
||||||
|
"base_url": "URL de base",
|
||||||
|
"openai_url_description": "Défaut : https://api.openai.com/v1",
|
||||||
|
"anthropic_settings": "Réglages Anthropic",
|
||||||
|
"enable_ollama": "Activer Ollama",
|
||||||
|
"enable_ollama_description": "Activer Ollama comme modèle d'IA local",
|
||||||
|
"ollama_url": "URL Ollama",
|
||||||
|
"ollama_model": "Modèle Ollama",
|
||||||
|
"refresh_models": "Rafraîchir les modèles",
|
||||||
|
"refreshing_models": "Mise à jour...",
|
||||||
|
"enable_automatic_indexing": "Activer l'indexage automatique",
|
||||||
|
"rebuild_index": "Rafraîchir l'index",
|
||||||
|
"rebuild_index_error": "Erreur dans le démarrage du rafraichissement de l'index. Veuillez consulter les logs pour plus de détails.",
|
||||||
|
"note_title": "Titre de la note",
|
||||||
|
"error": "Erreur",
|
||||||
|
"last_attempt": "Dernier essai",
|
||||||
|
"actions": "Actions",
|
||||||
|
"retry": "Réessayer",
|
||||||
|
"partial": "Complété à {{ percentage }}%",
|
||||||
|
"retry_queued": "Note ajoutée à la file d'attente",
|
||||||
|
"retry_failed": "Echec de l'ajout de la note à la file d'attente",
|
||||||
|
"max_notes_per_llm_query": "Notes maximum par requête",
|
||||||
|
"max_notes_per_llm_query_description": "Nombre maximum de notes similaires à inclure dans le contexte IA",
|
||||||
|
"active_providers": "Fournisseurs actifs",
|
||||||
|
"disabled_providers": "Fournisseurs désactivés",
|
||||||
|
"remove_provider": "Retirer le fournisseur de la recherche",
|
||||||
|
"similarity_threshold": "Seuil de similarité",
|
||||||
|
"similarity_threshold_description": "Seuil de similarité minimum (0-1) pour que inclure les notes dans le contexte d'une requête IA",
|
||||||
|
"reprocess_index": "Rafraîchir l'index de recherche",
|
||||||
|
"reprocessing_index": "Mise à jour...",
|
||||||
|
"reprocess_index_started": "L'optimisation de l'indice de recherche à commencer en arrière-plan",
|
||||||
|
"reprocess_index_error": "Erreur dans le rafraichissement de l'indice de recherche"
|
||||||
|
},
|
||||||
|
"ui-performance": {
|
||||||
|
"title": "Performance",
|
||||||
|
"enable-motion": "Activer les transitions et animations",
|
||||||
|
"enable-shadows": "Activer les ombres",
|
||||||
|
"enable-backdrop-effects": "Activer les effets d'arrière plan pour les menus, popups et panneaux",
|
||||||
|
"enable-smooth-scroll": "Active le défilement fluide",
|
||||||
|
"app-restart-required": "(redémarrer l'application pour appliquer les changements)"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -31,7 +31,7 @@
|
|||||||
"link_title_mirrors": "il titolo del collegamento rispecchia il titolo della nota corrente",
|
"link_title_mirrors": "il titolo del collegamento rispecchia il titolo della nota corrente",
|
||||||
"link_title_arbitrary": "il titolo del collegamento può essere modificato arbitrariamente",
|
"link_title_arbitrary": "il titolo del collegamento può essere modificato arbitrariamente",
|
||||||
"link_title": "Titolo del collegamento",
|
"link_title": "Titolo del collegamento",
|
||||||
"button_add_link": "Aggiungi il collegamento <kbd>invio</kbd>",
|
"button_add_link": "Aggiungi il collegamento",
|
||||||
"help_on_links": "Aiuto sui collegamenti"
|
"help_on_links": "Aiuto sui collegamenti"
|
||||||
},
|
},
|
||||||
"branch_prefix": {
|
"branch_prefix": {
|
||||||
|
|||||||
1
apps/client/src/translations/nb-NO/translation.json
Normal file
@ -0,0 +1 @@
|
|||||||
|
{}
|
||||||
@ -1587,7 +1587,9 @@
|
|||||||
"ws": {
|
"ws": {
|
||||||
"consistency-checks-failed": "Au fost identificate erori de consistență! Vedeți mai multe detalii în loguri.",
|
"consistency-checks-failed": "Au fost identificate erori de consistență! Vedeți mai multe detalii în loguri.",
|
||||||
"encountered-error": "A fost întâmpinată o eroare: „{{message}}”. Vedeți în loguri pentru mai multe detalii.",
|
"encountered-error": "A fost întâmpinată o eroare: „{{message}}”. Vedeți în loguri pentru mai multe detalii.",
|
||||||
"sync-check-failed": "Verificările de sincronizare au eșuat!"
|
"sync-check-failed": "Verificările de sincronizare au eșuat!",
|
||||||
|
"lost-websocket-connection-title": "S-a pierdut conexiunea la server",
|
||||||
|
"lost-websocket-connection-message": "Verificați configurația reverse proxy-ului (e.g. nginx sau Apache) astfel încât să permită comunicarea prin WebSocket."
|
||||||
},
|
},
|
||||||
"hoisted_note": {
|
"hoisted_note": {
|
||||||
"confirm_unhoisting": "Notița dorită „{{requestedNote}}” este în afara ierarhiei notiței focalizate „{{hoistedNote}}”. Doriți defocalizarea pentru a accesa notița?"
|
"confirm_unhoisting": "Notița dorită „{{requestedNote}}” este în afara ierarhiei notiței focalizate „{{hoistedNote}}”. Doriți defocalizarea pentru a accesa notița?"
|
||||||
@ -1668,7 +1670,7 @@
|
|||||||
},
|
},
|
||||||
"electron_integration": {
|
"electron_integration": {
|
||||||
"background-effects": "Activează efectele de fundal (doar pentru Windows 11)",
|
"background-effects": "Activează efectele de fundal (doar pentru Windows 11)",
|
||||||
"background-effects-description": "Efectul Mica adaugă un fundal estompat și elegant ferestrelor aplicațiilor, creând profunzime și un aspect modern.",
|
"background-effects-description": "Efectul Mica adaugă un fundal estompat și elegant ferestrelor aplicațiilor, creând profunzime și un aspect modern. Opțiunea „Bară de titlu nativă” trebuie să fie dezactivată.",
|
||||||
"desktop-application": "Aplicația desktop",
|
"desktop-application": "Aplicația desktop",
|
||||||
"native-title-bar": "Bară de titlu nativă",
|
"native-title-bar": "Bară de titlu nativă",
|
||||||
"native-title-bar-description": "Pentru Windows și macOS, dezactivarea bării de titlu native face aplicația să pară mai compactă. Pe Linux, păstrarea bării integrează mai bine aplicația cu restul sistemului de operare.",
|
"native-title-bar-description": "Pentru Windows și macOS, dezactivarea bării de titlu native face aplicația să pară mai compactă. Pe Linux, păstrarea bării integrează mai bine aplicația cu restul sistemului de operare.",
|
||||||
@ -1956,7 +1958,11 @@
|
|||||||
"editorfeatures": {
|
"editorfeatures": {
|
||||||
"title": "Funcții",
|
"title": "Funcții",
|
||||||
"emoji_completion_enabled": "Activează auto-completarea pentru emoji-uri",
|
"emoji_completion_enabled": "Activează auto-completarea pentru emoji-uri",
|
||||||
"note_completion_enabled": "Activează auto-completarea pentru notițe"
|
"note_completion_enabled": "Activează auto-completarea pentru notițe",
|
||||||
|
"emoji_completion_description": "Dacă această funcție este pornită, emoji-urile pot fi inserate rapid prin tastarea caracterului „:”, urmat de denumirea emoji-ului.",
|
||||||
|
"note_completion_description": "Dacă această funcție este pornită, se pot crea ușor legături către notițe prin tastarea „@”, urmată de titlul notiței dorite.",
|
||||||
|
"slash_commands_enabled": "Activează comenzi rapide prin tasta slash",
|
||||||
|
"slash_commands_description": "Dacă această funcție este pornită, se poate folosi tasta „/” pentru a rula rapid comenzi de editare precum inserarea de întreruperi de pagină sau titluri."
|
||||||
},
|
},
|
||||||
"table_view": {
|
"table_view": {
|
||||||
"new-row": "Rând nou",
|
"new-row": "Rând nou",
|
||||||
|
|||||||
@ -529,7 +529,7 @@
|
|||||||
"run_on_branch_creation": "выполняется при создании ветви. Ветвь — это связующее звено между родительской и дочерней заметками и создаётся, например, при клонировании или перемещении заметки.",
|
"run_on_branch_creation": "выполняется при создании ветви. Ветвь — это связующее звено между родительской и дочерней заметками и создаётся, например, при клонировании или перемещении заметки.",
|
||||||
"run_on_branch_change": "выполняется при обновлении ветки.",
|
"run_on_branch_change": "выполняется при обновлении ветки.",
|
||||||
"run_on_attribute_creation": "выполняется, когда создается новый атрибут для заметки, определяющей это отношение",
|
"run_on_attribute_creation": "выполняется, когда создается новый атрибут для заметки, определяющей это отношение",
|
||||||
"run_on_attribute_change": "выполняется при изменении атрибута заметки, определяющей это отношение. Также срабатывает при удалении атрибута",
|
"run_on_attribute_change": " выполняется при изменении атрибута заметки, определяющей это отношение. Также срабатывает при удалении атрибута",
|
||||||
"relation_template": "атрибуты заметки будут унаследованы даже без родительско-дочерних отношений. Содержимое заметки и её поддерево будут добавлены к экземпляру заметки, если оно пустое. Подробности см. в документации.",
|
"relation_template": "атрибуты заметки будут унаследованы даже без родительско-дочерних отношений. Содержимое заметки и её поддерево будут добавлены к экземпляру заметки, если оно пустое. Подробности см. в документации.",
|
||||||
"inherit": "атрибуты заметки будут унаследованы даже без родительско-дочерних отношений. См. описание шаблонных отношений для получения аналогичной информации. См. раздел «Наследование атрибутов» в документации.",
|
"inherit": "атрибуты заметки будут унаследованы даже без родительско-дочерних отношений. См. описание шаблонных отношений для получения аналогичной информации. См. раздел «Наследование атрибутов» в документации.",
|
||||||
"render_note": "заметки типа «Рендер HTML» будут отображаться с использованием кодовой заметки (HTML или скрипта), и необходимо указать с помощью этой связи, какую заметку следует отобразить",
|
"render_note": "заметки типа «Рендер HTML» будут отображаться с использованием кодовой заметки (HTML или скрипта), и необходимо указать с помощью этой связи, какую заметку следует отобразить",
|
||||||
@ -585,7 +585,11 @@
|
|||||||
"editorfeatures": {
|
"editorfeatures": {
|
||||||
"note_completion_enabled": "Включить автодополнение",
|
"note_completion_enabled": "Включить автодополнение",
|
||||||
"emoji_completion_enabled": "Включить автодополнение эмодзи",
|
"emoji_completion_enabled": "Включить автодополнение эмодзи",
|
||||||
"title": "Особенности"
|
"title": "Особенности",
|
||||||
|
"slash_commands_description": "Если эта опция включена, команды редактирования, такие как вставка переносов строк или заголовков, можно переключать, вводя `/`.",
|
||||||
|
"slash_commands_enabled": "Включить слэш-команды",
|
||||||
|
"note_completion_description": "Если эта опция включена, ссылки на заметки можно создавать, вводя `@`, а затем название заметки.",
|
||||||
|
"emoji_completion_description": "Если эта функция включена, эмодзи можно легко вставлять в текст, набрав `:`, а затем название эмодзи."
|
||||||
},
|
},
|
||||||
"cpu_arch_warning": {
|
"cpu_arch_warning": {
|
||||||
"dont_show_again": "Больше не показывать это предупреждение",
|
"dont_show_again": "Больше не показывать это предупреждение",
|
||||||
|
|||||||
@ -1669,7 +1669,9 @@
|
|||||||
"ws": {
|
"ws": {
|
||||||
"sync-check-failed": "Перевірка синхронізації не вдалася!",
|
"sync-check-failed": "Перевірка синхронізації не вдалася!",
|
||||||
"consistency-checks-failed": "Перевірка узгодженості не вдалася! Див. logs для отримання інформації.",
|
"consistency-checks-failed": "Перевірка узгодженості не вдалася! Див. logs для отримання інформації.",
|
||||||
"encountered-error": "Виникла помилка \"{{message}}\", перевірте консоль."
|
"encountered-error": "Виникла помилка \"{{message}}\", перевірте консоль.",
|
||||||
|
"lost-websocket-connection-title": "Втрачено з'єднання із сервером",
|
||||||
|
"lost-websocket-connection-message": "Перевірте конфігурацію вашого зворотного проксі-сервера (наприклад, nginx або Apache), щоб переконатися, що з’єднання WebSocket належним чином дозволені та не блокуються."
|
||||||
},
|
},
|
||||||
"hoisted_note": {
|
"hoisted_note": {
|
||||||
"confirm_unhoisting": "Запитана нотатка '{{requestedNote}}' знаходиться поза піддеревом закріплених нотаток '{{hoistedNote}}', і вам потрібно відкріпити нотатку, щоб отримати до неї доступ. Ви хочете продовжити відкріплення?"
|
"confirm_unhoisting": "Запитана нотатка '{{requestedNote}}' знаходиться поза піддеревом закріплених нотаток '{{hoistedNote}}', і вам потрібно відкріпити нотатку, щоб отримати до неї доступ. Ви хочете продовжити відкріплення?"
|
||||||
@ -1797,7 +1799,11 @@
|
|||||||
"editorfeatures": {
|
"editorfeatures": {
|
||||||
"title": "Особливості",
|
"title": "Особливості",
|
||||||
"emoji_completion_enabled": "Увімкнути автозаповнення емодзі",
|
"emoji_completion_enabled": "Увімкнути автозаповнення емодзі",
|
||||||
"note_completion_enabled": "Увімкнути автозаповнення нотаток"
|
"note_completion_enabled": "Увімкнути автозаповнення нотаток",
|
||||||
|
"emoji_completion_description": "Якщо цю функцію ввімкнено, емодзі можна легко вставляти в текст, ввівши `:`, а потім назву емодзі.",
|
||||||
|
"note_completion_description": "Якщо ввімкнено, посилання на нотатки можна створювати, вводячи `@`, а потім назву нотатки.",
|
||||||
|
"slash_commands_enabled": "Увімкнути команди зі слеш",
|
||||||
|
"slash_commands_description": "Якщо ввімкнено, команди редагування, такі як вставка розривів рядків або заголовків, можна перемикати, натискаючи `/`."
|
||||||
},
|
},
|
||||||
"table_view": {
|
"table_view": {
|
||||||
"new-row": "Новий рядок",
|
"new-row": "Новий рядок",
|
||||||
|
|||||||
@ -136,7 +136,7 @@ ws.subscribeToMessages(async (message) => {
|
|||||||
id: id,
|
id: id,
|
||||||
title: t("export.export_status"),
|
title: t("export.export_status"),
|
||||||
message: message,
|
message: message,
|
||||||
icon: "arrow-square-up-right"
|
icon: "export"
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -43,6 +43,6 @@
|
|||||||
"@electron-forge/maker-squirrel": "7.9.0",
|
"@electron-forge/maker-squirrel": "7.9.0",
|
||||||
"@electron-forge/maker-zip": "7.9.0",
|
"@electron-forge/maker-zip": "7.9.0",
|
||||||
"@electron-forge/plugin-auto-unpack-natives": "7.9.0",
|
"@electron-forge/plugin-auto-unpack-natives": "7.9.0",
|
||||||
"prebuild-install": "^7.1.1"
|
"prebuild-install": "7.1.3"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -5,15 +5,15 @@
|
|||||||
"private": true,
|
"private": true,
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"better-sqlite3": "12.4.1",
|
"better-sqlite3": "12.4.1",
|
||||||
"mime-types": "^3.0.0",
|
"mime-types": "3.0.1",
|
||||||
"sanitize-filename": "^1.6.3",
|
"sanitize-filename": "1.6.3",
|
||||||
"tsx": "^4.19.3",
|
"tsx": "4.20.6",
|
||||||
"yargs": "^18.0.0"
|
"yargs": "18.0.0"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@types/better-sqlite3": "^7.6.11",
|
"@types/better-sqlite3": "7.6.13",
|
||||||
"@types/mime-types": "^3.0.0",
|
"@types/mime-types": "3.0.1",
|
||||||
"@types/yargs": "^17.0.33"
|
"@types/yargs": "17.0.33"
|
||||||
},
|
},
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"dev": "tsx src/main.ts",
|
"dev": "tsx src/main.ts",
|
||||||
|
|||||||
@ -6,6 +6,6 @@
|
|||||||
"e2e": "playwright test"
|
"e2e": "playwright test"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"dotenv": "17.2.2"
|
"dotenv": "17.2.3"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -29,7 +29,7 @@
|
|||||||
"node-html-parser": "7.0.1"
|
"node-html-parser": "7.0.1"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@anthropic-ai/sdk": "0.64.0",
|
"@anthropic-ai/sdk": "0.65.0",
|
||||||
"@braintree/sanitize-url": "7.1.1",
|
"@braintree/sanitize-url": "7.1.1",
|
||||||
"@electron/remote": "2.1.3",
|
"@electron/remote": "2.1.3",
|
||||||
"@preact/preset-vite": "2.10.2",
|
"@preact/preset-vite": "2.10.2",
|
||||||
@ -87,7 +87,7 @@
|
|||||||
"escape-html": "1.0.3",
|
"escape-html": "1.0.3",
|
||||||
"express": "5.1.0",
|
"express": "5.1.0",
|
||||||
"express-http-proxy": "2.1.2",
|
"express-http-proxy": "2.1.2",
|
||||||
"express-openid-connect": "^2.17.1",
|
"express-openid-connect": "2.19.2",
|
||||||
"express-rate-limit": "8.1.0",
|
"express-rate-limit": "8.1.0",
|
||||||
"express-session": "1.18.2",
|
"express-session": "1.18.2",
|
||||||
"file-uri-to-path": "2.0.0",
|
"file-uri-to-path": "2.0.0",
|
||||||
@ -97,7 +97,7 @@
|
|||||||
"html2plaintext": "2.1.4",
|
"html2plaintext": "2.1.4",
|
||||||
"http-proxy-agent": "7.0.2",
|
"http-proxy-agent": "7.0.2",
|
||||||
"https-proxy-agent": "7.0.6",
|
"https-proxy-agent": "7.0.6",
|
||||||
"i18next": "25.5.2",
|
"i18next": "25.5.3",
|
||||||
"i18next-fs-backend": "2.6.0",
|
"i18next-fs-backend": "2.6.0",
|
||||||
"image-type": "6.0.0",
|
"image-type": "6.0.0",
|
||||||
"ini": "5.0.0",
|
"ini": "5.0.0",
|
||||||
@ -110,7 +110,7 @@
|
|||||||
"multer": "2.0.2",
|
"multer": "2.0.2",
|
||||||
"normalize-strings": "1.1.1",
|
"normalize-strings": "1.1.1",
|
||||||
"ollama": "0.6.0",
|
"ollama": "0.6.0",
|
||||||
"openai": "5.12.0",
|
"openai": "6.1.0",
|
||||||
"rand-token": "1.0.1",
|
"rand-token": "1.0.1",
|
||||||
"safe-compare": "1.1.4",
|
"safe-compare": "1.1.4",
|
||||||
"sanitize-filename": "1.6.3",
|
"sanitize-filename": "1.6.3",
|
||||||
@ -123,11 +123,11 @@
|
|||||||
"supertest": "7.1.4",
|
"supertest": "7.1.4",
|
||||||
"swagger-jsdoc": "6.2.8",
|
"swagger-jsdoc": "6.2.8",
|
||||||
"swagger-ui-express": "5.0.1",
|
"swagger-ui-express": "5.0.1",
|
||||||
"time2fa": "^1.3.0",
|
"time2fa": "1.4.2",
|
||||||
"tmp": "0.2.5",
|
"tmp": "0.2.5",
|
||||||
"turndown": "7.2.1",
|
"turndown": "7.2.1",
|
||||||
"unescape": "1.0.1",
|
"unescape": "1.0.1",
|
||||||
"vite": "^7.1.3",
|
"vite": "7.1.9",
|
||||||
"ws": "8.18.3",
|
"ws": "8.18.3",
|
||||||
"xml2js": "0.6.2",
|
"xml2js": "0.6.2",
|
||||||
"yauzl": "3.2.0"
|
"yauzl": "3.2.0"
|
||||||
|
|||||||
2
apps/server/src/assets/doc_notes/en/User Guide/!!!meta.json
generated
vendored
@ -1,6 +1,11 @@
|
|||||||
<p>Trilium supports configuration via a file named <code>config.ini</code> and
|
<p>Trilium supports configuration via a file named <code>config.ini</code> and
|
||||||
environment variables. This document provides a comprehensive reference
|
environment variables. This document provides a comprehensive reference
|
||||||
for all configuration options.</p>
|
for all configuration options.</p>
|
||||||
|
<h2>Location of the configuration file</h2>
|
||||||
|
<p>The configuration file is not located in the same directory as the application.
|
||||||
|
Instead, the <code>config.ini</code> is located in the <a class="reference-link"
|
||||||
|
href="#root/_help_tAassRL4RSQL">Data directory</a>. As such, the configuration
|
||||||
|
file is only available after starting the application and creating a database.</p>
|
||||||
<h2>Configuration Precedence</h2>
|
<h2>Configuration Precedence</h2>
|
||||||
<p>Configuration values are loaded in the following order of precedence (highest
|
<p>Configuration values are loaded in the following order of precedence (highest
|
||||||
to lowest):</p>
|
to lowest):</p>
|
||||||
|
|||||||
82
apps/server/src/assets/doc_notes/en/User Guide/User Guide/Advanced Usage/Sharing.html
generated
vendored
@ -38,16 +38,17 @@ class="image">
|
|||||||
</th>
|
</th>
|
||||||
<td>
|
<td>
|
||||||
<ul>
|
<ul>
|
||||||
<li>Table of contents.</li>
|
<li data-list-item-id="e26b4ce9ba4e9dfe224d04e0f341925ed">Table of contents.</li>
|
||||||
<li>Syntax highlight of code blocks, provided a language is selected (does
|
<li data-list-item-id="e9707fdfa2c92d66690cf932f7e647253">Syntax highlight of code blocks, provided a language is selected (does
|
||||||
not work if “Auto-detected” is enabled).</li>
|
not work if “Auto-detected” is enabled).</li>
|
||||||
<li>Rendering for math equations.</li>
|
<li data-list-item-id="e84420a10c6d64bd107edb6e867c91d4b">Rendering for math equations.</li>
|
||||||
|
<li data-list-item-id="e10834dcd0619d77ae2e94d3695bedf58"><a href="#root/_help_nBAXQFj20hS1">Including notes</a> (only if the included
|
||||||
|
notes are also shared).</li>
|
||||||
</ul>
|
</ul>
|
||||||
</td>
|
</td>
|
||||||
<td>
|
<td>
|
||||||
<ul>
|
<ul>
|
||||||
<li>Including notes is not supported.</li>
|
<li data-list-item-id="e41cc4139377f9f88d653d1eb8ca47bb4">Inline Mermaid diagrams are not rendered.</li>
|
||||||
<li>Inline Mermaid diagrams are not rendered.</li>
|
|
||||||
</ul>
|
</ul>
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
@ -56,12 +57,12 @@ class="image">
|
|||||||
</th>
|
</th>
|
||||||
<td>
|
<td>
|
||||||
<ul>
|
<ul>
|
||||||
<li>Basic support (displaying the contents of the note in a monospace font).</li>
|
<li data-list-item-id="e291ae6d5130677b4c99f7c3bdbe974b4">Basic support (displaying the contents of the note in a monospace font).</li>
|
||||||
</ul>
|
</ul>
|
||||||
</td>
|
</td>
|
||||||
<td>
|
<td>
|
||||||
<ul>
|
<ul>
|
||||||
<li>No syntax highlight.</li>
|
<li data-list-item-id="e0270680bbdd7a129306e61e11691e36d">No syntax highlight.</li>
|
||||||
</ul>
|
</ul>
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
@ -94,12 +95,12 @@ class="image">
|
|||||||
</th>
|
</th>
|
||||||
<td>
|
<td>
|
||||||
<ul>
|
<ul>
|
||||||
<li>The child notes are displayed in a fixed format. </li>
|
<li data-list-item-id="ea031e1d4149eb443ace756234490c5a4">The child notes are displayed in a fixed format. </li>
|
||||||
</ul>
|
</ul>
|
||||||
</td>
|
</td>
|
||||||
<td>
|
<td>
|
||||||
<ul>
|
<ul>
|
||||||
<li>More advanced view types such as the calendar view are not supported.</li>
|
<li data-list-item-id="ea4a9d424aec2afbaecc07bbf64b7bebd">More advanced view types such as the calendar view are not supported.</li>
|
||||||
</ul>
|
</ul>
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
@ -108,12 +109,12 @@ class="image">
|
|||||||
</th>
|
</th>
|
||||||
<td>
|
<td>
|
||||||
<ul>
|
<ul>
|
||||||
<li>The diagram is displayed as a vector image.</li>
|
<li data-list-item-id="e582d283f2b1b30cbe5ae35d8e01b2bf2">The diagram is displayed as a vector image.</li>
|
||||||
</ul>
|
</ul>
|
||||||
</td>
|
</td>
|
||||||
<td>
|
<td>
|
||||||
<ul>
|
<ul>
|
||||||
<li>No further interaction supported.</li>
|
<li data-list-item-id="e33268686446e3c217077201bb5964364">No further interaction supported.</li>
|
||||||
</ul>
|
</ul>
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
@ -122,12 +123,12 @@ class="image">
|
|||||||
</th>
|
</th>
|
||||||
<td>
|
<td>
|
||||||
<ul>
|
<ul>
|
||||||
<li>The diagram is displayed as a vector image.</li>
|
<li data-list-item-id="e443dd0e97c30cb12c77e8906a71569ea">The diagram is displayed as a vector image.</li>
|
||||||
</ul>
|
</ul>
|
||||||
</td>
|
</td>
|
||||||
<td>
|
<td>
|
||||||
<ul>
|
<ul>
|
||||||
<li>No further interaction supported.</li>
|
<li data-list-item-id="efe151ef3f3826c825416417525fb5fb2">No further interaction supported.</li>
|
||||||
</ul>
|
</ul>
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
@ -143,7 +144,7 @@ class="image">
|
|||||||
<td>The diagram is displayed as a vector image.</td>
|
<td>The diagram is displayed as a vector image.</td>
|
||||||
<td>
|
<td>
|
||||||
<ul>
|
<ul>
|
||||||
<li>No further interaction supported.</li>
|
<li data-list-item-id="ed3b4fb473042f6e32b4502d4fa11a767">No further interaction supported.</li>
|
||||||
</ul>
|
</ul>
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
@ -159,7 +160,7 @@ class="image">
|
|||||||
<td>Basic interaction (downloading the file).</td>
|
<td>Basic interaction (downloading the file).</td>
|
||||||
<td>
|
<td>
|
||||||
<ul>
|
<ul>
|
||||||
<li>No further interaction supported.</li>
|
<li data-list-item-id="ed87e836a39d127ebcbb33e9e59045afb">No further interaction supported.</li>
|
||||||
</ul>
|
</ul>
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
@ -178,7 +179,7 @@ class="image">
|
|||||||
<p>To use the sharing feature, you must have a <a class="reference-link"
|
<p>To use the sharing feature, you must have a <a class="reference-link"
|
||||||
href="#root/_help_WOcw2SLH6tbX">Server Installation</a> of Trilium.
|
href="#root/_help_WOcw2SLH6tbX">Server Installation</a> of Trilium.
|
||||||
This is necessary because the notes will be hosted from the server.</p>
|
This is necessary because the notes will be hosted from the server.</p>
|
||||||
<h2>How to Share a Note</h2>
|
<h2>Sharing a note</h2>
|
||||||
<ol>
|
<ol>
|
||||||
<li>
|
<li>
|
||||||
<p><strong>Enable Sharing</strong>: To share a note, toggle the <code>Shared</code> switch
|
<p><strong>Enable Sharing</strong>: To share a note, toggle the <code>Shared</code> switch
|
||||||
@ -194,26 +195,27 @@ class="image">
|
|||||||
the URL will refer to <code>localhost (127.0.0.1)</code>.</p>
|
the URL will refer to <code>localhost (127.0.0.1)</code>.</p>
|
||||||
</li>
|
</li>
|
||||||
</ol>
|
</ol>
|
||||||
<h2>Sharing a Note Subtree</h2>
|
<h2>Sharing a note subtree</h2>
|
||||||
<p>When you share a note, you actually share the entire subtree of notes
|
<p>When you share a note, you actually share the entire subtree of notes
|
||||||
beneath it. If the note has child notes, they will also be included in
|
beneath it. If the note has child notes, they will also be included in
|
||||||
the shared content. For example, sharing the "Formatting" subtree will
|
the shared content. For example, sharing the "Formatting" subtree will
|
||||||
display a page with basic navigation for exploring all the notes within
|
display a page with basic navigation for exploring all the notes within
|
||||||
that subtree.</p>
|
that subtree.</p>
|
||||||
<h2>Viewing All Shared Notes</h2>
|
<h2>Viewing and managing shared notes</h2>
|
||||||
<p>You can view a list of all shared notes by clicking on "Show Shared Notes
|
<p>You can view a list of all shared notes by clicking on "Show Shared Notes
|
||||||
Subtree." This allows you to manage and navigate through all the notes
|
Subtree" in the <a class="reference-link" href="#root/_help_x3i7MxGccDuM">Global menu</a>.
|
||||||
you have made public.</p>
|
This allows you to manage and navigate through all the notes you have made
|
||||||
<h2>Security Considerations</h2>
|
public.</p>
|
||||||
|
<h2>Security considerations</h2>
|
||||||
<p>Shared notes are published on the open internet and can be accessed by
|
<p>Shared notes are published on the open internet and can be accessed by
|
||||||
anyone with the URL. The URL's randomness does not provide security, so
|
anyone with the URL. The URL's randomness does not provide security, so
|
||||||
it is crucial not to share sensitive information through this feature.</p>
|
it is crucial not to share sensitive information through this feature.</p>
|
||||||
<h3>Password Protection</h3>
|
<h3>Password protection</h3>
|
||||||
<p>To protect shared notes with a username and password, you can use the <code>#shareCredentials</code> attribute.
|
<p>To protect shared notes with a username and password, you can use the <code>#shareCredentials</code> attribute.
|
||||||
Add this label to the note with the format <code>#shareCredentials="username:password"</code>.
|
Add this label to the note with the format <code>#shareCredentials="username:password"</code>.
|
||||||
To protect an entire subtree, make sure the label is <a href="#root/_help_bwZpz2ajCEwO">inheritable</a>.</p>
|
To protect an entire subtree, make sure the label is <a href="#root/_help_bwZpz2ajCEwO">inheritable</a>.</p>
|
||||||
<h2>Advanced Sharing Options</h2>
|
<h2>Advanced sharing options</h2>
|
||||||
<h3>Customizing the Appearance of Shared Notes</h3>
|
<h3>Customizing the appearance of shared notes</h3>
|
||||||
<p>The default design should be a good starting point, but you can customize
|
<p>The default design should be a good starting point, but you can customize
|
||||||
it using your own CSS:</p>
|
it using your own CSS:</p>
|
||||||
<ul>
|
<ul>
|
||||||
@ -238,7 +240,7 @@ const parentNote = await fetchNote(currentNote.parentNoteIds[0]);
|
|||||||
for (const attr of parentNote.attributes) {
|
for (const attr of parentNote.attributes) {
|
||||||
console.log(attr.type, attr.name, attr.value);
|
console.log(attr.type, attr.name, attr.value);
|
||||||
}</code></pre>
|
}</code></pre>
|
||||||
<h3>Creating Human-Readable URL Aliases</h3>
|
<h3>Creating human-readable URL aliases</h3>
|
||||||
<p>Shared notes typically have URLs like <code>http://domain.tld/share/knvU8aJy4dJ7</code>,
|
<p>Shared notes typically have URLs like <code>http://domain.tld/share/knvU8aJy4dJ7</code>,
|
||||||
where the last part is the note's ID. You can make these URLs more user-friendly
|
where the last part is the note's ID. You can make these URLs more user-friendly
|
||||||
by adding the <code>#shareAlias</code> label to individual notes (e.g., <code>#shareAlias=highlighting</code>).
|
by adding the <code>#shareAlias</code> label to individual notes (e.g., <code>#shareAlias=highlighting</code>).
|
||||||
@ -249,23 +251,25 @@ for (const attr of parentNote.attributes) {
|
|||||||
<li>Using slashes (<code>/</code>) within aliases to create subpaths is not
|
<li>Using slashes (<code>/</code>) within aliases to create subpaths is not
|
||||||
supported.</li>
|
supported.</li>
|
||||||
</ol>
|
</ol>
|
||||||
<h3>Viewing and Managing Shared Notes</h3>
|
<h3>Setting a custom favicon</h3>
|
||||||
<p>All shared notes are grouped under an automatically managed "Shared Notes"
|
|
||||||
section. From here, you can view, share, or unshare notes by moving or
|
|
||||||
cloning them within this section.</p>
|
|
||||||
<p>
|
|
||||||
<img src="Sharing_shared-list.png" alt="Shared Notes List">
|
|
||||||
</p>
|
|
||||||
<h3>Setting a Custom Favicon</h3>
|
|
||||||
<p>To customize the favicon for your shared pages, create a relation <code>~shareFavicon</code> pointing
|
<p>To customize the favicon for your shared pages, create a relation <code>~shareFavicon</code> pointing
|
||||||
to a file note containing the favicon (e.g., in <code>.ico</code> format).</p>
|
to a file note containing the favicon (e.g., in <code>.ico</code> format).</p>
|
||||||
<h3>Sharing a Note as the Root</h3>
|
<h3>Sharing a note as the root</h3>
|
||||||
<p>You can designate a specific note or folder as the root of your shared
|
<p>You can designate a specific note or folder as the root of your shared
|
||||||
content by adding the <code>#shareRoot</code> label. This note will be linked
|
content by adding the <code>#shareRoot</code> label. This note will be linked
|
||||||
when visiting <code>[http://domain.tld/share](http://domain/share)</code>,
|
when visiting <code>[http://domain.tld/share](http://domain/share)</code>,
|
||||||
making it easier to use Trilium as a fully-fledged website. Consider combining
|
making it easier to use Trilium as a fully-fledged website.</p>
|
||||||
this with the <code>#shareIndex</code> label, which will display a list of
|
<aside class="admonition tip">
|
||||||
all shared notes.</p>
|
<p>Consider combining this with the <code>#shareIndex</code> label, which will
|
||||||
|
display a list of all shared notes.</p>
|
||||||
|
</aside>
|
||||||
|
<h3>Displaying an index of shared notes</h3>
|
||||||
|
<p>When accessing a share, the sub-notes will be displayed in a tree on the
|
||||||
|
left. But since multiple note trees can be shared, it might be useful to
|
||||||
|
display a list of all the different share trees.</p>
|
||||||
|
<p>To do so, create a shared text note and apply the <code>shareIndex</code> label.
|
||||||
|
When viewed, the list of shared roots will be displayed at the bottom of
|
||||||
|
the note.</p>
|
||||||
<h2>Attribute reference</h2>
|
<h2>Attribute reference</h2>
|
||||||
<table>
|
<table>
|
||||||
<thead>
|
<thead>
|
||||||
@ -323,8 +327,8 @@ for (const attr of parentNote.attributes) {
|
|||||||
<p>Indicates to web crawlers that the page should not be indexed of this
|
<p>Indicates to web crawlers that the page should not be indexed of this
|
||||||
note by:</p>
|
note by:</p>
|
||||||
<ul>
|
<ul>
|
||||||
<li>Setting the <code>X-Robots-Tag: noindex</code> HTTP header.</li>
|
<li data-list-item-id="e6baa9f60bf59d085fd31aa2cce07a0e7">Setting the <code>X-Robots-Tag: noindex</code> HTTP header.</li>
|
||||||
<li>Setting the <code>noindex, follow</code> meta tag.</li>
|
<li data-list-item-id="ec0d067db136ef9794e4f1033405880b7">Setting the <code>noindex, follow</code> meta tag.</li>
|
||||||
</ul>
|
</ul>
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
|
|||||||
|
Before Width: | Height: | Size: 8.7 KiB |
BIN
apps/server/src/assets/doc_notes/en/User Guide/User Guide/Note Types/Text/10_Lists_image.png
generated
vendored
|
Before Width: | Height: | Size: 160 B After Width: | Height: | Size: 8.5 KiB |
BIN
apps/server/src/assets/doc_notes/en/User Guide/User Guide/Note Types/Text/1_Lists_image.png
generated
vendored
|
Before Width: | Height: | Size: 8.5 KiB After Width: | Height: | Size: 172 B |
BIN
apps/server/src/assets/doc_notes/en/User Guide/User Guide/Note Types/Text/2_Lists_image.png
generated
vendored
|
Before Width: | Height: | Size: 158 B After Width: | Height: | Size: 147 B |
BIN
apps/server/src/assets/doc_notes/en/User Guide/User Guide/Note Types/Text/4_Lists_image.png
generated
vendored
|
Before Width: | Height: | Size: 3.9 KiB After Width: | Height: | Size: 154 B |
BIN
apps/server/src/assets/doc_notes/en/User Guide/User Guide/Note Types/Text/7_Lists_image.png
generated
vendored
|
Before Width: | Height: | Size: 154 B After Width: | Height: | Size: 158 B |
BIN
apps/server/src/assets/doc_notes/en/User Guide/User Guide/Note Types/Text/8_Lists_image.png
generated
vendored
|
Before Width: | Height: | Size: 172 B After Width: | Height: | Size: 9.0 KiB |
BIN
apps/server/src/assets/doc_notes/en/User Guide/User Guide/Note Types/Text/9_Lists_image.png
generated
vendored
|
Before Width: | Height: | Size: 147 B After Width: | Height: | Size: 3.9 KiB |
@ -25,6 +25,19 @@
|
|||||||
</ul>
|
</ul>
|
||||||
</li>
|
</li>
|
||||||
</ul>
|
</ul>
|
||||||
|
<h2>Exiting out of the code block</h2>
|
||||||
|
<ul>
|
||||||
|
<li>To exit out of a code block and enter a normal paragraph, move the cursor
|
||||||
|
at the end of the code block and press <kbd>Enter</kbd> twice.</li>
|
||||||
|
<li>Similarly, to insert a paragraph above the note block, move the cursor
|
||||||
|
at the beginning of the code block and press <kbd>Enter</kbd> twice.</li>
|
||||||
|
</ul>
|
||||||
|
<aside class="admonition note">
|
||||||
|
<p>If you've pasted a code block with a more complex HTML structure, exiting
|
||||||
|
out of the code block by pressing <kbd>Enter</kbd> multiple times might not
|
||||||
|
work. In that case the best approach is to delete the code block entirely
|
||||||
|
and use <kbd>Ctrl</kbd>+<kbd>Shift</kbd>+<kbd>V</kbd> (paste as plain text).</p>
|
||||||
|
</aside>
|
||||||
<h2>Syntax highlighting & color schemes</h2>
|
<h2>Syntax highlighting & color schemes</h2>
|
||||||
<p>Since TriliumNext v0.90.12, Trilium will try to offer syntax highlighting
|
<p>Since TriliumNext v0.90.12, Trilium will try to offer syntax highlighting
|
||||||
to the code block. Note that the syntax highlighting mechanism is slightly
|
to the code block. Note that the syntax highlighting mechanism is slightly
|
||||||
|
|||||||
@ -6,3 +6,10 @@
|
|||||||
look for the
|
look for the
|
||||||
<img src="Include Note_image.png">button. There is also a keyboard shortcut defined for it but it is not
|
<img src="Include Note_image.png">button. There is also a keyboard shortcut defined for it but it is not
|
||||||
allocated by default.</p>
|
allocated by default.</p>
|
||||||
|
<h2>Included notes in the share functionality</h2>
|
||||||
|
<p>If a <a href="#root/_help_R9pX4DGra2Vt">shared note</a> contains one or
|
||||||
|
more included notes, they will be displayed in the content of the note
|
||||||
|
as if they were part of the note itself.</p>
|
||||||
|
<p>For this to work, the included notes must also be shared, otherwise they
|
||||||
|
will not be shown. However, the included notes can still be hidden from
|
||||||
|
the note tree via <code>#shareHiddenFromTree</code>.</p>
|
||||||
25
apps/server/src/assets/doc_notes/en/User Guide/User Guide/Note Types/Text/Lists.html
generated
vendored
@ -1,15 +1,15 @@
|
|||||||
<p>There are three types of lists supported by text notes:</p>
|
<p>There are three types of lists supported by text notes:</p>
|
||||||
<ul>
|
<ul>
|
||||||
<li>
|
<li>
|
||||||
<img src="7_Lists_image.png" width="17" height="13">Bulleted lists (also known as unordered lists).</li>
|
<img src="4_Lists_image.png" width="17" height="13">Bulleted lists (also known as unordered lists).</li>
|
||||||
<li>
|
<li>
|
||||||
<img src="8_Lists_image.png" width="18" height="16">Numbered lists (or ordered lists).</li>
|
<img src="1_Lists_image.png" width="18" height="16">Numbered lists (or ordered lists).</li>
|
||||||
<li>
|
<li>
|
||||||
<img src="10_Lists_image.png" width="19" height="13">To-do lists</li>
|
<img src="Lists_image.png" width="19" height="13">To-do lists</li>
|
||||||
</ul>
|
</ul>
|
||||||
<p>For bulleted and numbered lists, it's possible to configure an alternative
|
<p>For bulleted and numbered lists, it's possible to configure an alternative
|
||||||
marker such as squares or Roman numbering by pressing the
|
marker such as squares or Roman numbering by pressing the
|
||||||
<img src="9_Lists_image.png"
|
<img src="2_Lists_image.png"
|
||||||
width="10" height="6">icon. For numbered lists, it's also possible to specify the number to
|
width="10" height="6">icon. For numbered lists, it's also possible to specify the number to
|
||||||
start at or whether to count in reverse order.</p>
|
start at or whether to count in reverse order.</p>
|
||||||
<h2>Keyboard interaction</h2>
|
<h2>Keyboard interaction</h2>
|
||||||
@ -20,7 +20,7 @@
|
|||||||
by a space;</li>
|
by a space;</li>
|
||||||
<li>Numbered list: Start a line with <code>1.</code> or <code>1)</code> followed
|
<li>Numbered list: Start a line with <code>1.</code> or <code>1)</code> followed
|
||||||
by a space;</li>
|
by a space;</li>
|
||||||
<li>To-do list: Start a line with <code>[ ]</code> for an unchecked item or <code>[x]</code> for
|
<li>To-do list: Start a line with <code>- [ ]</code> for an unchecked item or <code>[x]</code> for
|
||||||
a checked item.</li>
|
a checked item.</li>
|
||||||
</ul>
|
</ul>
|
||||||
</li>
|
</li>
|
||||||
@ -29,7 +29,7 @@
|
|||||||
<li>To exit out of the list, press <kbd>Enter</kbd> twice.</li>
|
<li>To exit out of the list, press <kbd>Enter</kbd> twice.</li>
|
||||||
<li>To merge two lists, simply delete the gap between them.</li>
|
<li>To merge two lists, simply delete the gap between them.</li>
|
||||||
<li>To create nested lists, simply use the
|
<li>To create nested lists, simply use the
|
||||||
<img src="2_Lists_image.png" width="17"
|
<img src="7_Lists_image.png" width="17"
|
||||||
height="14">button (see <em>Indentation</em> in <a class="reference-link" href="#root/_help_dEHYtoWWi8ct">Other features</a>)
|
height="14">button (see <em>Indentation</em> in <a class="reference-link" href="#root/_help_dEHYtoWWi8ct">Other features</a>)
|
||||||
or the <kbd>Tab</kbd> key. To decrease the nesting level for the current
|
or the <kbd>Tab</kbd> key. To decrease the nesting level for the current
|
||||||
element, press <kbd>Shift</kbd>+<kbd>Tab</kbd>.</li>
|
element, press <kbd>Shift</kbd>+<kbd>Tab</kbd>.</li>
|
||||||
@ -56,7 +56,7 @@
|
|||||||
<tr>
|
<tr>
|
||||||
<td>2</td>
|
<td>2</td>
|
||||||
<td>
|
<td>
|
||||||
<img src="4_Lists_image.png">
|
<img src="9_Lists_image.png">
|
||||||
</td>
|
</td>
|
||||||
<td>Press Enter to create a new list item.</td>
|
<td>Press Enter to create a new list item.</td>
|
||||||
</tr>
|
</tr>
|
||||||
@ -71,7 +71,7 @@
|
|||||||
<td>4</td>
|
<td>4</td>
|
||||||
<td>
|
<td>
|
||||||
<img class="image_resized" style="aspect-ratio:676/112;width:98.29%;"
|
<img class="image_resized" style="aspect-ratio:676/112;width:98.29%;"
|
||||||
src="1_Lists_image.png" width="676" height="112">
|
src="10_Lists_image.png" width="676" height="112">
|
||||||
</td>
|
</td>
|
||||||
<td>At this point, insert any desired block-level item such as a code block.</td>
|
<td>At this point, insert any desired block-level item such as a code block.</td>
|
||||||
</tr>
|
</tr>
|
||||||
@ -79,7 +79,7 @@
|
|||||||
<td>5</td>
|
<td>5</td>
|
||||||
<td>
|
<td>
|
||||||
<img class="image_resized" style="aspect-ratio:675/129;width:94.22%;"
|
<img class="image_resized" style="aspect-ratio:675/129;width:94.22%;"
|
||||||
src="Lists_image.png" width="675" height="129">
|
src="8_Lists_image.png" width="675" height="129">
|
||||||
</td>
|
</td>
|
||||||
<td>To continue with a new bullet point, press Enter until the cursor moves
|
<td>To continue with a new bullet point, press Enter until the cursor moves
|
||||||
to a new blank position.</td>
|
to a new blank position.</td>
|
||||||
@ -96,3 +96,10 @@
|
|||||||
</table>
|
</table>
|
||||||
<p>The same principle applies to all three list types (bullet, numbered and
|
<p>The same principle applies to all three list types (bullet, numbered and
|
||||||
to-do).</p>
|
to-do).</p>
|
||||||
|
<h2>To-do lists</h2>
|
||||||
|
<ul>
|
||||||
|
<li>To insert a to-do list from the keyboard, type <code>- [ ]</code> for an
|
||||||
|
unchecked item or <code>[x]</code> for a checked item while on an empty paragraph.</li>
|
||||||
|
<li>To reorder the item under the cursor, press <kbd>Alt</kbd>+<kbd>Up</kbd> or <kbd>Alt</kbd>+<kbd>Down</kbd>.
|
||||||
|
To reorder multiple items, select them first.</li>
|
||||||
|
</ul>
|
||||||
BIN
apps/server/src/assets/doc_notes/en/User Guide/User Guide/Note Types/Text/Lists_image.png
generated
vendored
|
Before Width: | Height: | Size: 9.0 KiB After Width: | Height: | Size: 160 B |
@ -6,12 +6,6 @@
|
|||||||
the
|
the
|
||||||
<img src="1_Math Equations_image.png" width="20" height="15">button from the <a class="reference-link" href="#root/_help_nRhnJkTT8cPs">Formatting toolbar</a> (generally
|
<img src="1_Math Equations_image.png" width="20" height="15">button from the <a class="reference-link" href="#root/_help_nRhnJkTT8cPs">Formatting toolbar</a> (generally
|
||||||
found under the <a class="reference-link" href="#root/_help_CohkqWQC1iBv">Insert buttons</a>).</p>
|
found under the <a class="reference-link" href="#root/_help_CohkqWQC1iBv">Insert buttons</a>).</p>
|
||||||
<p>If inserting equations frequently, using the <kbd>Ctrl</kbd>+<kbd>M</kbd> keyboard
|
|
||||||
shortcut can be more comfortable. Alternatively, type <code>$$</code> or <code>\[</code> to
|
|
||||||
trigger the popup directly.</p>
|
|
||||||
<p>There is currently no quick way to insert an equation, such as surrounding
|
|
||||||
it with <code>$</code> or pressing <kbd>Ctrl</kbd>+<kbd>M</kbd> on an already
|
|
||||||
typed-out equation.</p>
|
|
||||||
<p>The mathematical expression must be written in the TeX format. There is
|
<p>The mathematical expression must be written in the TeX format. There is
|
||||||
no visual editor for the math equations, only a preview. </p>
|
no visual editor for the math equations, only a preview. </p>
|
||||||
<p>Enabling <em>Display mode</em> will render the equation slightly bigger
|
<p>Enabling <em>Display mode</em> will render the equation slightly bigger
|
||||||
@ -19,6 +13,12 @@
|
|||||||
center it. Display mode equations will act as blocks (i.e. like paragraphs,
|
center it. Display mode equations will act as blocks (i.e. like paragraphs,
|
||||||
or tables) and can be inserted for example in lists. Non-display equations
|
or tables) and can be inserted for example in lists. Non-display equations
|
||||||
can be part of the text.</p>
|
can be part of the text.</p>
|
||||||
|
<h2>Keyboard shortcuts</h2>
|
||||||
|
<p>If inserting equations frequently, using the <kbd>Ctrl</kbd>+<kbd>M</kbd> keyboard
|
||||||
|
shortcut can be more comfortable. Alternatively, type <code>$$</code> or <code>\[</code> to
|
||||||
|
trigger the popup directly.</p>
|
||||||
|
<p>There is currently no quick way to turn an already typed-out equation,
|
||||||
|
such as surrounding it with <code>$</code> or pressing <kbd>Ctrl</kbd>+<kbd>M</kbd>.</p>
|
||||||
<h2>Supported math features</h2>
|
<h2>Supported math features</h2>
|
||||||
<p>Technically we are using the KaTeX library which allows for a subset of
|
<p>Technically we are using the KaTeX library which allows for a subset of
|
||||||
the TeX format. To see the full list of supported features, consult the
|
the TeX format. To see the full list of supported features, consult the
|
||||||
@ -27,8 +27,12 @@
|
|||||||
the official documentation.</p>
|
the official documentation.</p>
|
||||||
<h2>Markdown support</h2>
|
<h2>Markdown support</h2>
|
||||||
<p>Math equations will be preserved when exporting to or importing from Markdown,
|
<p>Math equations will be preserved when exporting to or importing from Markdown,
|
||||||
surrounded by <code>\(</code> characters for inline math expressions, and <code>$\)</code> for
|
surrounded by <code>$</code> characters for inline math expressions, and <code>$$</code> for
|
||||||
display mode.</p>
|
display mode.</p>
|
||||||
<p>If you notice any issue with the Markdown import/export for equations,
|
<p>If you notice any issue with the Markdown import/export for equations,
|
||||||
feel free to <a href="#root/_help_wy8So3yZZlH9">report</a> it while providing
|
feel free to <a href="#root/_help_wy8So3yZZlH9">report</a> it while providing
|
||||||
the equation that causes issues.</p>
|
the equation that causes issues.</p>
|
||||||
|
<h2>Formatting the equation</h2>
|
||||||
|
<p>It is possible to customize the font size and foreground color for both
|
||||||
|
inline and display-mode equations, just like any other text. For inline
|
||||||
|
equations, the background color/highlight can also be adjusted.</p>
|
||||||
24
apps/server/src/assets/doc_notes/en/User Guide/User Guide/Scripting/Logging.html
generated
vendored
Normal file
@ -0,0 +1,24 @@
|
|||||||
|
<p>Both front-end and back-end notes can log messages for debugging.</p>
|
||||||
|
<h2>UI logging via <code>api.log</code></h2>
|
||||||
|
<figure class="image image_resized image-style-align-center" style="width:57.74%;">
|
||||||
|
<img style="aspect-ratio:749/545;" src="Logging_image.png" width="749"
|
||||||
|
height="545">
|
||||||
|
</figure>
|
||||||
|
<p>The API log feature integrates with the script editor and it displays
|
||||||
|
all the messages logged via <code>api.log</code>. This works for both back-end
|
||||||
|
and front-end scripts.</p>
|
||||||
|
<p>The API log panel will appear after executing a script that uses <code>api.log</code> and
|
||||||
|
it can be dismissed temporarily by pressing the close button in the top-right
|
||||||
|
of the panel.</p>
|
||||||
|
<p>Apart from strings, an object can be passed as well in which case it will
|
||||||
|
be pretty-formatted if possible (e.g. recursive objects are not supported).</p>
|
||||||
|
<h2>Console logging</h2>
|
||||||
|
<p>For logs that are not directly visible to the user, the standard <code>console.log</code> can
|
||||||
|
be used as well.</p>
|
||||||
|
<ul>
|
||||||
|
<li>For front-end scripts, the log will be shown in the Developer Tools (also
|
||||||
|
known as Inspect).</li>
|
||||||
|
<li>For back-end scripts, the log will be shown in the server output while
|
||||||
|
running but <strong>will not</strong> be visible in the <a class="reference-link"
|
||||||
|
href="#root/_help_bnyigUA2UK7s">Backend (server) logs</a>.</li>
|
||||||
|
</ul>
|
||||||
BIN
apps/server/src/assets/doc_notes/en/User Guide/User Guide/Scripting/Logging_image.png
generated
vendored
Normal file
|
After Width: | Height: | Size: 49 KiB |
|
Before Width: | Height: | Size: 3.9 KiB After Width: | Height: | Size: 29 KiB |
|
Before Width: | Height: | Size: 5.6 KiB After Width: | Height: | Size: 3.9 KiB |
BIN
apps/server/src/assets/doc_notes/en/User Guide/User Guide/Theme development/3_Custom app-wide CSS_image.png
generated
vendored
Normal file
|
After Width: | Height: | Size: 5.6 KiB |
@ -1,10 +1,11 @@
|
|||||||
<p>It is possible to provide a CSS file to be used regardless of the theme
|
<p>It is possible to provide a CSS file to be used regardless of the theme
|
||||||
set by the user.</p>
|
set by the user.</p>
|
||||||
<table>
|
<figure class="table">
|
||||||
|
<table>
|
||||||
<thead>
|
<thead>
|
||||||
<tr>
|
<tr>
|
||||||
<th></th>
|
<th> </th>
|
||||||
<th></th>
|
<th> </th>
|
||||||
</tr>
|
</tr>
|
||||||
</thead>
|
</thead>
|
||||||
<tbody>
|
<tbody>
|
||||||
@ -16,38 +17,76 @@
|
|||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td>
|
<td>
|
||||||
<img src="1_Custom app-wide CSS_image.png">
|
<img src="2_Custom app-wide CSS_image.png">
|
||||||
</td>
|
</td>
|
||||||
<td>In the ribbon, press the “Owned Attributes” section and type <code>#appCss</code>.</td>
|
<td>In the ribbon, press the “Owned Attributes” section and type <code>#appCss</code>.</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td>
|
<td>
|
||||||
<img src="2_Custom app-wide CSS_image.png">
|
<img src="3_Custom app-wide CSS_image.png">
|
||||||
</td>
|
</td>
|
||||||
<td>Type the desired CSS.
|
<td>Type the desired CSS.
|
||||||
<br>
|
<br>
|
||||||
<br>Generally it's a good idea to append <code>!important</code> for the styles
|
<br>Generally it's a good idea to append <code>!important</code> for the styles
|
||||||
that are being changed, in order to prevent other</td>
|
that are being changed, in order to prevent other</td>
|
||||||
</tr>
|
</tr>
|
||||||
</tbody>
|
</tbody>
|
||||||
</table>
|
</table>
|
||||||
|
</figure>
|
||||||
<h2>Seeing the changes</h2>
|
<h2>Seeing the changes</h2>
|
||||||
<p>Adding a new <em>app CSS note</em> or modifying an existing one does not
|
<p>Adding a new <em>app CSS note</em> or modifying an existing one does not
|
||||||
immediately apply changes. To see the changes, press Ctrl+Shift+R to refresh
|
immediately apply changes. To see the changes, press Ctrl+Shift+R to refresh
|
||||||
the page first.</p>
|
the page first.</p>
|
||||||
<h2>Example use-case: customizing the printing stylesheet</h2>
|
<h2>Sample use cases</h2>
|
||||||
|
<h3>Customizing the printing stylesheet</h3>
|
||||||
<p>When printing a document or exporting as PDF, it is possible to adjust
|
<p>When printing a document or exporting as PDF, it is possible to adjust
|
||||||
the style by creating a CSS note that uses the <code>@media</code> selector.</p>
|
the style by creating a CSS note that uses the <code>@media</code> selector.</p>
|
||||||
<p>For example, to change the font of the document from the one defined by
|
<p>For example, to change the font of the document from the one defined by
|
||||||
the theme or the user to a serif one:</p><pre><code class="language-text-x-trilium-auto">@media print {
|
the theme or the user to a serif one:</p><pre><code class="language-text-x-trilium-auto">@media print {
|
||||||
|
|
||||||
body {
|
body {
|
||||||
|
|
||||||
--main-font-family: serif !important;
|
--main-font-family: serif !important;
|
||||||
|
|
||||||
--detail-font-family: var(--main-font-family) !important;
|
--detail-font-family: var(--main-font-family) !important;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
}</code></pre>
|
||||||
|
<h3>Per-workspace styles</h3>
|
||||||
|
<p>When using <a class="reference-link" href="#root/pOsGYCXsbNQG/gh7bpGYxajRS/wArbEsdSae6g/_help_9sRHySam5fXb">Workspaces</a>,
|
||||||
|
it can be helpful to create a visual distinction between notes in different
|
||||||
|
workspaces.</p>
|
||||||
|
<p>To do so:</p>
|
||||||
|
<ol>
|
||||||
|
<li data-list-item-id="ebe7118e85ce0b3102e4333aef27c637d">In the note with <code>#workspace</code>, add an inheritable attribute <code>#cssClass(inheritable)</code> with
|
||||||
|
a value that uniquely identifies the workspace (say <code>my-workspace</code>).</li>
|
||||||
|
<li
|
||||||
|
data-list-item-id="e690ba825e168c5ec987f98c15f9b7a99">Anywhere in the note structure, create a CSS note with <code>#appCss</code>.</li>
|
||||||
|
</ol>
|
||||||
|
<h4>Change the color of the icons in the <a class="reference-link" href="#root/pOsGYCXsbNQG/gh7bpGYxajRS/Vc8PjrjAGuOp/_help_oPVyFC7WL2Lp">Note Tree</a></h4><pre><code class="language-text-x-trilium-auto">.fancytree-node.my-workspace.fancytree-custom-icon {
|
||||||
|
color: #ff0000;
|
||||||
|
}</code></pre>
|
||||||
|
<h4>Change the color of the note title and the icon</h4>
|
||||||
|
<p>To change the color of the note title and the icon (above the content):</p><pre><code class="language-text-x-trilium-auto">.note-split.my-workspace .note-icon-widget button.note-icon,
|
||||||
|
.note-split.my-workspace .note-title-widget input.note-title {
|
||||||
|
color: #ff0000;
|
||||||
|
}</code></pre>
|
||||||
|
<h4>Add a watermark to the note content</h4>
|
||||||
|
<figure class="image image-style-align-right image_resized" style="width:39.97%;">
|
||||||
|
<img style="aspect-ratio:641/630;" src="1_Custom app-wide CSS_image.png"
|
||||||
|
width="641" height="630">
|
||||||
|
</figure>
|
||||||
|
<ol>
|
||||||
|
<li data-list-item-id="e9796dcbe19c3b9d39839533989b9e104">Insert an image in any note and take the URL of the image.</li>
|
||||||
|
<li data-list-item-id="e8da975b80585c42193516ee5d8d8a56c">Use the following CSS, adjusting the <code>background-image</code> and <code>width</code> and <code>height</code> to
|
||||||
|
the desired values.</li>
|
||||||
|
</ol><pre><code class="language-text-x-trilium-auto">.note-split.my-workspace .scrolling-container:after {
|
||||||
|
position: fixed;
|
||||||
|
content: "";
|
||||||
|
background-image: url("/api/attachments/Rvm3zJNITQI1/image/logo.png");
|
||||||
|
background-size: contain;
|
||||||
|
background-position: center;
|
||||||
|
background-repeat: no-repeat;
|
||||||
|
width: 237px;
|
||||||
|
height: 44px;
|
||||||
|
bottom: 1em;
|
||||||
|
right: 1em;
|
||||||
|
opacity: 0.5;
|
||||||
|
z-index: 0;
|
||||||
}</code></pre>
|
}</code></pre>
|
||||||
@ -424,5 +424,12 @@
|
|||||||
"board_status_todo": "Por hacer",
|
"board_status_todo": "Por hacer",
|
||||||
"board_status_done": "Hecho",
|
"board_status_done": "Hecho",
|
||||||
"board": "Tablero"
|
"board": "Tablero"
|
||||||
|
},
|
||||||
|
"sql_init": {
|
||||||
|
"db_not_initialized_desktop": "Base de datos no inicializada, por favor, siga las instrucciones en pantalla.",
|
||||||
|
"db_not_initialized_server": "Base de datos no inicializada, por favor, visite la página de configuración - http://[your-server-host]:{{port}} para ver instrucciones sobre cómo inicializar Trilium."
|
||||||
|
},
|
||||||
|
"desktop": {
|
||||||
|
"instance_already_running": "Ya hay una instancia en ejecución, enfocando esa instancia en su lugar."
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -9,6 +9,9 @@
|
|||||||
"back-in-note-history": "Palaa edelliseen muistiinpanoon",
|
"back-in-note-history": "Palaa edelliseen muistiinpanoon",
|
||||||
"forward-in-note-history": "Siirry seuraavaan muistiinpanoon",
|
"forward-in-note-history": "Siirry seuraavaan muistiinpanoon",
|
||||||
"open-jump-to-note-dialog": "Avaa \"Siirry muistiinpanoon\" -dialogi",
|
"open-jump-to-note-dialog": "Avaa \"Siirry muistiinpanoon\" -dialogi",
|
||||||
"scroll-to-active-note": "Näytä aktiivinen muistiinpano puunäkymässä"
|
"scroll-to-active-note": "Näytä aktiivinen muistiinpano puunäkymässä",
|
||||||
|
"move-note-down": "Siirrä muistiinpanoa alaspäin",
|
||||||
|
"move-note-up-in-hierarchy": "Siirrä muistiinpanoa hierarkiassa ylöspäin",
|
||||||
|
"move-note-down-in-hierarchy": "Siirrä muistiinpanoa hierarkiassa alaspäin"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -376,5 +376,12 @@
|
|||||||
"reset-zoom-level": "Réinitilaliser le zoom",
|
"reset-zoom-level": "Réinitilaliser le zoom",
|
||||||
"copy-without-formatting": "Copier sans mise en forme",
|
"copy-without-formatting": "Copier sans mise en forme",
|
||||||
"force-save-revision": "Forcer la sauvegarde de la révision"
|
"force-save-revision": "Forcer la sauvegarde de la révision"
|
||||||
|
},
|
||||||
|
"sql_init": {
|
||||||
|
"db_not_initialized_desktop": "Base de données non initialisée, merci de suivre les instructions à l'écran.",
|
||||||
|
"db_not_initialized_server": "Base de données non initialisée, veuillez visitez - http://[your-server-host]:{{port}} pour consulter les instructions d'initialisation de Trilium."
|
||||||
|
},
|
||||||
|
"desktop": {
|
||||||
|
"instance_already_running": "Une instance est déjà en cours d'execution, ouverture de cette instance à la place."
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -147,7 +147,7 @@
|
|||||||
"paste-markdown-into-text": "Incolla il Markdown dagli appunti nella nota di testo",
|
"paste-markdown-into-text": "Incolla il Markdown dagli appunti nella nota di testo",
|
||||||
"cut-into-note": "Taglia la selezione dalla nota corrente e crea una sotto nota col testo selezionato",
|
"cut-into-note": "Taglia la selezione dalla nota corrente e crea una sotto nota col testo selezionato",
|
||||||
"add-include-note-to-text": "Apre la finestra di dialogo per includere una nota",
|
"add-include-note-to-text": "Apre la finestra di dialogo per includere una nota",
|
||||||
"edit-readonly-note": "Modifica una nota di sola lettura",
|
"edit-readonly-note": "Modifica una nota in sola lettura",
|
||||||
"attributes-labels-and-relations": "Attributi (etichette e relazioni)",
|
"attributes-labels-and-relations": "Attributi (etichette e relazioni)",
|
||||||
"add-new-label": "Crea una nuova etichetta",
|
"add-new-label": "Crea una nuova etichetta",
|
||||||
"create-new-relation": "Crea una nuova relazione",
|
"create-new-relation": "Crea una nuova relazione",
|
||||||
|
|||||||
1
apps/server/src/assets/translations/nb-NO/server.json
Normal file
@ -0,0 +1 @@
|
|||||||
|
{}
|
||||||
@ -428,5 +428,8 @@
|
|||||||
"sql_init": {
|
"sql_init": {
|
||||||
"db_not_initialized_desktop": "Baza de date nu este inițializată, urmați instrucțiunile de pe ecran.",
|
"db_not_initialized_desktop": "Baza de date nu este inițializată, urmați instrucțiunile de pe ecran.",
|
||||||
"db_not_initialized_server": "Baza de date nu este inițializată, vizitați pagina de inițializare la http://[your-server-host]:{{port}}, ce conține instrucțiuni despre inițializarea aplicației."
|
"db_not_initialized_server": "Baza de date nu este inițializată, vizitați pagina de inițializare la http://[your-server-host]:{{port}}, ce conține instrucțiuni despre inițializarea aplicației."
|
||||||
|
},
|
||||||
|
"desktop": {
|
||||||
|
"instance_already_running": "Se focalizează o instanță a aplicației deja existentă."
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -23,6 +23,7 @@ import exportService from "./export/zip.js";
|
|||||||
import syncMutex from "./sync_mutex.js";
|
import syncMutex from "./sync_mutex.js";
|
||||||
import backupService from "./backup.js";
|
import backupService from "./backup.js";
|
||||||
import optionsService from "./options.js";
|
import optionsService from "./options.js";
|
||||||
|
import { formatLogMessage } from "@triliumnext/commons";
|
||||||
import type BNote from "../becca/entities/bnote.js";
|
import type BNote from "../becca/entities/bnote.js";
|
||||||
import type AbstractBeccaEntity from "../becca/entities/abstract_becca_entity.js";
|
import type AbstractBeccaEntity from "../becca/entities/abstract_becca_entity.js";
|
||||||
import type BBranch from "../becca/entities/bbranch.js";
|
import type BBranch from "../becca/entities/bbranch.js";
|
||||||
@ -221,7 +222,7 @@ export interface Api {
|
|||||||
/**
|
/**
|
||||||
* Log given message to trilium logs and log pane in UI
|
* Log given message to trilium logs and log pane in UI
|
||||||
*/
|
*/
|
||||||
log(message: string): void;
|
log(message: string | object): void;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Returns root note of the calendar.
|
* Returns root note of the calendar.
|
||||||
@ -556,7 +557,8 @@ function BackendScriptApi(this: Api, currentNote: BNote, apiParams: ApiParams) {
|
|||||||
this.logMessages = {};
|
this.logMessages = {};
|
||||||
this.logSpacedUpdates = {};
|
this.logSpacedUpdates = {};
|
||||||
|
|
||||||
this.log = (message) => {
|
this.log = (rawMessage) => {
|
||||||
|
const message = formatLogMessage(rawMessage);
|
||||||
log.info(message);
|
log.info(message);
|
||||||
|
|
||||||
if (!this.startNote) {
|
if (!this.startNote) {
|
||||||
|
|||||||
@ -5,6 +5,7 @@ import { getOpenAIOptions } from './providers.js';
|
|||||||
import OpenAI from 'openai';
|
import OpenAI from 'openai';
|
||||||
import { PROVIDER_PROMPTS } from '../constants/llm_prompt_constants.js';
|
import { PROVIDER_PROMPTS } from '../constants/llm_prompt_constants.js';
|
||||||
import log from '../../log.js';
|
import log from '../../log.js';
|
||||||
|
import { ChatCompletionMessageFunctionToolCall } from 'openai/resources/index.mjs';
|
||||||
|
|
||||||
export class OpenAIService extends BaseAIService {
|
export class OpenAIService extends BaseAIService {
|
||||||
private openai: OpenAI | null = null;
|
private openai: OpenAI | null = null;
|
||||||
@ -101,7 +102,7 @@ export class OpenAIService extends BaseAIService {
|
|||||||
log.info('OpenAI API Stream Started');
|
log.info('OpenAI API Stream Started');
|
||||||
|
|
||||||
// Create a closure to hold accumulated tool calls
|
// Create a closure to hold accumulated tool calls
|
||||||
const accumulatedToolCalls: OpenAI.Chat.ChatCompletionMessageToolCall[] = [];
|
const accumulatedToolCalls: OpenAI.Chat.ChatCompletionMessageFunctionToolCall[] = [];
|
||||||
|
|
||||||
// Return a response with the stream handler
|
// Return a response with the stream handler
|
||||||
const response: ChatResponse = {
|
const response: ChatResponse = {
|
||||||
@ -201,7 +202,7 @@ export class OpenAIService extends BaseAIService {
|
|||||||
completeText = content;
|
completeText = content;
|
||||||
|
|
||||||
// Check if there are tool calls in the non-stream response
|
// Check if there are tool calls in the non-stream response
|
||||||
const toolCalls = stream.choices[0]?.message?.tool_calls;
|
const toolCalls = stream.choices[0]?.message?.tool_calls as ChatCompletionMessageFunctionToolCall[];
|
||||||
if (toolCalls) {
|
if (toolCalls) {
|
||||||
response.tool_calls = toolCalls;
|
response.tool_calls = toolCalls;
|
||||||
console.log('OpenAI API Tool Calls in Non-iterable Response:', JSON.stringify(toolCalls, null, 2));
|
console.log('OpenAI API Tool Calls in Non-iterable Response:', JSON.stringify(toolCalls, null, 2));
|
||||||
@ -251,7 +252,7 @@ export class OpenAIService extends BaseAIService {
|
|||||||
completionTokens: completion.usage?.completion_tokens,
|
completionTokens: completion.usage?.completion_tokens,
|
||||||
totalTokens: completion.usage?.total_tokens
|
totalTokens: completion.usage?.total_tokens
|
||||||
},
|
},
|
||||||
tool_calls: completion.choices[0].message.tool_calls
|
tool_calls: completion.choices[0].message.tool_calls as ChatCompletionMessageFunctionToolCall[]
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
|
|||||||
2
apps/website/.gitignore
vendored
@ -24,5 +24,5 @@ dist-ssr
|
|||||||
*.sw?
|
*.sw?
|
||||||
|
|
||||||
*.d.ts
|
*.d.ts
|
||||||
!types-assets.d.ts
|
!types.d.ts
|
||||||
*.map
|
*.map
|
||||||
BIN
apps/website/original-images/screenshot_desktop_linux_dark.png
Normal file
|
After Width: | Height: | Size: 170 KiB |
BIN
apps/website/original-images/screenshot_desktop_linux_light.png
Normal file
|
After Width: | Height: | Size: 169 KiB |
@ -5,19 +5,20 @@
|
|||||||
"scripts": {
|
"scripts": {
|
||||||
"dev": "vite",
|
"dev": "vite",
|
||||||
"build": "vite build",
|
"build": "vite build",
|
||||||
"preview": "vite preview"
|
"preview": "pnpm build && vite preview"
|
||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"preact": "^10.26.9",
|
"preact": "10.27.2",
|
||||||
"preact-iso": "^2.10.0",
|
"preact-iso": "2.11.0",
|
||||||
"preact-render-to-string": "^6.6.1"
|
"preact-render-to-string": "6.6.2"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@preact/preset-vite": "^2.10.2",
|
"@preact/preset-vite": "2.10.2",
|
||||||
"eslint": "^9.36.0",
|
"eslint": "9.36.0",
|
||||||
"eslint-config-preact": "^2.0.0",
|
"eslint-config-preact": "2.0.0",
|
||||||
"typescript": "^5.9.2",
|
"typescript": "5.9.3",
|
||||||
"vite": "^7.0.4"
|
"user-agent-data-types": "0.4.2",
|
||||||
|
"vite": "7.1.9"
|
||||||
},
|
},
|
||||||
"eslintConfig": {
|
"eslintConfig": {
|
||||||
"extends": "preact"
|
"extends": "preact"
|
||||||
|
|||||||
BIN
apps/website/public/screenshot_desktop_linux_dark.webp
Normal file
|
After Width: | Height: | Size: 52 KiB |
BIN
apps/website/public/screenshot_desktop_linux_light.webp
Normal file
|
After Width: | Height: | Size: 59 KiB |
@ -11,9 +11,14 @@ interface DownloadButtonProps {
|
|||||||
|
|
||||||
export default function DownloadButton({ big }: DownloadButtonProps) {
|
export default function DownloadButton({ big }: DownloadButtonProps) {
|
||||||
const [ recommendedDownload, setRecommendedDownload ] = useState<RecommendedDownload | null>();
|
const [ recommendedDownload, setRecommendedDownload ] = useState<RecommendedDownload | null>();
|
||||||
useEffect(() => setRecommendedDownload(getRecommendedDownload()), []);
|
useEffect(() => {
|
||||||
|
getRecommendedDownload()?.then(setRecommendedDownload);
|
||||||
|
}, []);
|
||||||
|
|
||||||
return (recommendedDownload &&
|
return (recommendedDownload &&
|
||||||
|
<>
|
||||||
|
{recommendedDownload.platform !== "linux"
|
||||||
|
? (
|
||||||
<Button
|
<Button
|
||||||
className={`download-button desktop-only ${big ? "big" : ""}`}
|
className={`download-button desktop-only ${big ? "big" : ""}`}
|
||||||
href={recommendedDownload.url}
|
href={recommendedDownload.url}
|
||||||
@ -26,5 +31,24 @@ export default function DownloadButton({ big }: DownloadButtonProps) {
|
|||||||
}
|
}
|
||||||
</>}
|
</>}
|
||||||
/>
|
/>
|
||||||
|
) : (
|
||||||
|
<Button
|
||||||
|
className={`download-button desktop-only ${big ? "big" : ""}`}
|
||||||
|
href="/get-started/"
|
||||||
|
iconSvg={downloadIcon}
|
||||||
|
text={<>
|
||||||
|
Download now{" "}
|
||||||
|
{big
|
||||||
|
? <span class="platform">v{packageJson.version} for Linux</span>
|
||||||
|
: <span class="platform">for Linux</span>
|
||||||
|
}
|
||||||
|
</>}
|
||||||
|
/>
|
||||||
|
)}
|
||||||
|
|
||||||
|
{big && (
|
||||||
|
<a class="more-download-options desktop-only" href="./get-started/">More platforms & server setup</a>
|
||||||
|
)}
|
||||||
|
</>
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|||||||
@ -75,8 +75,7 @@ header {
|
|||||||
display: flex;
|
display: flex;
|
||||||
justify-content: space-between;
|
justify-content: space-between;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
flex-grow: 1;
|
width: 100%;
|
||||||
align-self: stretch;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
.menu-toggle {
|
.menu-toggle {
|
||||||
|
|||||||
@ -19,6 +19,7 @@ export interface DownloadMatrixEntry {
|
|||||||
description: Record<Architecture, string> | string;
|
description: Record<Architecture, string> | string;
|
||||||
downloads: Record<string, DownloadInfo>;
|
downloads: Record<string, DownloadInfo>;
|
||||||
helpUrl?: string;
|
helpUrl?: string;
|
||||||
|
quickStartTitle?: string;
|
||||||
quickStartCode?: string;
|
quickStartCode?: string;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -43,6 +44,7 @@ export const downloadMatrix: DownloadMatrix = {
|
|||||||
x64: "Compatible with Intel or AMD devices running Windows 10 and 11.",
|
x64: "Compatible with Intel or AMD devices running Windows 10 and 11.",
|
||||||
arm64: "Compatible with ARM devices (e.g. with Qualcomm Snapdragon).",
|
arm64: "Compatible with ARM devices (e.g. with Qualcomm Snapdragon).",
|
||||||
},
|
},
|
||||||
|
quickStartTitle: "To install via Winget:",
|
||||||
quickStartCode: "winget install TriliumNext.Notes",
|
quickStartCode: "winget install TriliumNext.Notes",
|
||||||
downloads: {
|
downloads: {
|
||||||
exe: {
|
exe: {
|
||||||
@ -55,10 +57,6 @@ export const downloadMatrix: DownloadMatrix = {
|
|||||||
scoop: {
|
scoop: {
|
||||||
name: "Scoop",
|
name: "Scoop",
|
||||||
url: "https://scoop.sh/#/apps?q=trilium&id=7c08bc3c105b9ee5c00dd4245efdea0f091b8a5c"
|
url: "https://scoop.sh/#/apps?q=trilium&id=7c08bc3c105b9ee5c00dd4245efdea0f091b8a5c"
|
||||||
},
|
|
||||||
winget: {
|
|
||||||
name: "Winget",
|
|
||||||
url: "https://github.com/microsoft/winget-pkgs/tree/master/manifests/t/TriliumNext/Notes/"
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
@ -71,14 +69,15 @@ export const downloadMatrix: DownloadMatrix = {
|
|||||||
x64: "For most Linux distributions, compatible with x86_64 architecture.",
|
x64: "For most Linux distributions, compatible with x86_64 architecture.",
|
||||||
arm64: "For ARM-based Linux distributions, compatible with aarch64 architecture.",
|
arm64: "For ARM-based Linux distributions, compatible with aarch64 architecture.",
|
||||||
},
|
},
|
||||||
|
quickStartTitle: "Select an appropriate package format, depending on your distribution:",
|
||||||
downloads: {
|
downloads: {
|
||||||
deb: {
|
deb: {
|
||||||
recommended: true,
|
recommended: true,
|
||||||
name: "Download .deb"
|
name: ".deb"
|
||||||
},
|
},
|
||||||
rpm: {
|
rpm: {
|
||||||
recommended: true,
|
recommended: true,
|
||||||
name: "Download .rpm"
|
name: ".rpm"
|
||||||
},
|
},
|
||||||
flatpak: {
|
flatpak: {
|
||||||
name: ".flatpak"
|
name: ".flatpak"
|
||||||
@ -105,6 +104,7 @@ export const downloadMatrix: DownloadMatrix = {
|
|||||||
x64: "For Intel-based Macs running macOS Big Sur or later.",
|
x64: "For Intel-based Macs running macOS Big Sur or later.",
|
||||||
arm64: "For Apple Silicon Macs such as those with M1 and M2 chips.",
|
arm64: "For Apple Silicon Macs such as those with M1 and M2 chips.",
|
||||||
},
|
},
|
||||||
|
quickStartTitle: "To install via Homebrew:",
|
||||||
quickStartCode: "brew install --cask trilium-notes",
|
quickStartCode: "brew install --cask trilium-notes",
|
||||||
downloads: {
|
downloads: {
|
||||||
dmg: {
|
dmg: {
|
||||||
@ -188,9 +188,14 @@ export function buildDownloadUrl(app: App, platform: Platform, format: string, a
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
export function getArchitecture(): Architecture | null {
|
export async function getArchitecture(): Promise<Architecture | null> {
|
||||||
if (typeof window === "undefined") return null;
|
if (typeof window === "undefined") return null;
|
||||||
|
|
||||||
|
if (navigator.userAgentData) {
|
||||||
|
const { architecture } = await navigator.userAgentData.getHighEntropyValues(["architecture"]);
|
||||||
|
return architecture?.startsWith("arm") ? "arm64" : "x64";
|
||||||
|
}
|
||||||
|
|
||||||
const userAgent = navigator.userAgent.toLowerCase();
|
const userAgent = navigator.userAgent.toLowerCase();
|
||||||
if (userAgent.includes('arm64') || userAgent.includes('aarch64')) {
|
if (userAgent.includes('arm64') || userAgent.includes('aarch64')) {
|
||||||
return 'arm64';
|
return 'arm64';
|
||||||
@ -212,10 +217,10 @@ export function getPlatform(): Platform | null {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
export function getRecommendedDownload(): RecommendedDownload | null {
|
export async function getRecommendedDownload(): Promise<RecommendedDownload | null> {
|
||||||
if (typeof window === "undefined") return null;
|
if (typeof window === "undefined") return null;
|
||||||
|
|
||||||
const architecture = getArchitecture();
|
const architecture = await getArchitecture();
|
||||||
const platform = getPlatform();
|
const platform = getPlatform();
|
||||||
if (!platform || !architecture) return null;
|
if (!platform || !architecture) return null;
|
||||||
|
|
||||||
|
|||||||
@ -32,10 +32,17 @@
|
|||||||
color: var(--accent-color);
|
color: var(--accent-color);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.quick-start-title {
|
||||||
|
margin-bottom: 0;
|
||||||
|
font-size: 0.9em;
|
||||||
|
color: var(--muted-color);
|
||||||
|
}
|
||||||
|
|
||||||
.quick-start {
|
.quick-start {
|
||||||
background-color: #ececec;
|
background-color: #ececec;
|
||||||
padding: 0.75em;
|
padding: 0.75em;
|
||||||
border-radius: 6px;
|
border-radius: 6px;
|
||||||
|
margin-top: 0.5em;
|
||||||
|
|
||||||
@media (prefers-color-scheme: dark) {
|
@media (prefers-color-scheme: dark) {
|
||||||
background-color: black;
|
background-color: black;
|
||||||
@ -49,7 +56,7 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
.download-options {
|
.download-options {
|
||||||
justify-content: flex-end;
|
justify-content: center;
|
||||||
align-items: stretch;
|
align-items: stretch;
|
||||||
flex-grow: 1;
|
flex-grow: 1;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
@ -80,9 +87,19 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
.download-desktop {
|
.download-desktop {
|
||||||
.download-card:first-of-type { --accent-color: var(--brand-1); }
|
.download-card {
|
||||||
.download-card:nth-of-type(2) { --accent-color: var(--brand-2); }
|
@media (min-width: 720px) {
|
||||||
.download-card:last-of-type { --accent-color: var(--brand-3); }
|
transform: scale(0.9);
|
||||||
|
|
||||||
|
&.recommended {
|
||||||
|
transform: scale(1);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
&.windows { --accent-color: var(--brand-1); }
|
||||||
|
&.linux { --accent-color: var(--brand-2); }
|
||||||
|
&.macos { --accent-color: var(--brand-3); }
|
||||||
|
}
|
||||||
|
|
||||||
.download-footer {
|
.download-footer {
|
||||||
text-align: center;
|
text-align: center;
|
||||||
|
|||||||
@ -1,7 +1,7 @@
|
|||||||
import { useState } from "preact/hooks";
|
import { useLayoutEffect, useState } from "preact/hooks";
|
||||||
import Card from "../../components/Card.js";
|
import Card from "../../components/Card.js";
|
||||||
import Section from "../../components/Section.js";
|
import Section from "../../components/Section.js";
|
||||||
import { App, Architecture, buildDownloadUrl, downloadMatrix, DownloadMatrixEntry, getArchitecture, Platform } from "../../download-helper.js";
|
import { App, Architecture, buildDownloadUrl, downloadMatrix, DownloadMatrixEntry, getArchitecture, getPlatform, Platform } from "../../download-helper.js";
|
||||||
import { usePageTitle } from "../../hooks.js";
|
import { usePageTitle } from "../../hooks.js";
|
||||||
import Button, { Link } from "../../components/Button.js";
|
import Button, { Link } from "../../components/Button.js";
|
||||||
import Icon from "../../components/Icon.js";
|
import Icon from "../../components/Icon.js";
|
||||||
@ -10,8 +10,15 @@ import "./get-started.css";
|
|||||||
import packageJson from "../../../../../package.json" with { type: "json" };
|
import packageJson from "../../../../../package.json" with { type: "json" };
|
||||||
|
|
||||||
export default function DownloadPage() {
|
export default function DownloadPage() {
|
||||||
const [ currentArch, setCurrentArch ] = useState(getArchitecture() ?? "x64");
|
const [ currentArch, setCurrentArch ] = useState<Architecture>("x64");
|
||||||
usePageTitle("Download");
|
const [ userPlatform, setUserPlatform ] = useState<Platform>();
|
||||||
|
|
||||||
|
useLayoutEffect(() => {
|
||||||
|
getArchitecture().then((arch) => setCurrentArch(arch ?? "x64"));
|
||||||
|
setUserPlatform(getPlatform() ?? "windows");
|
||||||
|
}, []);
|
||||||
|
|
||||||
|
usePageTitle("Get started");
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<>
|
<>
|
||||||
@ -31,7 +38,10 @@ export default function DownloadPage() {
|
|||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div className="grid-3-cols download-desktop">
|
<div className="grid-3-cols download-desktop">
|
||||||
{Object.entries(downloadMatrix.desktop).map(entry => <DownloadCard app="desktop" arch={currentArch} entry={entry} />)}
|
{reorderPlatforms(Object.entries(downloadMatrix.desktop), userPlatform ?? "")
|
||||||
|
.map(entry => (
|
||||||
|
<DownloadCard app="desktop" arch={currentArch} entry={entry} isRecommended={userPlatform === entry[0]} />
|
||||||
|
))}
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="download-footer">
|
<div class="download-footer">
|
||||||
@ -41,14 +51,21 @@ export default function DownloadPage() {
|
|||||||
|
|
||||||
<Section title="Set up a server for access on multiple devices">
|
<Section title="Set up a server for access on multiple devices">
|
||||||
<div className="grid-2-cols download-server">
|
<div className="grid-2-cols download-server">
|
||||||
{Object.entries(downloadMatrix.server).map(entry => <DownloadCard app="server" arch={currentArch} entry={entry} />)}
|
{Object.entries(downloadMatrix.server).map(entry => (
|
||||||
|
<DownloadCard app="server" arch={currentArch} entry={entry} />
|
||||||
|
))}
|
||||||
</div>
|
</div>
|
||||||
</Section>
|
</Section>
|
||||||
</>
|
</>
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
||||||
export function DownloadCard({ app, arch, entry: [ platform, entry ] }: { app: App, arch: Architecture, entry: [string, DownloadMatrixEntry] }) {
|
export function DownloadCard({ app, arch, entry: [ platform, entry ], isRecommended }: {
|
||||||
|
app: App,
|
||||||
|
arch: Architecture,
|
||||||
|
entry: [string, DownloadMatrixEntry],
|
||||||
|
isRecommended?: boolean;
|
||||||
|
}) {
|
||||||
function unwrapText(text: string | Record<Architecture, string>) {
|
function unwrapText(text: string | Record<Architecture, string>) {
|
||||||
return (typeof text === "string" ? text : text[arch]);
|
return (typeof text === "string" ? text : text[arch]);
|
||||||
}
|
}
|
||||||
@ -58,7 +75,9 @@ export function DownloadCard({ app, arch, entry: [ platform, entry ] }: { app: A
|
|||||||
const restDownloads = allDownloads.filter(download => !download[1].recommended);
|
const restDownloads = allDownloads.filter(download => !download[1].recommended);
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<Card title={<>
|
<Card
|
||||||
|
title={
|
||||||
|
<>
|
||||||
{unwrapText(entry.title)}
|
{unwrapText(entry.title)}
|
||||||
{entry.helpUrl && (
|
{entry.helpUrl && (
|
||||||
<Link
|
<Link
|
||||||
@ -69,9 +88,13 @@ export function DownloadCard({ app, arch, entry: [ platform, entry ] }: { app: A
|
|||||||
<Icon svg={helpIcon} />
|
<Icon svg={helpIcon} />
|
||||||
</Link>
|
</Link>
|
||||||
)}
|
)}
|
||||||
</>} className="download-card">
|
</>
|
||||||
|
}
|
||||||
|
className={`download-card ${platform} ${isRecommended ? "recommended" : ""}`}
|
||||||
|
>
|
||||||
{unwrapText(entry.description)}
|
{unwrapText(entry.description)}
|
||||||
|
|
||||||
|
{entry.quickStartTitle && <p class="quick-start-title">{entry.quickStartTitle}</p>}
|
||||||
{entry.quickStartCode && (
|
{entry.quickStartCode && (
|
||||||
<pre className="quick-start">
|
<pre className="quick-start">
|
||||||
<code>{entry.quickStartCode}</code>
|
<code>{entry.quickStartCode}</code>
|
||||||
@ -104,3 +127,13 @@ export function DownloadCard({ app, arch, entry: [ platform, entry ] }: { app: A
|
|||||||
</Card>
|
</Card>
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function reorderPlatforms(entries: [string, DownloadMatrixEntry][], platformToCenter: Platform | "") {
|
||||||
|
const entryToCenter = entries.find(x => x[0] === platformToCenter);
|
||||||
|
if (!entryToCenter) return entries;
|
||||||
|
|
||||||
|
const others = entries.filter(x => x !== entryToCenter);
|
||||||
|
const mid = Math.floor(others.length / 2);
|
||||||
|
others.splice(mid, 0, entryToCenter);
|
||||||
|
return others;
|
||||||
|
}
|
||||||
|
|||||||
@ -47,7 +47,8 @@ section.hero-section {
|
|||||||
}
|
}
|
||||||
|
|
||||||
.title-section {
|
.title-section {
|
||||||
flex-basis: 40%;
|
flex-basis: 30%;
|
||||||
|
flex-shrink: 0;
|
||||||
color: var(--muted-color);
|
color: var(--muted-color);
|
||||||
|
|
||||||
h1 {
|
h1 {
|
||||||
@ -57,6 +58,10 @@ section.hero-section {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.screenshot-container {
|
||||||
|
flex-grow: 1;
|
||||||
|
}
|
||||||
|
|
||||||
.screenshot {
|
.screenshot {
|
||||||
position: relative;
|
position: relative;
|
||||||
width: 100%;
|
width: 100%;
|
||||||
|
|||||||
@ -60,6 +60,7 @@ function HeroSection() {
|
|||||||
setScreenshotUrl(`/screenshot_desktop_mac_${colorScheme}.webp`);
|
setScreenshotUrl(`/screenshot_desktop_mac_${colorScheme}.webp`);
|
||||||
break;
|
break;
|
||||||
case "linux":
|
case "linux":
|
||||||
|
setScreenshotUrl(`/screenshot_desktop_linux_${colorScheme}.webp`);
|
||||||
break;
|
break;
|
||||||
case "windows":
|
case "windows":
|
||||||
default:
|
default:
|
||||||
@ -76,7 +77,6 @@ function HeroSection() {
|
|||||||
|
|
||||||
<div className="download-wrapper">
|
<div className="download-wrapper">
|
||||||
<DownloadButton big />
|
<DownloadButton big />
|
||||||
<a class="more-download-options desktop-only" href="./get-started/">More platforms & server setup</a>
|
|
||||||
<Button href="./get-started/" className="mobile-only" text="Get started" />
|
<Button href="./get-started/" className="mobile-only" text="Get started" />
|
||||||
<div className="additional-options">
|
<div className="additional-options">
|
||||||
<Button iconSvg={gitHubIcon} outline text="GitHub" href="https://github.com/TriliumNext/Trilium/" openExternally />
|
<Button iconSvg={gitHubIcon} outline text="GitHub" href="https://github.com/TriliumNext/Trilium/" openExternally />
|
||||||
@ -86,7 +86,9 @@ function HeroSection() {
|
|||||||
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
<div className="screenshot-container">
|
||||||
{screenshotUrl && <img class="screenshot" src={screenshotUrl} alt="Screenshot of the Trilium Notes desktop application" />}
|
{screenshotUrl && <img class="screenshot" src={screenshotUrl} alt="Screenshot of the Trilium Notes desktop application" />}
|
||||||
|
</div>
|
||||||
</Section>
|
</Section>
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|||||||
@ -15,7 +15,7 @@
|
|||||||
:root {
|
:root {
|
||||||
--foreground-color: #fff;
|
--foreground-color: #fff;
|
||||||
--background-color: #0a0e14;
|
--background-color: #0a0e14;
|
||||||
--muted-color: #cacaca;
|
--muted-color: #c5c5c5;
|
||||||
--header-background-color: rgba(0, 0, 0, 0.75);
|
--header-background-color: rgba(0, 0, 0, 0.75);
|
||||||
--card-background-color: #ffffff12;
|
--card-background-color: #ffffff12;
|
||||||
--card-box-shadow: 0 0 12px rgba(0, 0, 0, 0.15);
|
--card-box-shadow: 0 0 12px rgba(0, 0, 0, 0.15);
|
||||||
|
|||||||
1
apps/website/src/types.d.ts
vendored
Normal file
@ -0,0 +1 @@
|
|||||||
|
/// <reference types="user-agent-data-types" />
|
||||||
2
docs/Developer Guide/!!!meta.json
vendored
@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"formatVersion": 2,
|
"formatVersion": 2,
|
||||||
"appVersion": "0.98.1",
|
"appVersion": "0.99.0",
|
||||||
"files": [
|
"files": [
|
||||||
{
|
{
|
||||||
"isClone": false,
|
"isClone": false,
|
||||||
|
|||||||
2
docs/Release Notes/!!!meta.json
vendored
@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"formatVersion": 2,
|
"formatVersion": 2,
|
||||||
"appVersion": "0.98.1",
|
"appVersion": "0.99.0",
|
||||||
"files": [
|
"files": [
|
||||||
{
|
{
|
||||||
"isClone": false,
|
"isClone": false,
|
||||||
|
|||||||
176
docs/User Guide/!!!meta.json
vendored
@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"formatVersion": 2,
|
"formatVersion": 2,
|
||||||
"appVersion": "0.98.1",
|
"appVersion": "0.99.0",
|
||||||
"files": [
|
"files": [
|
||||||
{
|
{
|
||||||
"isClone": false,
|
"isClone": false,
|
||||||
@ -6276,6 +6276,13 @@
|
|||||||
"value": "nRhnJkTT8cPs",
|
"value": "nRhnJkTT8cPs",
|
||||||
"isInheritable": false,
|
"isInheritable": false,
|
||||||
"position": 10
|
"position": 10
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"type": "relation",
|
||||||
|
"name": "internalLink",
|
||||||
|
"value": "R9pX4DGra2Vt",
|
||||||
|
"isInheritable": false,
|
||||||
|
"position": 20
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"format": "markdown",
|
"format": "markdown",
|
||||||
@ -6713,23 +6720,23 @@
|
|||||||
"dataFileName": "Lists.md",
|
"dataFileName": "Lists.md",
|
||||||
"attachments": [
|
"attachments": [
|
||||||
{
|
{
|
||||||
"attachmentId": "5cmICTYfg13g",
|
"attachmentId": "1d3z8mz0JANE",
|
||||||
"title": "image.png",
|
"title": "image.png",
|
||||||
"role": "image",
|
"role": "image",
|
||||||
"mime": "image/jpg",
|
"mime": "image/png",
|
||||||
"position": 10,
|
"position": 10,
|
||||||
"dataFileName": "Lists_image.png"
|
"dataFileName": "Lists_image.png"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"attachmentId": "6jl7tboJfutt",
|
"attachmentId": "7YtO7boIQcSu",
|
||||||
"title": "image.png",
|
"title": "image.png",
|
||||||
"role": "image",
|
"role": "image",
|
||||||
"mime": "image/jpg",
|
"mime": "image/png",
|
||||||
"position": 10,
|
"position": 10,
|
||||||
"dataFileName": "1_Lists_image.png"
|
"dataFileName": "1_Lists_image.png"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"attachmentId": "7Ledf67P1S1b",
|
"attachmentId": "eCftcYsVKdAI",
|
||||||
"title": "image.png",
|
"title": "image.png",
|
||||||
"role": "image",
|
"role": "image",
|
||||||
"mime": "image/png",
|
"mime": "image/png",
|
||||||
@ -6737,7 +6744,7 @@
|
|||||||
"dataFileName": "2_Lists_image.png"
|
"dataFileName": "2_Lists_image.png"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"attachmentId": "d4XfLoK5srYZ",
|
"attachmentId": "fB3ZhdfysYC3",
|
||||||
"title": "image.png",
|
"title": "image.png",
|
||||||
"role": "image",
|
"role": "image",
|
||||||
"mime": "image/jpg",
|
"mime": "image/jpg",
|
||||||
@ -6745,15 +6752,15 @@
|
|||||||
"dataFileName": "3_Lists_image.png"
|
"dataFileName": "3_Lists_image.png"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"attachmentId": "eL11eZMPwpmH",
|
"attachmentId": "IZewdPx4evIx",
|
||||||
"title": "image.png",
|
"title": "image.png",
|
||||||
"role": "image",
|
"role": "image",
|
||||||
"mime": "image/jpg",
|
"mime": "image/png",
|
||||||
"position": 10,
|
"position": 10,
|
||||||
"dataFileName": "4_Lists_image.png"
|
"dataFileName": "4_Lists_image.png"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"attachmentId": "EnkTpdeLJ6Ft",
|
"attachmentId": "JopMc0iA0dqA",
|
||||||
"title": "image.png",
|
"title": "image.png",
|
||||||
"role": "image",
|
"role": "image",
|
||||||
"mime": "image/jpg",
|
"mime": "image/jpg",
|
||||||
@ -6761,7 +6768,7 @@
|
|||||||
"dataFileName": "5_Lists_image.png"
|
"dataFileName": "5_Lists_image.png"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"attachmentId": "If3k6Tt5cPBt",
|
"attachmentId": "kZMYrJubac6T",
|
||||||
"title": "image.png",
|
"title": "image.png",
|
||||||
"role": "image",
|
"role": "image",
|
||||||
"mime": "image/jpg",
|
"mime": "image/jpg",
|
||||||
@ -6769,7 +6776,7 @@
|
|||||||
"dataFileName": "6_Lists_image.png"
|
"dataFileName": "6_Lists_image.png"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"attachmentId": "MxgVFEyXwRxo",
|
"attachmentId": "PGeVq8YAQBFA",
|
||||||
"title": "image.png",
|
"title": "image.png",
|
||||||
"role": "image",
|
"role": "image",
|
||||||
"mime": "image/png",
|
"mime": "image/png",
|
||||||
@ -6777,26 +6784,26 @@
|
|||||||
"dataFileName": "7_Lists_image.png"
|
"dataFileName": "7_Lists_image.png"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"attachmentId": "Te4LNZWv4ovM",
|
"attachmentId": "VgoG6BtlLYn7",
|
||||||
"title": "image.png",
|
"title": "image.png",
|
||||||
"role": "image",
|
"role": "image",
|
||||||
"mime": "image/png",
|
"mime": "image/jpg",
|
||||||
"position": 10,
|
"position": 10,
|
||||||
"dataFileName": "8_Lists_image.png"
|
"dataFileName": "8_Lists_image.png"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"attachmentId": "tqeIwudL5QEY",
|
"attachmentId": "y0zFP6x0IRRf",
|
||||||
"title": "image.png",
|
"title": "image.png",
|
||||||
"role": "image",
|
"role": "image",
|
||||||
"mime": "image/png",
|
"mime": "image/jpg",
|
||||||
"position": 10,
|
"position": 10,
|
||||||
"dataFileName": "9_Lists_image.png"
|
"dataFileName": "9_Lists_image.png"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"attachmentId": "zZGT8pbt2myS",
|
"attachmentId": "z8eVlXe2WKqr",
|
||||||
"title": "image.png",
|
"title": "image.png",
|
||||||
"role": "image",
|
"role": "image",
|
||||||
"mime": "image/png",
|
"mime": "image/jpg",
|
||||||
"position": 10,
|
"position": 10,
|
||||||
"dataFileName": "10_Lists_image.png"
|
"dataFileName": "10_Lists_image.png"
|
||||||
}
|
}
|
||||||
@ -9559,7 +9566,22 @@
|
|||||||
"isExpanded": false,
|
"isExpanded": false,
|
||||||
"type": "text",
|
"type": "text",
|
||||||
"mime": "text/html",
|
"mime": "text/html",
|
||||||
"attributes": [],
|
"attributes": [
|
||||||
|
{
|
||||||
|
"type": "relation",
|
||||||
|
"name": "internalLink",
|
||||||
|
"value": "9sRHySam5fXb",
|
||||||
|
"isInheritable": false,
|
||||||
|
"position": 10
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"type": "relation",
|
||||||
|
"name": "internalLink",
|
||||||
|
"value": "oPVyFC7WL2Lp",
|
||||||
|
"isInheritable": false,
|
||||||
|
"position": 20
|
||||||
|
}
|
||||||
|
],
|
||||||
"format": "markdown",
|
"format": "markdown",
|
||||||
"dataFileName": "Custom app-wide CSS.md",
|
"dataFileName": "Custom app-wide CSS.md",
|
||||||
"attachments": [
|
"attachments": [
|
||||||
@ -9572,7 +9594,7 @@
|
|||||||
"dataFileName": "Custom app-wide CSS_image.png"
|
"dataFileName": "Custom app-wide CSS_image.png"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"attachmentId": "TIerrMjmeich",
|
"attachmentId": "qBzZ9Qpxwoba",
|
||||||
"title": "image.png",
|
"title": "image.png",
|
||||||
"role": "image",
|
"role": "image",
|
||||||
"mime": "image/png",
|
"mime": "image/png",
|
||||||
@ -9580,12 +9602,20 @@
|
|||||||
"dataFileName": "1_Custom app-wide CSS_image.png"
|
"dataFileName": "1_Custom app-wide CSS_image.png"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"attachmentId": "YUrNq5vsCwHe",
|
"attachmentId": "TIerrMjmeich",
|
||||||
"title": "image.png",
|
"title": "image.png",
|
||||||
"role": "image",
|
"role": "image",
|
||||||
"mime": "image/png",
|
"mime": "image/png",
|
||||||
"position": 10,
|
"position": 10,
|
||||||
"dataFileName": "2_Custom app-wide CSS_image.png"
|
"dataFileName": "2_Custom app-wide CSS_image.png"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"attachmentId": "YUrNq5vsCwHe",
|
||||||
|
"title": "image.png",
|
||||||
|
"role": "image",
|
||||||
|
"mime": "image/png",
|
||||||
|
"position": 10,
|
||||||
|
"dataFileName": "3_Custom app-wide CSS_image.png"
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
@ -10360,115 +10390,129 @@
|
|||||||
{
|
{
|
||||||
"type": "relation",
|
"type": "relation",
|
||||||
"name": "internalLink",
|
"name": "internalLink",
|
||||||
"value": "6f9hih2hXXZk",
|
"value": "nBAXQFj20hS1",
|
||||||
"isInheritable": false,
|
"isInheritable": false,
|
||||||
"position": 20
|
"position": 20
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"type": "relation",
|
"type": "relation",
|
||||||
"name": "internalLink",
|
"name": "internalLink",
|
||||||
"value": "m523cpzocqaD",
|
"value": "6f9hih2hXXZk",
|
||||||
"isInheritable": false,
|
"isInheritable": false,
|
||||||
"position": 30
|
"position": 30
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"type": "relation",
|
"type": "relation",
|
||||||
"name": "internalLink",
|
"name": "internalLink",
|
||||||
"value": "iRwzGnHPzonm",
|
"value": "m523cpzocqaD",
|
||||||
"isInheritable": false,
|
"isInheritable": false,
|
||||||
"position": 40
|
"position": 40
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"type": "relation",
|
"type": "relation",
|
||||||
"name": "internalLink",
|
"name": "internalLink",
|
||||||
"value": "bdUJEHsAPYQR",
|
"value": "iRwzGnHPzonm",
|
||||||
"isInheritable": false,
|
"isInheritable": false,
|
||||||
"position": 50
|
"position": 50
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"type": "relation",
|
"type": "relation",
|
||||||
"name": "internalLink",
|
"name": "internalLink",
|
||||||
"value": "HcABDtFCkbFN",
|
"value": "bdUJEHsAPYQR",
|
||||||
"isInheritable": false,
|
"isInheritable": false,
|
||||||
"position": 60
|
"position": 60
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"type": "relation",
|
"type": "relation",
|
||||||
"name": "internalLink",
|
"name": "internalLink",
|
||||||
"value": "GTwFsgaA0lCt",
|
"value": "HcABDtFCkbFN",
|
||||||
"isInheritable": false,
|
"isInheritable": false,
|
||||||
"position": 70
|
"position": 70
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"type": "relation",
|
"type": "relation",
|
||||||
"name": "internalLink",
|
"name": "internalLink",
|
||||||
"value": "s1aBHPd79XYj",
|
"value": "GTwFsgaA0lCt",
|
||||||
"isInheritable": false,
|
"isInheritable": false,
|
||||||
"position": 80
|
"position": 80
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"type": "relation",
|
"type": "relation",
|
||||||
"name": "internalLink",
|
"name": "internalLink",
|
||||||
"value": "grjYqerjn243",
|
"value": "s1aBHPd79XYj",
|
||||||
"isInheritable": false,
|
"isInheritable": false,
|
||||||
"position": 90
|
"position": 90
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"type": "relation",
|
"type": "relation",
|
||||||
"name": "internalLink",
|
"name": "internalLink",
|
||||||
"value": "1vHRoWCEjj0L",
|
"value": "grjYqerjn243",
|
||||||
"isInheritable": false,
|
"isInheritable": false,
|
||||||
"position": 100
|
"position": 100
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"type": "relation",
|
"type": "relation",
|
||||||
"name": "internalLink",
|
"name": "internalLink",
|
||||||
"value": "gBbsAeiuUxI5",
|
"value": "1vHRoWCEjj0L",
|
||||||
"isInheritable": false,
|
"isInheritable": false,
|
||||||
"position": 110
|
"position": 110
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"type": "relation",
|
"type": "relation",
|
||||||
"name": "internalLink",
|
"name": "internalLink",
|
||||||
"value": "81SGnPGMk7Xc",
|
"value": "gBbsAeiuUxI5",
|
||||||
"isInheritable": false,
|
"isInheritable": false,
|
||||||
"position": 120
|
"position": 120
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"type": "relation",
|
"type": "relation",
|
||||||
"name": "internalLink",
|
"name": "internalLink",
|
||||||
"value": "W8vYD3Q1zjCR",
|
"value": "81SGnPGMk7Xc",
|
||||||
"isInheritable": false,
|
"isInheritable": false,
|
||||||
"position": 130
|
"position": 130
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"type": "relation",
|
"type": "relation",
|
||||||
"name": "internalLink",
|
"name": "internalLink",
|
||||||
"value": "WOcw2SLH6tbX",
|
"value": "W8vYD3Q1zjCR",
|
||||||
"isInheritable": false,
|
"isInheritable": false,
|
||||||
"position": 140
|
"position": 140
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"type": "relation",
|
"type": "relation",
|
||||||
"name": "internalLink",
|
"name": "internalLink",
|
||||||
"value": "bwZpz2ajCEwO",
|
"value": "WOcw2SLH6tbX",
|
||||||
"isInheritable": false,
|
"isInheritable": false,
|
||||||
"position": 150
|
"position": 150
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"type": "relation",
|
"type": "relation",
|
||||||
"name": "internalLink",
|
"name": "internalLink",
|
||||||
"value": "Wy267RK4M69c",
|
"value": "x3i7MxGccDuM",
|
||||||
"isInheritable": false,
|
"isInheritable": false,
|
||||||
"position": 160
|
"position": 160
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"type": "relation",
|
"type": "relation",
|
||||||
"name": "internalLink",
|
"name": "internalLink",
|
||||||
"value": "Qjt68inQ2bRj",
|
"value": "bwZpz2ajCEwO",
|
||||||
"isInheritable": false,
|
"isInheritable": false,
|
||||||
"position": 170
|
"position": 170
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
"type": "relation",
|
||||||
|
"name": "internalLink",
|
||||||
|
"value": "Wy267RK4M69c",
|
||||||
|
"isInheritable": false,
|
||||||
|
"position": 180
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"type": "relation",
|
||||||
|
"name": "internalLink",
|
||||||
|
"value": "Qjt68inQ2bRj",
|
||||||
|
"isInheritable": false,
|
||||||
|
"position": 190
|
||||||
|
},
|
||||||
{
|
{
|
||||||
"type": "label",
|
"type": "label",
|
||||||
"name": "shareAlias",
|
"name": "shareAlias",
|
||||||
@ -10487,14 +10531,6 @@
|
|||||||
"format": "markdown",
|
"format": "markdown",
|
||||||
"dataFileName": "Sharing.md",
|
"dataFileName": "Sharing.md",
|
||||||
"attachments": [
|
"attachments": [
|
||||||
{
|
|
||||||
"attachmentId": "2kLFcH6hel9i",
|
|
||||||
"title": "shared-list.png",
|
|
||||||
"role": "image",
|
|
||||||
"mime": "image/png",
|
|
||||||
"position": 10,
|
|
||||||
"dataFileName": "Sharing_shared-list.png"
|
|
||||||
},
|
|
||||||
{
|
{
|
||||||
"attachmentId": "ibqWQUOCMhIE",
|
"attachmentId": "ibqWQUOCMhIE",
|
||||||
"title": "image.png",
|
"title": "image.png",
|
||||||
@ -11385,6 +11421,13 @@
|
|||||||
"type": "text",
|
"type": "text",
|
||||||
"mime": "text/markdown",
|
"mime": "text/markdown",
|
||||||
"attributes": [
|
"attributes": [
|
||||||
|
{
|
||||||
|
"type": "relation",
|
||||||
|
"name": "internalLink",
|
||||||
|
"value": "tAassRL4RSQL",
|
||||||
|
"isInheritable": false,
|
||||||
|
"position": 10
|
||||||
|
},
|
||||||
{
|
{
|
||||||
"type": "label",
|
"type": "label",
|
||||||
"name": "shareAlias",
|
"name": "shareAlias",
|
||||||
@ -13189,6 +13232,49 @@
|
|||||||
"attachments": []
|
"attachments": []
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"isClone": false,
|
||||||
|
"noteId": "vElnKeDNPSVl",
|
||||||
|
"notePath": [
|
||||||
|
"pOsGYCXsbNQG",
|
||||||
|
"CdNpE2pqjmI6",
|
||||||
|
"vElnKeDNPSVl"
|
||||||
|
],
|
||||||
|
"title": "Logging",
|
||||||
|
"notePosition": 100,
|
||||||
|
"prefix": null,
|
||||||
|
"isExpanded": false,
|
||||||
|
"type": "text",
|
||||||
|
"mime": "text/html",
|
||||||
|
"attributes": [
|
||||||
|
{
|
||||||
|
"type": "relation",
|
||||||
|
"name": "internalLink",
|
||||||
|
"value": "bnyigUA2UK7s",
|
||||||
|
"isInheritable": false,
|
||||||
|
"position": 10
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"type": "label",
|
||||||
|
"name": "iconClass",
|
||||||
|
"value": "bx bx-terminal",
|
||||||
|
"isInheritable": false,
|
||||||
|
"position": 20
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"format": "markdown",
|
||||||
|
"dataFileName": "Logging.md",
|
||||||
|
"attachments": [
|
||||||
|
{
|
||||||
|
"attachmentId": "OFVZwVeITJOR",
|
||||||
|
"title": "image.png",
|
||||||
|
"role": "image",
|
||||||
|
"mime": "image/png",
|
||||||
|
"position": 10,
|
||||||
|
"dataFileName": "Logging_image.png"
|
||||||
|
}
|
||||||
|
]
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
|
|||||||
@ -1,6 +1,10 @@
|
|||||||
# Configuration (config.ini or environment variables)
|
# Configuration (config.ini or environment variables)
|
||||||
Trilium supports configuration via a file named `config.ini` and environment variables. This document provides a comprehensive reference for all configuration options.
|
Trilium supports configuration via a file named `config.ini` and environment variables. This document provides a comprehensive reference for all configuration options.
|
||||||
|
|
||||||
|
## Location of the configuration file
|
||||||
|
|
||||||
|
The configuration file is not located in the same directory as the application. Instead, the `config.ini` is located in the <a class="reference-link" href="../Installation%20%26%20Setup/Data%20directory.md">Data directory</a>. As such, the configuration file is only available after starting the application and creating a database.
|
||||||
|
|
||||||
## Configuration Precedence
|
## Configuration Precedence
|
||||||
|
|
||||||
Configuration values are loaded in the following order of precedence (highest to lowest):
|
Configuration values are loaded in the following order of precedence (highest to lowest):
|
||||||
|
|||||||
@ -16,7 +16,7 @@ Trilium allows you to share selected notes as **publicly accessible** read-only
|
|||||||
|
|
||||||
### By note type
|
### By note type
|
||||||
|
|
||||||
<table class="ck-table-resized"><colgroup><col style="width:19.92%;"><col style="width:41.66%;"><col style="width:38.42%;"></colgroup><thead><tr><th> </th><th>Supported features</th><th>Limitations</th></tr></thead><tbody><tr><th><a class="reference-link" href="../Note%20Types/Text.md">Text</a></th><td><ul><li>Table of contents.</li><li>Syntax highlight of code blocks, provided a language is selected (does not work if “Auto-detected” is enabled).</li><li>Rendering for math equations.</li></ul></td><td><ul><li>Including notes is not supported.</li><li>Inline Mermaid diagrams are not rendered.</li></ul></td></tr><tr><th><a class="reference-link" href="../Note%20Types/Code.md">Code</a></th><td><ul><li>Basic support (displaying the contents of the note in a monospace font).</li></ul></td><td><ul><li>No syntax highlight.</li></ul></td></tr><tr><th><a class="reference-link" href="../Note%20Types/Saved%20Search.md">Saved Search</a></th><td>Not supported.</td><td> </td></tr><tr><th><a class="reference-link" href="../Note%20Types/Relation%20Map.md">Relation Map</a></th><td>Not supported.</td><td> </td></tr><tr><th><a class="reference-link" href="../Note%20Types/Note%20Map.md">Note Map</a></th><td>Not supported.</td><td> </td></tr><tr><th><a class="reference-link" href="../Note%20Types/Render%20Note.md">Render Note</a></th><td>Not supported.</td><td> </td></tr><tr><th><a class="reference-link" href="../Note%20Types/Collections.md">Collections</a></th><td><ul><li>The child notes are displayed in a fixed format. </li></ul></td><td><ul><li>More advanced view types such as the calendar view are not supported.</li></ul></td></tr><tr><th><a class="reference-link" href="../Note%20Types/Mermaid%20Diagrams.md">Mermaid Diagrams</a></th><td><ul><li>The diagram is displayed as a vector image.</li></ul></td><td><ul><li>No further interaction supported.</li></ul></td></tr><tr><th><a class="reference-link" href="../Note%20Types/Canvas.md">Canvas</a></th><td><ul><li>The diagram is displayed as a vector image.</li></ul></td><td><ul><li>No further interaction supported.</li></ul></td></tr><tr><th><a class="reference-link" href="../Note%20Types/Web%20View.md">Web View</a></th><td>Not supported.</td><td> </td></tr><tr><th><a class="reference-link" href="../Note%20Types/Mind%20Map.md">Mind Map</a></th><td>The diagram is displayed as a vector image.</td><td><ul><li>No further interaction supported.</li></ul></td></tr><tr><th><a class="reference-link" href="../Note%20Types/Collections/Geo%20Map%20View.md">Geo Map View</a></th><td>Not supported.</td><td> </td></tr><tr><th><a class="reference-link" href="../Note%20Types/File.md">File</a></th><td>Basic interaction (downloading the file).</td><td><ul><li>No further interaction supported.</li></ul></td></tr></tbody></table>
|
<table class="ck-table-resized"><colgroup><col style="width:19.92%;"><col style="width:41.66%;"><col style="width:38.42%;"></colgroup><thead><tr><th> </th><th>Supported features</th><th>Limitations</th></tr></thead><tbody><tr><th><a class="reference-link" href="../Note%20Types/Text.md">Text</a></th><td><ul><li data-list-item-id="e26b4ce9ba4e9dfe224d04e0f341925ed">Table of contents.</li><li data-list-item-id="e9707fdfa2c92d66690cf932f7e647253">Syntax highlight of code blocks, provided a language is selected (does not work if “Auto-detected” is enabled).</li><li data-list-item-id="e84420a10c6d64bd107edb6e867c91d4b">Rendering for math equations.</li><li data-list-item-id="e10834dcd0619d77ae2e94d3695bedf58"><a href="../Note%20Types/Text/Include%20Note.md">Including notes</a> (only if the included notes are also shared).</li></ul></td><td><ul><li data-list-item-id="e41cc4139377f9f88d653d1eb8ca47bb4">Inline Mermaid diagrams are not rendered.</li></ul></td></tr><tr><th><a class="reference-link" href="../Note%20Types/Code.md">Code</a></th><td><ul><li data-list-item-id="e291ae6d5130677b4c99f7c3bdbe974b4">Basic support (displaying the contents of the note in a monospace font).</li></ul></td><td><ul><li data-list-item-id="e0270680bbdd7a129306e61e11691e36d">No syntax highlight.</li></ul></td></tr><tr><th><a class="reference-link" href="../Note%20Types/Saved%20Search.md">Saved Search</a></th><td>Not supported.</td><td> </td></tr><tr><th><a class="reference-link" href="../Note%20Types/Relation%20Map.md">Relation Map</a></th><td>Not supported.</td><td> </td></tr><tr><th><a class="reference-link" href="../Note%20Types/Note%20Map.md">Note Map</a></th><td>Not supported.</td><td> </td></tr><tr><th><a class="reference-link" href="../Note%20Types/Render%20Note.md">Render Note</a></th><td>Not supported.</td><td> </td></tr><tr><th><a class="reference-link" href="../Note%20Types/Collections.md">Collections</a></th><td><ul><li data-list-item-id="ea031e1d4149eb443ace756234490c5a4">The child notes are displayed in a fixed format. </li></ul></td><td><ul><li data-list-item-id="ea4a9d424aec2afbaecc07bbf64b7bebd">More advanced view types such as the calendar view are not supported.</li></ul></td></tr><tr><th><a class="reference-link" href="../Note%20Types/Mermaid%20Diagrams.md">Mermaid Diagrams</a></th><td><ul><li data-list-item-id="e582d283f2b1b30cbe5ae35d8e01b2bf2">The diagram is displayed as a vector image.</li></ul></td><td><ul><li data-list-item-id="e33268686446e3c217077201bb5964364">No further interaction supported.</li></ul></td></tr><tr><th><a class="reference-link" href="../Note%20Types/Canvas.md">Canvas</a></th><td><ul><li data-list-item-id="e443dd0e97c30cb12c77e8906a71569ea">The diagram is displayed as a vector image.</li></ul></td><td><ul><li data-list-item-id="efe151ef3f3826c825416417525fb5fb2">No further interaction supported.</li></ul></td></tr><tr><th><a class="reference-link" href="../Note%20Types/Web%20View.md">Web View</a></th><td>Not supported.</td><td> </td></tr><tr><th><a class="reference-link" href="../Note%20Types/Mind%20Map.md">Mind Map</a></th><td>The diagram is displayed as a vector image.</td><td><ul><li data-list-item-id="ed3b4fb473042f6e32b4502d4fa11a767">No further interaction supported.</li></ul></td></tr><tr><th><a class="reference-link" href="../Note%20Types/Collections/Geo%20Map%20View.md">Geo Map View</a></th><td>Not supported.</td><td> </td></tr><tr><th><a class="reference-link" href="../Note%20Types/File.md">File</a></th><td>Basic interaction (downloading the file).</td><td><ul><li data-list-item-id="ed87e836a39d127ebcbb33e9e59045afb">No further interaction supported.</li></ul></td></tr></tbody></table>
|
||||||
|
|
||||||
While the sharing feature is powerful, it has some limitations:
|
While the sharing feature is powerful, it has some limitations:
|
||||||
|
|
||||||
@ -31,32 +31,32 @@ Some of these limitations may be addressed in future updates.
|
|||||||
|
|
||||||
To use the sharing feature, you must have a <a class="reference-link" href="../Installation%20%26%20Setup/Server%20Installation.md">Server Installation</a> of Trilium. This is necessary because the notes will be hosted from the server.
|
To use the sharing feature, you must have a <a class="reference-link" href="../Installation%20%26%20Setup/Server%20Installation.md">Server Installation</a> of Trilium. This is necessary because the notes will be hosted from the server.
|
||||||
|
|
||||||
## How to Share a Note
|
## Sharing a note
|
||||||
|
|
||||||
1. **Enable Sharing**: To share a note, toggle the `Shared` switch within the note's interface. Once sharing is enabled, an URL will appear, which you can click to access the shared note.
|
1. **Enable Sharing**: To share a note, toggle the `Shared` switch within the note's interface. Once sharing is enabled, an URL will appear, which you can click to access the shared note.
|
||||||
|
|
||||||

|

|
||||||
2. **Access the Shared Note**: The link provided will open the note in your browser. If your server is not configured with a public IP, the URL will refer to `localhost (127.0.0.1)`.
|
2. **Access the Shared Note**: The link provided will open the note in your browser. If your server is not configured with a public IP, the URL will refer to `localhost (127.0.0.1)`.
|
||||||
|
|
||||||
## Sharing a Note Subtree
|
## Sharing a note subtree
|
||||||
|
|
||||||
When you share a note, you actually share the entire subtree of notes beneath it. If the note has child notes, they will also be included in the shared content. For example, sharing the "Formatting" subtree will display a page with basic navigation for exploring all the notes within that subtree.
|
When you share a note, you actually share the entire subtree of notes beneath it. If the note has child notes, they will also be included in the shared content. For example, sharing the "Formatting" subtree will display a page with basic navigation for exploring all the notes within that subtree.
|
||||||
|
|
||||||
## Viewing All Shared Notes
|
## Viewing and managing shared notes
|
||||||
|
|
||||||
You can view a list of all shared notes by clicking on "Show Shared Notes Subtree." This allows you to manage and navigate through all the notes you have made public.
|
You can view a list of all shared notes by clicking on "Show Shared Notes Subtree" in the <a class="reference-link" href="../Basic%20Concepts%20and%20Features/UI%20Elements/Global%20menu.md">Global menu</a>. This allows you to manage and navigate through all the notes you have made public.
|
||||||
|
|
||||||
## Security Considerations
|
## Security considerations
|
||||||
|
|
||||||
Shared notes are published on the open internet and can be accessed by anyone with the URL. The URL's randomness does not provide security, so it is crucial not to share sensitive information through this feature.
|
Shared notes are published on the open internet and can be accessed by anyone with the URL. The URL's randomness does not provide security, so it is crucial not to share sensitive information through this feature.
|
||||||
|
|
||||||
### Password Protection
|
### Password protection
|
||||||
|
|
||||||
To protect shared notes with a username and password, you can use the `#shareCredentials` attribute. Add this label to the note with the format `#shareCredentials="username:password"`. To protect an entire subtree, make sure the label is [inheritable](Attributes/Attribute%20Inheritance.md).
|
To protect shared notes with a username and password, you can use the `#shareCredentials` attribute. Add this label to the note with the format `#shareCredentials="username:password"`. To protect an entire subtree, make sure the label is [inheritable](Attributes/Attribute%20Inheritance.md).
|
||||||
|
|
||||||
## Advanced Sharing Options
|
## Advanced sharing options
|
||||||
|
|
||||||
### Customizing the Appearance of Shared Notes
|
### Customizing the appearance of shared notes
|
||||||
|
|
||||||
The default design should be a good starting point, but you can customize it using your own CSS:
|
The default design should be a good starting point, but you can customize it using your own CSS:
|
||||||
|
|
||||||
@ -78,7 +78,7 @@ for (const attr of parentNote.attributes) {
|
|||||||
}
|
}
|
||||||
```
|
```
|
||||||
|
|
||||||
### Creating Human-Readable URL Aliases
|
### Creating human-readable URL aliases
|
||||||
|
|
||||||
Shared notes typically have URLs like `http://domain.tld/share/knvU8aJy4dJ7`, where the last part is the note's ID. You can make these URLs more user-friendly by adding the `#shareAlias` label to individual notes (e.g., `#shareAlias=highlighting`). This will change the URL to `http://domain.tld/share/highlighting`.
|
Shared notes typically have URLs like `http://domain.tld/share/knvU8aJy4dJ7`, where the last part is the note's ID. You can make these URLs more user-friendly by adding the `#shareAlias` label to individual notes (e.g., `#shareAlias=highlighting`). This will change the URL to `http://domain.tld/share/highlighting`.
|
||||||
|
|
||||||
@ -87,23 +87,26 @@ Shared notes typically have URLs like `http://domain.tld/share/knvU8aJy4dJ7`, wh
|
|||||||
1. Ensure that aliases are unique.
|
1. Ensure that aliases are unique.
|
||||||
2. Using slashes (`/`) within aliases to create subpaths is not supported.
|
2. Using slashes (`/`) within aliases to create subpaths is not supported.
|
||||||
|
|
||||||
### Viewing and Managing Shared Notes
|
### Setting a custom favicon
|
||||||
|
|
||||||
All shared notes are grouped under an automatically managed "Shared Notes" section. From here, you can view, share, or unshare notes by moving or cloning them within this section.
|
|
||||||
|
|
||||||

|
|
||||||
|
|
||||||
### Setting a Custom Favicon
|
|
||||||
|
|
||||||
To customize the favicon for your shared pages, create a relation `~shareFavicon` pointing to a file note containing the favicon (e.g., in `.ico` format).
|
To customize the favicon for your shared pages, create a relation `~shareFavicon` pointing to a file note containing the favicon (e.g., in `.ico` format).
|
||||||
|
|
||||||
### Sharing a Note as the Root
|
### Sharing a note as the root
|
||||||
|
|
||||||
You can designate a specific note or folder as the root of your shared content by adding the `#shareRoot` label. This note will be linked when visiting `[http://domain.tld/share](http://domain/share)`, making it easier to use Trilium as a fully-fledged website. Consider combining this with the `#shareIndex` label, which will display a list of all shared notes.
|
You can designate a specific note or folder as the root of your shared content by adding the `#shareRoot` label. This note will be linked when visiting `[http://domain.tld/share](http://domain/share)`, making it easier to use Trilium as a fully-fledged website.
|
||||||
|
|
||||||
|
> [!TIP]
|
||||||
|
> Consider combining this with the `#shareIndex` label, which will display a list of all shared notes.
|
||||||
|
|
||||||
|
### Displaying an index of shared notes
|
||||||
|
|
||||||
|
When accessing a share, the sub-notes will be displayed in a tree on the left. But since multiple note trees can be shared, it might be useful to display a list of all the different share trees.
|
||||||
|
|
||||||
|
To do so, create a shared text note and apply the `shareIndex` label. When viewed, the list of shared roots will be displayed at the bottom of the note.
|
||||||
|
|
||||||
## Attribute reference
|
## Attribute reference
|
||||||
|
|
||||||
<table><thead><tr><th>Attribute</th><th>Description</th></tr></thead><tbody><tr><td><code>shareHiddenFromTree</code></td><td>this note is hidden from left navigation tree, but still accessible with its URL</td></tr><tr><td><code>shareExternalLink</code></td><td>note will act as a link to an external website in the share tree</td></tr><tr><td><code>shareAlias</code></td><td>define an alias using which the note will be available under <code>https://your_trilium_host/share/[your_alias]</code></td></tr><tr><td><code>shareOmitDefaultCss</code></td><td>default share page CSS will be omitted. Use when you make extensive styling changes.</td></tr><tr><td><code>shareRoot</code></td><td>marks note which is served on /share root.</td></tr><tr><td><code>shareDescription</code></td><td>define text to be added to the HTML meta tag for description</td></tr><tr><td><code>shareRaw</code></td><td>Note will be served in its raw format, without HTML wrapper. See also <a class="reference-link" href="Sharing/Serving%20directly%20the%20content%20o.md">Serving directly the content of a note</a> for an alternative method without setting an attribute.</td></tr><tr><td><code>shareDisallowRobotIndexing</code></td><td><p>Indicates to web crawlers that the page should not be indexed of this note by:</p><ul><li>Setting the <code>X-Robots-Tag: noindex</code> HTTP header.</li><li>Setting the <code>noindex, follow</code> meta tag.</li></ul></td></tr><tr><td><code>shareCredentials</code></td><td>require credentials to access this shared note. Value is expected to be in format <code>username:password</code>. Don't forget to make this inheritable to apply to child-notes/images.</td></tr><tr><td><code>shareIndex</code></td><td>Note with this label will list all roots of shared notes.</td></tr></tbody></table>
|
<table><thead><tr><th>Attribute</th><th>Description</th></tr></thead><tbody><tr><td><code>shareHiddenFromTree</code></td><td>this note is hidden from left navigation tree, but still accessible with its URL</td></tr><tr><td><code>shareExternalLink</code></td><td>note will act as a link to an external website in the share tree</td></tr><tr><td><code>shareAlias</code></td><td>define an alias using which the note will be available under <code>https://your_trilium_host/share/[your_alias]</code></td></tr><tr><td><code>shareOmitDefaultCss</code></td><td>default share page CSS will be omitted. Use when you make extensive styling changes.</td></tr><tr><td><code>shareRoot</code></td><td>marks note which is served on /share root.</td></tr><tr><td><code>shareDescription</code></td><td>define text to be added to the HTML meta tag for description</td></tr><tr><td><code>shareRaw</code></td><td>Note will be served in its raw format, without HTML wrapper. See also <a class="reference-link" href="Sharing/Serving%20directly%20the%20content%20o.md">Serving directly the content of a note</a> for an alternative method without setting an attribute.</td></tr><tr><td><code>shareDisallowRobotIndexing</code></td><td><p>Indicates to web crawlers that the page should not be indexed of this note by:</p><ul><li data-list-item-id="e6baa9f60bf59d085fd31aa2cce07a0e7">Setting the <code>X-Robots-Tag: noindex</code> HTTP header.</li><li data-list-item-id="ec0d067db136ef9794e4f1033405880b7">Setting the <code>noindex, follow</code> meta tag.</li></ul></td></tr><tr><td><code>shareCredentials</code></td><td>require credentials to access this shared note. Value is expected to be in format <code>username:password</code>. Don't forget to make this inheritable to apply to child-notes/images.</td></tr><tr><td><code>shareIndex</code></td><td>Note with this label will list all roots of shared notes.</td></tr></tbody></table>
|
||||||
|
|
||||||
## Credits
|
## Credits
|
||||||
|
|
||||||
|
|||||||
|
Before Width: | Height: | Size: 8.7 KiB |
|
Before Width: | Height: | Size: 160 B After Width: | Height: | Size: 8.5 KiB |
|
Before Width: | Height: | Size: 8.5 KiB After Width: | Height: | Size: 172 B |
|
Before Width: | Height: | Size: 158 B After Width: | Height: | Size: 147 B |
|
Before Width: | Height: | Size: 3.9 KiB After Width: | Height: | Size: 154 B |
|
Before Width: | Height: | Size: 154 B After Width: | Height: | Size: 158 B |
|
Before Width: | Height: | Size: 172 B After Width: | Height: | Size: 9.0 KiB |
|
Before Width: | Height: | Size: 147 B After Width: | Height: | Size: 3.9 KiB |
@ -13,6 +13,14 @@ Note that this feature is meant for generally small snippets of code. For larger
|
|||||||
* Type ` ``` ` (as in Markdown).
|
* Type ` ``` ` (as in Markdown).
|
||||||
* Note that it's not possible to specify the language, as it will default to the last selected language.
|
* Note that it's not possible to specify the language, as it will default to the last selected language.
|
||||||
|
|
||||||
|
## Exiting out of the code block
|
||||||
|
|
||||||
|
* To exit out of a code block and enter a normal paragraph, move the cursor at the end of the code block and press <kbd>Enter</kbd> twice.
|
||||||
|
* Similarly, to insert a paragraph above the note block, move the cursor at the beginning of the code block and press <kbd>Enter</kbd> twice.
|
||||||
|
|
||||||
|
> [!NOTE]
|
||||||
|
> If you've pasted a code block with a more complex HTML structure, exiting out of the code block by pressing <kbd>Enter</kbd> multiple times might not work. In that case the best approach is to delete the code block entirely and use <kbd>Ctrl</kbd>+<kbd>Shift</kbd>+<kbd>V</kbd> (paste as plain text).
|
||||||
|
|
||||||
## Syntax highlighting & color schemes
|
## Syntax highlighting & color schemes
|
||||||
|
|
||||||
Since TriliumNext v0.90.12, Trilium will try to offer syntax highlighting to the code block. Note that the syntax highlighting mechanism is slightly different than the one in <a class="reference-link" href="../../Code.md">Code</a> notes as different technologies are involved.
|
Since TriliumNext v0.90.12, Trilium will try to offer syntax highlighting to the code block. Note that the syntax highlighting mechanism is slightly different than the one in <a class="reference-link" href="../../Code.md">Code</a> notes as different technologies are involved.
|
||||||
|
|||||||
@ -4,3 +4,9 @@ Text notes can "include" another note as a read-only widget. This can be useful
|
|||||||
## Including a note
|
## Including a note
|
||||||
|
|
||||||
In the <a class="reference-link" href="Formatting%20toolbar.md">Formatting toolbar</a>, look for the  button. There is also a keyboard shortcut defined for it but it is not allocated by default.
|
In the <a class="reference-link" href="Formatting%20toolbar.md">Formatting toolbar</a>, look for the  button. There is also a keyboard shortcut defined for it but it is not allocated by default.
|
||||||
|
|
||||||
|
## Included notes in the share functionality
|
||||||
|
|
||||||
|
If a [shared note](../../Advanced%20Usage/Sharing.md) contains one or more included notes, they will be displayed in the content of the note as if they were part of the note itself.
|
||||||
|
|
||||||
|
For this to work, the included notes must also be shared, otherwise they will not be shown. However, the included notes can still be hidden from the note tree via `#shareHiddenFromTree`.
|
||||||
@ -1,23 +1,23 @@
|
|||||||
# Lists
|
# Lists
|
||||||
There are three types of lists supported by text notes:
|
There are three types of lists supported by text notes:
|
||||||
|
|
||||||
* <img src="7_Lists_image.png" width="17" height="13"> Bulleted lists (also known as unordered lists).
|
* <img src="4_Lists_image.png" width="17" height="13"> Bulleted lists (also known as unordered lists).
|
||||||
* <img src="8_Lists_image.png" width="18" height="16"> Numbered lists (or ordered lists).
|
* <img src="1_Lists_image.png" width="18" height="16"> Numbered lists (or ordered lists).
|
||||||
* <img src="10_Lists_image.png" width="19" height="13"> To-do lists
|
* <img src="Lists_image.png" width="19" height="13"> To-do lists
|
||||||
|
|
||||||
For bulleted and numbered lists, it's possible to configure an alternative marker such as squares or Roman numbering by pressing the <img src="9_Lists_image.png" width="10" height="6"> icon. For numbered lists, it's also possible to specify the number to start at or whether to count in reverse order.
|
For bulleted and numbered lists, it's possible to configure an alternative marker such as squares or Roman numbering by pressing the <img src="2_Lists_image.png" width="10" height="6"> icon. For numbered lists, it's also possible to specify the number to start at or whether to count in reverse order.
|
||||||
|
|
||||||
## Keyboard interaction
|
## Keyboard interaction
|
||||||
|
|
||||||
* To create a new list:
|
* To create a new list:
|
||||||
* Bulleted list: Start a line with `*` or `-` followed by a space;
|
* Bulleted list: Start a line with `*` or `-` followed by a space;
|
||||||
* Numbered list: Start a line with `1.` or `1)` followed by a space;
|
* Numbered list: Start a line with `1.` or `1)` followed by a space;
|
||||||
* To-do list: Start a line with `[ ]` for an unchecked item or `[x]` for a checked item.
|
* To-do list: Start a line with `- [ ]` for an unchecked item or `[x]` for a checked item.
|
||||||
* To create a new item in the list, press <kbd>Enter</kbd>.
|
* To create a new item in the list, press <kbd>Enter</kbd>.
|
||||||
* To create a blank line within a list item, press <kbd>Shift</kbd>+<kbd>Enter</kbd>.
|
* To create a blank line within a list item, press <kbd>Shift</kbd>+<kbd>Enter</kbd>.
|
||||||
* To exit out of the list, press <kbd>Enter</kbd> twice.
|
* To exit out of the list, press <kbd>Enter</kbd> twice.
|
||||||
* To merge two lists, simply delete the gap between them.
|
* To merge two lists, simply delete the gap between them.
|
||||||
* To create nested lists, simply use the <img src="2_Lists_image.png" width="17" height="14"> button (see _Indentation_ in <a class="reference-link" href="Other%20features.md">Other features</a>) or the <kbd>Tab</kbd> key. To decrease the nesting level for the current element, press <kbd>Shift</kbd>+<kbd>Tab</kbd>.
|
* To create nested lists, simply use the <img src="7_Lists_image.png" width="17" height="14"> button (see _Indentation_ in <a class="reference-link" href="Other%20features.md">Other features</a>) or the <kbd>Tab</kbd> key. To decrease the nesting level for the current element, press <kbd>Shift</kbd>+<kbd>Tab</kbd>.
|
||||||
|
|
||||||
## Headings, code blocks within lists
|
## Headings, code blocks within lists
|
||||||
|
|
||||||
@ -26,10 +26,15 @@ It possible to add content-level blocks such as headings, code blocks, tables wi
|
|||||||
| | | |
|
| | | |
|
||||||
| --- | --- | --- |
|
| --- | --- | --- |
|
||||||
| 1 |  | First, create a list. |
|
| 1 |  | First, create a list. |
|
||||||
| 2 |  | Press Enter to create a new list item. |
|
| 2 |  | Press Enter to create a new list item. |
|
||||||
| 3 |  | Press Backspace to get rid of the bullet point. Notice the cursor position. |
|
| 3 |  | Press Backspace to get rid of the bullet point. Notice the cursor position. |
|
||||||
| 4 | <img class="image_resized" style="aspect-ratio:676/112;width:98.29%;" src="1_Lists_image.png" width="676" height="112"> | At this point, insert any desired block-level item such as a code block. |
|
| 4 | <img class="image_resized" style="aspect-ratio:676/112;width:98.29%;" src="10_Lists_image.png" width="676" height="112"> | At this point, insert any desired block-level item such as a code block. |
|
||||||
| 5 | <img class="image_resized" style="aspect-ratio:675/129;width:94.22%;" src="Lists_image.png" width="675" height="129"> | To continue with a new bullet point, press Enter until the cursor moves to a new blank position. |
|
| 5 | <img class="image_resized" style="aspect-ratio:675/129;width:94.22%;" src="8_Lists_image.png" width="675" height="129"> | To continue with a new bullet point, press Enter until the cursor moves to a new blank position. |
|
||||||
| 6 | <img class="image_resized" style="aspect-ratio:675/129;width:100%;" src="3_Lists_image.png" width="675" height="129"> | Press Enter once more to create the new bullet. |
|
| 6 | <img class="image_resized" style="aspect-ratio:675/129;width:100%;" src="3_Lists_image.png" width="675" height="129"> | Press Enter once more to create the new bullet. |
|
||||||
|
|
||||||
The same principle applies to all three list types (bullet, numbered and to-do).
|
The same principle applies to all three list types (bullet, numbered and to-do).
|
||||||
|
|
||||||
|
## To-do lists
|
||||||
|
|
||||||
|
* To insert a to-do list from the keyboard, type `- [ ]` for an unchecked item or `[x]` for a checked item while on an empty paragraph.
|
||||||
|
* To reorder the item under the cursor, press <kbd>Alt</kbd>+<kbd>Up</kbd> or <kbd>Alt</kbd>+<kbd>Down</kbd>. To reorder multiple items, select them first.
|
||||||
|
Before Width: | Height: | Size: 9.0 KiB After Width: | Height: | Size: 160 B |
@ -3,20 +3,26 @@
|
|||||||
|
|
||||||
Within text notes, it's possible to enter mathematical equations using the <img src="1_Math Equations_image.png" width="20" height="15"> button from the <a class="reference-link" href="Formatting%20toolbar.md">Formatting toolbar</a> (generally found under the <a class="reference-link" href="Insert%20buttons.md">Insert buttons</a>).
|
Within text notes, it's possible to enter mathematical equations using the <img src="1_Math Equations_image.png" width="20" height="15"> button from the <a class="reference-link" href="Formatting%20toolbar.md">Formatting toolbar</a> (generally found under the <a class="reference-link" href="Insert%20buttons.md">Insert buttons</a>).
|
||||||
|
|
||||||
If inserting equations frequently, using the <kbd>Ctrl</kbd>+<kbd>M</kbd> keyboard shortcut can be more comfortable. Alternatively, type `$$` or `\[` to trigger the popup directly.
|
|
||||||
|
|
||||||
There is currently no quick way to insert an equation, such as surrounding it with `$` or pressing <kbd>Ctrl</kbd>+<kbd>M</kbd> on an already typed-out equation.
|
|
||||||
|
|
||||||
The mathematical expression must be written in the TeX format. There is no visual editor for the math equations, only a preview.
|
The mathematical expression must be written in the TeX format. There is no visual editor for the math equations, only a preview.
|
||||||
|
|
||||||
Enabling _Display mode_ will render the equation slightly bigger (especially if using big operators such as summation, or fractions) and center it. Display mode equations will act as blocks (i.e. like paragraphs, or tables) and can be inserted for example in lists. Non-display equations can be part of the text.
|
Enabling _Display mode_ will render the equation slightly bigger (especially if using big operators such as summation, or fractions) and center it. Display mode equations will act as blocks (i.e. like paragraphs, or tables) and can be inserted for example in lists. Non-display equations can be part of the text.
|
||||||
|
|
||||||
|
## Keyboard shortcuts
|
||||||
|
|
||||||
|
If inserting equations frequently, using the <kbd>Ctrl</kbd>+<kbd>M</kbd> keyboard shortcut can be more comfortable. Alternatively, type `$$` or `\[` to trigger the popup directly.
|
||||||
|
|
||||||
|
There is currently no quick way to turn an already typed-out equation, such as surrounding it with `$` or pressing <kbd>Ctrl</kbd>+<kbd>M</kbd>.
|
||||||
|
|
||||||
## Supported math features
|
## Supported math features
|
||||||
|
|
||||||
Technically we are using the KaTeX library which allows for a subset of the TeX format. To see the full list of supported features, consult the [Supported Functions](https://katex.org/docs/supported) and the [Support Table](https://katex.org/docs/support_table) from the official documentation.
|
Technically we are using the KaTeX library which allows for a subset of the TeX format. To see the full list of supported features, consult the [Supported Functions](https://katex.org/docs/supported) and the [Support Table](https://katex.org/docs/support_table) from the official documentation.
|
||||||
|
|
||||||
## Markdown support
|
## Markdown support
|
||||||
|
|
||||||
Math equations will be preserved when exporting to or importing from Markdown, surrounded by `\(` characters for inline math expressions, and `$\)` for display mode.
|
Math equations will be preserved when exporting to or importing from Markdown, surrounded by `$` characters for inline math expressions, and `$$` for display mode.
|
||||||
|
|
||||||
If you notice any issue with the Markdown import/export for equations, feel free to [report](../../Troubleshooting/Reporting%20issues.md) it while providing the equation that causes issues.
|
If you notice any issue with the Markdown import/export for equations, feel free to [report](../../Troubleshooting/Reporting%20issues.md) it while providing the equation that causes issues.
|
||||||
|
|
||||||
|
## Formatting the equation
|
||||||
|
|
||||||
|
It is possible to customize the font size and foreground color for both inline and display-mode equations, just like any other text. For inline equations, the background color/highlight can also be adjusted.
|
||||||
19
docs/User Guide/User Guide/Scripting/Logging.md
vendored
Normal file
@ -0,0 +1,19 @@
|
|||||||
|
# Logging
|
||||||
|
Both front-end and back-end notes can log messages for debugging.
|
||||||
|
|
||||||
|
## UI logging via `api.log`
|
||||||
|
|
||||||
|
<figure class="image image_resized image-style-align-center" style="width:57.74%;"><img style="aspect-ratio:749/545;" src="Logging_image.png" width="749" height="545"></figure>
|
||||||
|
|
||||||
|
The API log feature integrates with the script editor and it displays all the messages logged via `api.log`. This works for both back-end and front-end scripts.
|
||||||
|
|
||||||
|
The API log panel will appear after executing a script that uses `api.log` and it can be dismissed temporarily by pressing the close button in the top-right of the panel.
|
||||||
|
|
||||||
|
Apart from strings, an object can be passed as well in which case it will be pretty-formatted if possible (e.g. recursive objects are not supported).
|
||||||
|
|
||||||
|
## Console logging
|
||||||
|
|
||||||
|
For logs that are not directly visible to the user, the standard `console.log` can be used as well.
|
||||||
|
|
||||||
|
* For front-end scripts, the log will be shown in the Developer Tools (also known as Inspect).
|
||||||
|
* For back-end scripts, the log will be shown in the server output while running but **will not** be visible in the <a class="reference-link" href="../Troubleshooting/Error%20logs/Backend%20(server)%20logs.md">Backend (server) logs</a>.
|
||||||
BIN
docs/User Guide/User Guide/Scripting/Logging_image.png
vendored
Normal file
|
After Width: | Height: | Size: 49 KiB |
|
Before Width: | Height: | Size: 3.9 KiB After Width: | Height: | Size: 29 KiB |
|
Before Width: | Height: | Size: 5.6 KiB After Width: | Height: | Size: 3.9 KiB |
BIN
docs/User Guide/User Guide/Theme development/3_Custom app-wide CSS_image.png
vendored
Normal file
|
After Width: | Height: | Size: 5.6 KiB |
@ -4,14 +4,16 @@ It is possible to provide a CSS file to be used regardless of the theme set by t
|
|||||||
| | |
|
| | |
|
||||||
| --- | --- |
|
| --- | --- |
|
||||||
|  | Start by creating a new note and changing the note type to CSS |
|
|  | Start by creating a new note and changing the note type to CSS |
|
||||||
|  | In the ribbon, press the “Owned Attributes” section and type `#appCss`. |
|
|  | In the ribbon, press the “Owned Attributes” section and type `#appCss`. |
|
||||||
|  | Type the desired CSS. <br> <br>Generally it's a good idea to append `!important` for the styles that are being changed, in order to prevent other |
|
|  | Type the desired CSS. <br> <br>Generally it's a good idea to append `!important` for the styles that are being changed, in order to prevent other |
|
||||||
|
|
||||||
## Seeing the changes
|
## Seeing the changes
|
||||||
|
|
||||||
Adding a new _app CSS note_ or modifying an existing one does not immediately apply changes. To see the changes, press Ctrl+Shift+R to refresh the page first.
|
Adding a new _app CSS note_ or modifying an existing one does not immediately apply changes. To see the changes, press Ctrl+Shift+R to refresh the page first.
|
||||||
|
|
||||||
## Example use-case: customizing the printing stylesheet
|
## Sample use cases
|
||||||
|
|
||||||
|
### Customizing the printing stylesheet
|
||||||
|
|
||||||
When printing a document or exporting as PDF, it is possible to adjust the style by creating a CSS note that uses the `@media` selector.
|
When printing a document or exporting as PDF, it is possible to adjust the style by creating a CSS note that uses the `@media` selector.
|
||||||
|
|
||||||
@ -19,14 +21,61 @@ For example, to change the font of the document from the one defined by the them
|
|||||||
|
|
||||||
```
|
```
|
||||||
@media print {
|
@media print {
|
||||||
|
|
||||||
body {
|
body {
|
||||||
|
|
||||||
--main-font-family: serif !important;
|
--main-font-family: serif !important;
|
||||||
|
|
||||||
--detail-font-family: var(--main-font-family) !important;
|
--detail-font-family: var(--main-font-family) !important;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|
||||||
|
### Per-workspace styles
|
||||||
|
|
||||||
|
When using <a class="reference-link" href="../Basic%20Concepts%20and%20Features/Navigation/Workspaces.md">Workspaces</a>, it can be helpful to create a visual distinction between notes in different workspaces.
|
||||||
|
|
||||||
|
To do so:
|
||||||
|
|
||||||
|
1. In the note with `#workspace`, add an inheritable attribute `#cssClass(inheritable)` with a value that uniquely identifies the workspace (say `my-workspace`).
|
||||||
|
2. Anywhere in the note structure, create a CSS note with `#appCss`.
|
||||||
|
|
||||||
|
#### Change the color of the icons in the <a class="reference-link" href="../Basic%20Concepts%20and%20Features/UI%20Elements/Note%20Tree.md">Note Tree</a>
|
||||||
|
|
||||||
|
```
|
||||||
|
.fancytree-node.my-workspace.fancytree-custom-icon {
|
||||||
|
color: #ff0000;
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|
||||||
|
#### Change the color of the note title and the icon
|
||||||
|
|
||||||
|
To change the color of the note title and the icon (above the content):
|
||||||
|
|
||||||
|
```
|
||||||
|
.note-split.my-workspace .note-icon-widget button.note-icon,
|
||||||
|
.note-split.my-workspace .note-title-widget input.note-title {
|
||||||
|
color: #ff0000;
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|
||||||
|
#### Add a watermark to the note content
|
||||||
|
|
||||||
|
<figure class="image image-style-align-right image_resized" style="width:39.97%;"><img style="aspect-ratio:641/630;" src="1_Custom app-wide CSS_image.png" width="641" height="630"></figure>
|
||||||
|
|
||||||
|
1. Insert an image in any note and take the URL of the image.
|
||||||
|
2. Use the following CSS, adjusting the `background-image` and `width` and `height` to the desired values.
|
||||||
|
|
||||||
|
```
|
||||||
|
.note-split.my-workspace .scrolling-container:after {
|
||||||
|
position: fixed;
|
||||||
|
content: "";
|
||||||
|
background-image: url("/api/attachments/Rvm3zJNITQI1/image/logo.png");
|
||||||
|
background-size: contain;
|
||||||
|
background-position: center;
|
||||||
|
background-repeat: no-repeat;
|
||||||
|
width: 237px;
|
||||||
|
height: 44px;
|
||||||
|
bottom: 1em;
|
||||||
|
right: 1em;
|
||||||
|
opacity: 0.5;
|
||||||
|
z-index: 0;
|
||||||
}
|
}
|
||||||
```
|
```
|
||||||
38
package.json
@ -37,33 +37,33 @@
|
|||||||
"private": true,
|
"private": true,
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@electron/rebuild": "4.0.1",
|
"@electron/rebuild": "4.0.1",
|
||||||
"@playwright/test": "^1.36.0",
|
"@playwright/test": "1.55.1",
|
||||||
"@triliumnext/server": "workspace:*",
|
"@triliumnext/server": "workspace:*",
|
||||||
"@types/express": "^5.0.0",
|
"@types/express": "5.0.3",
|
||||||
"@types/node": "22.18.6",
|
"@types/node": "22.18.8",
|
||||||
"@vitest/coverage-v8": "^3.0.5",
|
"@vitest/coverage-v8": "3.2.4",
|
||||||
"@vitest/ui": "^3.0.0",
|
"@vitest/ui": "3.2.4",
|
||||||
"chalk": "5.6.2",
|
"chalk": "5.6.2",
|
||||||
"cross-env": "10.0.0",
|
"cross-env": "10.1.0",
|
||||||
"dpdm": "3.14.0",
|
"dpdm": "3.14.0",
|
||||||
"esbuild": "^0.25.0",
|
"esbuild": "0.25.10",
|
||||||
"eslint": "^9.8.0",
|
"eslint": "9.36.0",
|
||||||
"eslint-config-prettier": "^10.0.0",
|
"eslint-config-prettier": "10.1.8",
|
||||||
"eslint-plugin-playwright": "^2.0.0",
|
"eslint-plugin-playwright": "2.2.2",
|
||||||
"eslint-plugin-react-hooks": "5.2.0",
|
"eslint-plugin-react-hooks": "6.1.0",
|
||||||
"happy-dom": "~19.0.0",
|
"happy-dom": "~19.0.0",
|
||||||
"jiti": "2.6.0",
|
"jiti": "2.6.1",
|
||||||
"jsonc-eslint-parser": "^2.1.0",
|
"jsonc-eslint-parser": "2.4.1",
|
||||||
"react-refresh": "^0.17.0",
|
"react-refresh": "0.18.0",
|
||||||
"rollup-plugin-webpack-stats": "2.1.5",
|
"rollup-plugin-webpack-stats": "2.1.5",
|
||||||
"tslib": "^2.3.0",
|
"tslib": "2.8.1",
|
||||||
"tsx": "4.20.6",
|
"tsx": "4.20.6",
|
||||||
"typescript": "~5.9.0",
|
"typescript": "~5.9.0",
|
||||||
"typescript-eslint": "^8.19.0",
|
"typescript-eslint": "8.45.0",
|
||||||
"upath": "2.0.1",
|
"upath": "2.0.1",
|
||||||
"vite": "^7.0.0",
|
"vite": "7.1.9",
|
||||||
"vite-plugin-dts": "~4.5.0",
|
"vite-plugin-dts": "~4.5.0",
|
||||||
"vitest": "^3.0.0"
|
"vitest": "3.2.4"
|
||||||
},
|
},
|
||||||
"license": "AGPL-3.0-only",
|
"license": "AGPL-3.0-only",
|
||||||
"author": {
|
"author": {
|
||||||
@ -79,7 +79,7 @@
|
|||||||
"url": "https://github.com/TriliumNext/Trilium/issues"
|
"url": "https://github.com/TriliumNext/Trilium/issues"
|
||||||
},
|
},
|
||||||
"homepage": "https://triliumnotes.org",
|
"homepage": "https://triliumnotes.org",
|
||||||
"packageManager": "pnpm@10.17.1",
|
"packageManager": "pnpm@10.18.0",
|
||||||
"pnpm": {
|
"pnpm": {
|
||||||
"patchedDependencies": {
|
"patchedDependencies": {
|
||||||
"@ckeditor/ckeditor5-mention": "patches/@ckeditor__ckeditor5-mention.patch",
|
"@ckeditor/ckeditor5-mention": "patches/@ckeditor__ckeditor5-mention.patch",
|
||||||
|
|||||||
@ -23,26 +23,26 @@
|
|||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@ckeditor/ckeditor5-dev-build-tools": "43.1.0",
|
"@ckeditor/ckeditor5-dev-build-tools": "43.1.0",
|
||||||
"@ckeditor/ckeditor5-inspector": ">=4.1.0",
|
"@ckeditor/ckeditor5-inspector": ">=4.1.0",
|
||||||
"@ckeditor/ckeditor5-package-tools": "^4.0.0",
|
"@ckeditor/ckeditor5-package-tools": "4.1.0",
|
||||||
"@typescript-eslint/eslint-plugin": "~8.44.0",
|
"@typescript-eslint/eslint-plugin": "~8.45.0",
|
||||||
"@typescript-eslint/parser": "^8.0.0",
|
"@typescript-eslint/parser": "8.45.0",
|
||||||
"@vitest/browser": "^3.0.5",
|
"@vitest/browser": "3.2.4",
|
||||||
"@vitest/coverage-istanbul": "^3.0.5",
|
"@vitest/coverage-istanbul": "3.2.4",
|
||||||
"ckeditor5": "46.1.1",
|
"ckeditor5": "47.0.0",
|
||||||
"eslint": "^9.0.0",
|
"eslint": "9.36.0",
|
||||||
"eslint-config-ckeditor5": ">=9.1.0",
|
"eslint-config-ckeditor5": ">=9.1.0",
|
||||||
"http-server": "^14.1.0",
|
"http-server": "14.1.1",
|
||||||
"lint-staged": "^16.0.0",
|
"lint-staged": "16.2.3",
|
||||||
"stylelint": "^16.0.0",
|
"stylelint": "16.24.0",
|
||||||
"stylelint-config-ckeditor5": ">=9.1.0",
|
"stylelint-config-ckeditor5": ">=9.1.0",
|
||||||
"ts-node": "^10.9.1",
|
"ts-node": "10.9.2",
|
||||||
"typescript": "5.9.2",
|
"typescript": "5.9.3",
|
||||||
"vite-plugin-svgo": "~2.0.0",
|
"vite-plugin-svgo": "~2.0.0",
|
||||||
"vitest": "^3.0.5",
|
"vitest": "3.2.4",
|
||||||
"webdriverio": "^9.0.7"
|
"webdriverio": "9.20.0"
|
||||||
},
|
},
|
||||||
"peerDependencies": {
|
"peerDependencies": {
|
||||||
"ckeditor5": "46.1.1"
|
"ckeditor5": "47.0.0"
|
||||||
},
|
},
|
||||||
"author": "Elian Doran <contact@eliandoran.me>",
|
"author": "Elian Doran <contact@eliandoran.me>",
|
||||||
"license": "GPL-2.0-or-later",
|
"license": "GPL-2.0-or-later",
|
||||||
|
|||||||
@ -24,26 +24,26 @@
|
|||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@ckeditor/ckeditor5-dev-build-tools": "43.1.0",
|
"@ckeditor/ckeditor5-dev-build-tools": "43.1.0",
|
||||||
"@ckeditor/ckeditor5-inspector": ">=4.1.0",
|
"@ckeditor/ckeditor5-inspector": ">=4.1.0",
|
||||||
"@ckeditor/ckeditor5-package-tools": "^4.0.0",
|
"@ckeditor/ckeditor5-package-tools": "4.1.0",
|
||||||
"@typescript-eslint/eslint-plugin": "~8.44.0",
|
"@typescript-eslint/eslint-plugin": "~8.45.0",
|
||||||
"@typescript-eslint/parser": "^8.0.0",
|
"@typescript-eslint/parser": "8.45.0",
|
||||||
"@vitest/browser": "^3.0.5",
|
"@vitest/browser": "3.2.4",
|
||||||
"@vitest/coverage-istanbul": "^3.0.5",
|
"@vitest/coverage-istanbul": "3.2.4",
|
||||||
"ckeditor5": "46.1.1",
|
"ckeditor5": "47.0.0",
|
||||||
"eslint": "^9.0.0",
|
"eslint": "9.36.0",
|
||||||
"eslint-config-ckeditor5": ">=9.1.0",
|
"eslint-config-ckeditor5": ">=9.1.0",
|
||||||
"http-server": "^14.1.0",
|
"http-server": "14.1.1",
|
||||||
"lint-staged": "^16.0.0",
|
"lint-staged": "16.2.3",
|
||||||
"stylelint": "^16.0.0",
|
"stylelint": "16.24.0",
|
||||||
"stylelint-config-ckeditor5": ">=9.1.0",
|
"stylelint-config-ckeditor5": ">=9.1.0",
|
||||||
"ts-node": "^10.9.1",
|
"ts-node": "10.9.2",
|
||||||
"typescript": "5.9.2",
|
"typescript": "5.9.3",
|
||||||
"vite-plugin-svgo": "~2.0.0",
|
"vite-plugin-svgo": "~2.0.0",
|
||||||
"vitest": "^3.0.5",
|
"vitest": "3.2.4",
|
||||||
"webdriverio": "^9.0.7"
|
"webdriverio": "9.20.0"
|
||||||
},
|
},
|
||||||
"peerDependencies": {
|
"peerDependencies": {
|
||||||
"ckeditor5": "46.1.1"
|
"ckeditor5": "47.0.0"
|
||||||
},
|
},
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"build": "node ./scripts/build-dist.mjs",
|
"build": "node ./scripts/build-dist.mjs",
|
||||||
|
|||||||
@ -26,26 +26,26 @@
|
|||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@ckeditor/ckeditor5-dev-build-tools": "43.1.0",
|
"@ckeditor/ckeditor5-dev-build-tools": "43.1.0",
|
||||||
"@ckeditor/ckeditor5-inspector": ">=4.1.0",
|
"@ckeditor/ckeditor5-inspector": ">=4.1.0",
|
||||||
"@ckeditor/ckeditor5-package-tools": "^4.0.0",
|
"@ckeditor/ckeditor5-package-tools": "4.1.0",
|
||||||
"@typescript-eslint/eslint-plugin": "~8.44.0",
|
"@typescript-eslint/eslint-plugin": "~8.45.0",
|
||||||
"@typescript-eslint/parser": "^8.0.0",
|
"@typescript-eslint/parser": "8.45.0",
|
||||||
"@vitest/browser": "^3.0.5",
|
"@vitest/browser": "3.2.4",
|
||||||
"@vitest/coverage-istanbul": "^3.0.5",
|
"@vitest/coverage-istanbul": "3.2.4",
|
||||||
"ckeditor5": "46.1.1",
|
"ckeditor5": "47.0.0",
|
||||||
"eslint": "^9.0.0",
|
"eslint": "9.36.0",
|
||||||
"eslint-config-ckeditor5": ">=9.1.0",
|
"eslint-config-ckeditor5": ">=9.1.0",
|
||||||
"http-server": "^14.1.0",
|
"http-server": "14.1.1",
|
||||||
"lint-staged": "^16.0.0",
|
"lint-staged": "16.2.3",
|
||||||
"stylelint": "^16.0.0",
|
"stylelint": "16.24.0",
|
||||||
"stylelint-config-ckeditor5": ">=9.1.0",
|
"stylelint-config-ckeditor5": ">=9.1.0",
|
||||||
"ts-node": "^10.9.1",
|
"ts-node": "10.9.2",
|
||||||
"typescript": "5.9.2",
|
"typescript": "5.9.3",
|
||||||
"vite-plugin-svgo": "~2.0.0",
|
"vite-plugin-svgo": "~2.0.0",
|
||||||
"vitest": "^3.0.5",
|
"vitest": "3.2.4",
|
||||||
"webdriverio": "^9.0.7"
|
"webdriverio": "9.20.0"
|
||||||
},
|
},
|
||||||
"peerDependencies": {
|
"peerDependencies": {
|
||||||
"ckeditor5": "46.1.1"
|
"ckeditor5": "47.0.0"
|
||||||
},
|
},
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"build": "node ./scripts/build-dist.mjs",
|
"build": "node ./scripts/build-dist.mjs",
|
||||||
|
|||||||
@ -27,26 +27,26 @@
|
|||||||
"@ckeditor/ckeditor5-dev-build-tools": "43.1.0",
|
"@ckeditor/ckeditor5-dev-build-tools": "43.1.0",
|
||||||
"@ckeditor/ckeditor5-dev-utils": "43.1.0",
|
"@ckeditor/ckeditor5-dev-utils": "43.1.0",
|
||||||
"@ckeditor/ckeditor5-inspector": ">=4.1.0",
|
"@ckeditor/ckeditor5-inspector": ">=4.1.0",
|
||||||
"@ckeditor/ckeditor5-package-tools": "^4.0.0",
|
"@ckeditor/ckeditor5-package-tools": "4.1.0",
|
||||||
"@typescript-eslint/eslint-plugin": "~8.44.0",
|
"@typescript-eslint/eslint-plugin": "~8.45.0",
|
||||||
"@typescript-eslint/parser": "^8.0.0",
|
"@typescript-eslint/parser": "8.45.0",
|
||||||
"@vitest/browser": "^3.0.5",
|
"@vitest/browser": "3.2.4",
|
||||||
"@vitest/coverage-istanbul": "^3.0.5",
|
"@vitest/coverage-istanbul": "3.2.4",
|
||||||
"ckeditor5": "46.1.1",
|
"ckeditor5": "47.0.0",
|
||||||
"eslint": "^9.0.0",
|
"eslint": "9.36.0",
|
||||||
"eslint-config-ckeditor5": ">=9.1.0",
|
"eslint-config-ckeditor5": ">=9.1.0",
|
||||||
"http-server": "^14.1.0",
|
"http-server": "14.1.1",
|
||||||
"lint-staged": "^16.0.0",
|
"lint-staged": "16.2.3",
|
||||||
"stylelint": "^16.0.0",
|
"stylelint": "16.24.0",
|
||||||
"stylelint-config-ckeditor5": ">=9.1.0",
|
"stylelint-config-ckeditor5": ">=9.1.0",
|
||||||
"ts-node": "^10.9.1",
|
"ts-node": "10.9.2",
|
||||||
"typescript": "5.9.2",
|
"typescript": "5.9.3",
|
||||||
"vite-plugin-svgo": "~2.0.0",
|
"vite-plugin-svgo": "~2.0.0",
|
||||||
"vitest": "^3.0.5",
|
"vitest": "3.2.4",
|
||||||
"webdriverio": "^9.0.7"
|
"webdriverio": "9.20.0"
|
||||||
},
|
},
|
||||||
"peerDependencies": {
|
"peerDependencies": {
|
||||||
"ckeditor5": "46.1.1"
|
"ckeditor5": "47.0.0"
|
||||||
},
|
},
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"build": "node ./scripts/build-dist.mjs",
|
"build": "node ./scripts/build-dist.mjs",
|
||||||
@ -71,6 +71,6 @@
|
|||||||
]
|
]
|
||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@ckeditor/ckeditor5-icons": "46.1.1"
|
"@ckeditor/ckeditor5-icons": "47.0.0"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -33,10 +33,18 @@ export default class MathCommand extends Command {
|
|||||||
{ equation, type, display }
|
{ equation, type, display }
|
||||||
);
|
);
|
||||||
} else {
|
} else {
|
||||||
|
const selection = this.editor.model.document.selection;
|
||||||
|
|
||||||
// Create new model element
|
// Create new model element
|
||||||
mathtex = writer.createElement(
|
mathtex = writer.createElement(
|
||||||
display ? 'mathtex-display' : 'mathtex-inline',
|
display ? 'mathtex-display' : 'mathtex-inline',
|
||||||
{ equation, type: outputType, display }
|
{
|
||||||
|
// Inherit all attributes from selection (e.g. color, background color, size).
|
||||||
|
...Object.fromEntries( selection.getAttributes() ),
|
||||||
|
equation,
|
||||||
|
type: outputType,
|
||||||
|
display,
|
||||||
|
}
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
model.insertContent( mathtex );
|
model.insertContent( mathtex );
|
||||||
|
|||||||
@ -59,12 +59,12 @@ export default class MathEditing extends Plugin {
|
|||||||
allowWhere: '$text',
|
allowWhere: '$text',
|
||||||
isInline: true,
|
isInline: true,
|
||||||
isObject: true,
|
isObject: true,
|
||||||
allowAttributes: [ 'equation', 'type', 'display' ]
|
allowAttributes: [ 'equation', 'type', 'display', 'fontSize', 'fontColor', 'fontBackgroundColor' ]
|
||||||
} );
|
} );
|
||||||
|
|
||||||
schema.register( 'mathtex-display', {
|
schema.register( 'mathtex-display', {
|
||||||
inheritAllFrom: '$blockObject',
|
inheritAllFrom: '$blockObject',
|
||||||
allowAttributes: [ 'equation', 'type', 'display' ]
|
allowAttributes: [ 'equation', 'type', 'display', 'fontSize', 'fontColor' ]
|
||||||
} );
|
} );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -26,26 +26,26 @@
|
|||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@ckeditor/ckeditor5-dev-build-tools": "43.1.0",
|
"@ckeditor/ckeditor5-dev-build-tools": "43.1.0",
|
||||||
"@ckeditor/ckeditor5-inspector": ">=4.1.0",
|
"@ckeditor/ckeditor5-inspector": ">=4.1.0",
|
||||||
"@ckeditor/ckeditor5-package-tools": "^4.0.0",
|
"@ckeditor/ckeditor5-package-tools": "4.1.0",
|
||||||
"@typescript-eslint/eslint-plugin": "~8.44.0",
|
"@typescript-eslint/eslint-plugin": "~8.45.0",
|
||||||
"@typescript-eslint/parser": "^8.0.0",
|
"@typescript-eslint/parser": "8.45.0",
|
||||||
"@vitest/browser": "^3.0.5",
|
"@vitest/browser": "3.2.4",
|
||||||
"@vitest/coverage-istanbul": "^3.0.5",
|
"@vitest/coverage-istanbul": "3.2.4",
|
||||||
"ckeditor5": "46.1.1",
|
"ckeditor5": "47.0.0",
|
||||||
"eslint": "^9.0.0",
|
"eslint": "9.36.0",
|
||||||
"eslint-config-ckeditor5": ">=9.1.0",
|
"eslint-config-ckeditor5": ">=9.1.0",
|
||||||
"http-server": "^14.1.0",
|
"http-server": "14.1.1",
|
||||||
"lint-staged": "^16.0.0",
|
"lint-staged": "16.2.3",
|
||||||
"stylelint": "^16.0.0",
|
"stylelint": "16.24.0",
|
||||||
"stylelint-config-ckeditor5": ">=9.1.0",
|
"stylelint-config-ckeditor5": ">=9.1.0",
|
||||||
"ts-node": "^10.9.1",
|
"ts-node": "10.9.2",
|
||||||
"typescript": "5.9.2",
|
"typescript": "5.9.3",
|
||||||
"vite-plugin-svgo": "~2.0.0",
|
"vite-plugin-svgo": "~2.0.0",
|
||||||
"vitest": "^3.0.5",
|
"vitest": "3.2.4",
|
||||||
"webdriverio": "^9.0.7"
|
"webdriverio": "9.20.0"
|
||||||
},
|
},
|
||||||
"peerDependencies": {
|
"peerDependencies": {
|
||||||
"ckeditor5": "46.1.1"
|
"ckeditor5": "47.0.0"
|
||||||
},
|
},
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"build": "node ./scripts/build-dist.mjs",
|
"build": "node ./scripts/build-dist.mjs",
|
||||||
@ -71,6 +71,6 @@
|
|||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@types/lodash-es": "4.17.12",
|
"@types/lodash-es": "4.17.12",
|
||||||
"lodash-es": "^4.17.21"
|
"lodash-es": "4.17.21"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -11,11 +11,11 @@
|
|||||||
"@triliumnext/ckeditor5-keyboard-marker": "workspace:*",
|
"@triliumnext/ckeditor5-keyboard-marker": "workspace:*",
|
||||||
"@triliumnext/ckeditor5-math": "workspace:*",
|
"@triliumnext/ckeditor5-math": "workspace:*",
|
||||||
"@triliumnext/ckeditor5-mermaid": "workspace:*",
|
"@triliumnext/ckeditor5-mermaid": "workspace:*",
|
||||||
"ckeditor5": "46.1.1",
|
"ckeditor5": "47.0.0",
|
||||||
"ckeditor5-premium-features": "46.1.1"
|
"ckeditor5-premium-features": "47.0.0"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@smithy/middleware-retry": "4.3.1",
|
"@smithy/middleware-retry": "4.4.0",
|
||||||
"@types/jquery": "3.5.33"
|
"@types/jquery": "3.5.33"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -5,16 +5,16 @@
|
|||||||
"type": "module",
|
"type": "module",
|
||||||
"main": "./src/index.ts",
|
"main": "./src/index.ts",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@codemirror/commands": "6.8.1",
|
"@codemirror/commands": "6.9.0",
|
||||||
"@codemirror/lang-css": "6.3.1",
|
"@codemirror/lang-css": "6.3.1",
|
||||||
"@codemirror/lang-html": "6.4.10",
|
"@codemirror/lang-html": "6.4.11",
|
||||||
"@codemirror/lang-javascript": "6.2.4",
|
"@codemirror/lang-javascript": "6.2.4",
|
||||||
"@codemirror/lang-json": "6.0.2",
|
"@codemirror/lang-json": "6.0.2",
|
||||||
"@codemirror/lang-markdown": "6.3.4",
|
"@codemirror/lang-markdown": "6.4.0",
|
||||||
"@codemirror/lang-php": "6.0.2",
|
"@codemirror/lang-php": "6.0.2",
|
||||||
"@codemirror/lang-vue": "0.1.3",
|
"@codemirror/lang-vue": "0.1.3",
|
||||||
"@codemirror/lang-xml": "6.1.0",
|
"@codemirror/lang-xml": "6.1.0",
|
||||||
"@codemirror/legacy-modes": "6.5.1",
|
"@codemirror/legacy-modes": "6.5.2",
|
||||||
"@codemirror/search": "6.5.11",
|
"@codemirror/search": "6.5.11",
|
||||||
"@codemirror/view": "6.38.4",
|
"@codemirror/view": "6.38.4",
|
||||||
"@fsegurai/codemirror-theme-abcdef": "6.2.2",
|
"@fsegurai/codemirror-theme-abcdef": "6.2.2",
|
||||||
|
|||||||
@ -10,3 +10,4 @@ export * from "./lib/server_api.js";
|
|||||||
export * from "./lib/shared_constants.js";
|
export * from "./lib/shared_constants.js";
|
||||||
export * from "./lib/ws_api.js";
|
export * from "./lib/ws_api.js";
|
||||||
export * from "./lib/attribute_names.js";
|
export * from "./lib/attribute_names.js";
|
||||||
|
export * from "./lib/utils.js";
|
||||||
|
|||||||
11
packages/commons/src/lib/utils.ts
Normal file
@ -0,0 +1,11 @@
|
|||||||
|
export function formatLogMessage(message: string | object) {
|
||||||
|
if (typeof message === "object") {
|
||||||
|
try {
|
||||||
|
return JSON.stringify(message, null, 4);
|
||||||
|
} catch (e) {
|
||||||
|
return message.toString();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return message;
|
||||||
|
}
|
||||||