From ae68172b9b6a2bdbe620fd36589a6151cee5df28 Mon Sep 17 00:00:00 2001 From: Jieiku Date: Tue, 2 Jan 2024 11:53:03 -0800 Subject: comment out online_url by default --- config.toml | 2 +- package_abridge.js | 4 +++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/config.toml b/config.toml index 2cd306a..6ce3b1c 100644 --- a/config.toml +++ b/config.toml @@ -202,7 +202,7 @@ researchgate = "your-profile-id" ############################################################################### # do NOT include a trailing slash on the online URL -online_url = "https://abridge.netlify.app" +#online_url = "https://abridge.netlify.app" online_indexformat = "elasticlunr_json"# used to restore your preferred index format when offline = false offline = false # implies uglyurls=true and integrity=false, when true NPM/node will automatically set the path for the base_url, it will build the site, then set the base_url back to what it was. diff --git a/package_abridge.js b/package_abridge.js index 52c704e..ad528f1 100644 --- a/package_abridge.js +++ b/package_abridge.js @@ -43,7 +43,9 @@ async function execWrapper(cmd) { async function abridge() { if (offline === false) { - replace.sync({files: 'config.toml', from: /base_url.*=.*/g, to: "base_url = \""+online_url+"\""}); + if (online_url) { + replace.sync({files: 'config.toml', from: /base_url.*=.*/g, to: "base_url = \""+online_url+"\""}); + } replace.sync({files: 'config.toml', from: /index_format.*=.*/g, to: "index_format = \""+online_indexformat+"\""}); } else if (offline === true) { replace.sync({files: 'config.toml', from: /base_url.*=.*/g, to: "base_url = \""+__dirname+"\/public\""}); -- cgit v1.3.1