Skip to content

Build your personal knowledge base with Trilium Notes

new env variable to specify start note, #1532

zadam369274ead759
diff --git a/src/services/options_init.js b/src/services/options_init.js
index 26283a4243..02dbc1ee23 100644
--- a/src/services/options_init.js
+++ b/src/services/options_init.js
@@ -31,10 +31,7 @@ function initNotSyncedOptions(initialized, startNotePath = 'root', opts = {}) {
optionService.createOption('openTabs', JSON.stringify([
{
notePath: startNotePath,
- active: true,
- sidebar: {
- widgets: []
- }
+ active: true
}
]), false);
@@ -103,6 +100,15 @@ function initStartupOptions() {
log.info(`Created missing option "${name}" with default value "${value}"`);
}
}
+
+ if (process.env.TRILIUM_START_NOTE_ID) {
+ optionService.setOption('openTabs', JSON.stringify([
+ {
+ notePath: process.env.TRILIUM_START_NOTE_ID,
+ active: true
+ }
+ ]));
+ }
}
function getKeyboardDefaultOptions() {