aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJieiku2024-01-02 11:53:03 -0800
committerJieiku2024-01-02 11:53:03 -0800
commitae68172b9b6a2bdbe620fd36589a6151cee5df28 (patch)
treeb3b49e85973e2cdb2214641a1f543284fed1fe04
parent8b4de73adb43a521a5e487b18ba72d6e4169272e (diff)
downloadabridge-ae68172b9b6a2bdbe620fd36589a6151cee5df28.tar.gz
abridge-ae68172b9b6a2bdbe620fd36589a6151cee5df28.tar.bz2
abridge-ae68172b9b6a2bdbe620fd36589a6151cee5df28.zip
comment out online_url by default
-rw-r--r--config.toml2
-rw-r--r--package_abridge.js4
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\""});