generated from obsidianmd/obsidian-sample-plugin
-
-
Notifications
You must be signed in to change notification settings - Fork 40
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
add git attributes and publish load script
- Loading branch information
1 parent
2a32554
commit f8d5517
Showing
3 changed files
with
31 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
Publish.js linguist-generated |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
// META-BIND OBSIDIAN PUBLISH SCRIPT | ||
// add this script to the end of you publish.js | ||
// this script loads and executes the latest version of the meta-bind plugin for obsidian publish | ||
|
||
// The plugin settings. Not all settings are used. | ||
let mb_settingsString = `{ | ||
"devMode": false, | ||
"preferredDateFormat": "YYYY-MM-DD", | ||
"useUsDateInputOrder": false, | ||
"syncInterval": 50, | ||
"minSyncInterval": 1000, | ||
"maxSyncInterval": 50, | ||
"inputTemplates": "", | ||
"dateFormat": "eu" | ||
}`; | ||
|
||
// if true, the script is pulled from the master branch instead of the release branch | ||
const mb_dev_mode = false; | ||
|
||
const mb_settings = JSON.parse(mb_settingsString); | ||
|
||
async function mb_load() { | ||
const response = mb_dev_mode | ||
? await fetch('https://raw.githubusercontent.com/mProjectsCode/obsidian-meta-bind-plugin/master/Publish.js') | ||
: await fetch('https://raw.githubusercontent.com/mProjectsCode/obsidian-meta-bind-plugin/release/Publish.js'); | ||
const script = await response.text(); | ||
eval(script); | ||
} | ||
|
||
await mb_load(); |