diff options
| -rw-r--r-- | config.toml | 2 | ||||
| -rw-r--r-- | 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\""}); |
