Skip to content

Commit

Permalink
comment out online_url by default
Browse files Browse the repository at this point in the history
  • Loading branch information
Jieiku committed Jan 2, 2024
1 parent 8b4de73 commit ae68172
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
2 changes: 1 addition & 1 deletion config.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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.

Expand Down
4 changes: 3 additions & 1 deletion package_abridge.js
Original file line number Diff line number Diff line change
Expand Up @@ -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\""});
Expand Down

0 comments on commit ae68172

Please sign in to comment.