Plugin publishes unshared notes

I have a note which links to another note which doesn't have a share: true property. For some reason, however, the plugin keeps pushing the linked notes (at the root of the repo). Here's my config
{
"github": {
"branch": "master",
"automaticallyMergePR": false,
"dryRun": {
"enable": false,
"folderName": "github-publisher"
},
"tokenPath": "%configDir%/plugins/%pluginID%/env",
"api": {
"tiersForApi": "Github Free/Pro/Team (default)",
"hostname": ""
},
"workflow": {
"commitMessage": "[PUBLISHER] Merge",
"name": ""
},
"verifiedRepo": true
},
"upload": {
"behavior": "yaml",
"defaultName": "src/content/blog",
"rootFolder": "src/content",
"yamlFolderKey": "type",
"frontmatterTitle": {
"enable": false,
"key": "slug"
},
"replaceTitle": [
{
"regex": "/\\s+/g",
"replacement": "-",
"type": "title"
}
],
"replacePath": [],
"autoclean": {
"includeAttachments": true,
"enable": true,
"excluded": []
},
"folderNote": {
"enable": false,
"rename": "index.md",
"addTitle": {
"enable": false,
"key": "title"
}
},
"metadataExtractorPath": ""
},
"conversion": {
"hardbreak": false,
"dataview": true,
"censorText": [
{
"entry": "/!\\[\\[(.*\\.((mov)|(mp4)|(webm)))\\|?(.*?)?]]/gi",
"replace": "![$6](/videos/$1)",
"flags": "",
"after": false
},
{
"entry": "/banner: \"\\[\\[(.*)\\]\\]\"/gi",
"replace": "banner: ../../assets/$1",
"flags": "",
"after": false
},
{
"entry": "/cardCover: \"\\[\\[(.*)\\]\\]\"/gi",
"replace": "cardCover: ../../assets/$1",
"flags": "",
"after": false
}
],
"tags": {
"inline": false,
"exclude": [],
"fields": []
},
"links": {
"internal": true,
"unshared": false,
"wiki": true,
"slugify": "strict"
}
},
"embed": {
"attachments": true,
"overrideAttachments": [
{
"path": "/.*(mov|webm|mp4)$/",
"destination": "/public/videos/{{name}}",
"forcePush": false
}
],
"keySendFile": [
"banner",
"cardCover"
],
"notes": false,
"folder": "src/assets",
"convertEmbedToLinks": "keep",
"charConvert": "->",
"unHandledObsidianExt": [],
"sendSimpleLinks": true,
"useObsidianFolder": false
},
"plugin": {
"shareKey": "share",
"excludedFolder": [
"Journals"
],
"copyLink": {
"enable": false,
"links": "https://simo.sh",
"removePart": [],
"transform": {
"toUri": true,
"slugify": "strict",
"applyRegex": []
}
},
"setFrontmatterKey": "Set",
"shareAll": {
"enable": false,
"excludedFileName": "DRAFT"
}
},
"tabsId": "plugin-settings"
}
{
"github": {
"branch": "master",
"automaticallyMergePR": false,
"dryRun": {
"enable": false,
"folderName": "github-publisher"
},
"tokenPath": "%configDir%/plugins/%pluginID%/env",
"api": {
"tiersForApi": "Github Free/Pro/Team (default)",
"hostname": ""
},
"workflow": {
"commitMessage": "[PUBLISHER] Merge",
"name": ""
},
"verifiedRepo": true
},
"upload": {
"behavior": "yaml",
"defaultName": "src/content/blog",
"rootFolder": "src/content",
"yamlFolderKey": "type",
"frontmatterTitle": {
"enable": false,
"key": "slug"
},
"replaceTitle": [
{
"regex": "/\\s+/g",
"replacement": "-",
"type": "title"
}
],
"replacePath": [],
"autoclean": {
"includeAttachments": true,
"enable": true,
"excluded": []
},
"folderNote": {
"enable": false,
"rename": "index.md",
"addTitle": {
"enable": false,
"key": "title"
}
},
"metadataExtractorPath": ""
},
"conversion": {
"hardbreak": false,
"dataview": true,
"censorText": [
{
"entry": "/!\\[\\[(.*\\.((mov)|(mp4)|(webm)))\\|?(.*?)?]]/gi",
"replace": "![$6](/videos/$1)",
"flags": "",
"after": false
},
{
"entry": "/banner: \"\\[\\[(.*)\\]\\]\"/gi",
"replace": "banner: ../../assets/$1",
"flags": "",
"after": false
},
{
"entry": "/cardCover: \"\\[\\[(.*)\\]\\]\"/gi",
"replace": "cardCover: ../../assets/$1",
"flags": "",
"after": false
}
],
"tags": {
"inline": false,
"exclude": [],
"fields": []
},
"links": {
"internal": true,
"unshared": false,
"wiki": true,
"slugify": "strict"
}
},
"embed": {
"attachments": true,
"overrideAttachments": [
{
"path": "/.*(mov|webm|mp4)$/",
"destination": "/public/videos/{{name}}",
"forcePush": false
}
],
"keySendFile": [
"banner",
"cardCover"
],
"notes": false,
"folder": "src/assets",
"convertEmbedToLinks": "keep",
"charConvert": "->",
"unHandledObsidianExt": [],
"sendSimpleLinks": true,
"useObsidianFolder": false
},
"plugin": {
"shareKey": "share",
"excludedFolder": [
"Journals"
],
"copyLink": {
"enable": false,
"links": "https://simo.sh",
"removePart": [],
"transform": {
"toUri": true,
"slugify": "strict",
"applyRegex": []
}
},
"setFrontmatterKey": "Set",
"shareAll": {
"enable": false,
"excludedFileName": "DRAFT"
}
},
"tabsId": "plugin-settings"
}
Solution:
should be fixed in the last version
Jump to solution
60 Replies
fr3fou
fr3fou2mo ago
Running version 7.2.13 on latest obsidian this happens when i run "Publish single current active note" i tried messing around with the internal link settings but they still get pushed AND the notes get a path link that points to ../../../ etc for some reason
Mara
Mara2mo ago
This command shouldn't appear on a unshared note It's a note with "share: false" or no share at all?
fr3fou
fr3fou2mo ago
no share at all i mean my main note called FOO has share: true which has links to BAR which doesn't have share at all i run publish single current active note on FOO
Mara
Mara2mo ago
And you are sur BAR is published and it's not a transformation of the link ?
fr3fou
fr3fou2mo ago
yep
No description
fr3fou
fr3fou2mo ago
these are published at the root of the repo for some reason
fr3fou
fr3fou2mo ago
the ones with share: true went here but the ones without share at all got put at the root
No description
Mara
Mara2mo ago
Okay, could you open an issue on the repo ? Will check that tomorrow or someday Sorry, I have a lot of work IRL and I don't have the time to work on this plugin as it is difficult to understand
fr3fou
fr3fou2mo ago
oki
fr3fou
fr3fou2mo ago
GitHub
[Bug]: Publishing note with links to unshared notes results in unsh...
Issue validation I checked the issue to prevent duplicate I checked my configurations files and the documentation Command used Upload single current active note Plugin version 7.2.13 Describe the b...
Mara
Mara2mo ago
Can repro :check: Funny thing that I can't repro it in local share Okay I know what is the problem fixed in 7.2.15 :check:
fr3fou
fr3fou2mo ago
yeah same nice what about the links question though
Mara
Mara2mo ago
The pinned one? or the link shared for unshared?
fr3fou
fr3fou2mo ago
i have links to non-existent notes they don't get removed
Mara
Mara2mo ago
Yeah, it's a settings You can remove that
fr3fou
fr3fou2mo ago
yeah, they stay as links even with the option toggled
Mara
Mara2mo ago
I'm pretty sure i always leave as link
fr3fou
fr3fou2mo ago
o
Mara
Mara2mo ago
You can use a regex to get a simple text through I need to check
fr3fou
fr3fou2mo ago
basically i need to know whether a link is non existent or non shared so i can style them accordingly
Mara
Mara2mo ago
Oh Wil check something Probably will add an option to keep a link or the name in the settings ? They are an option in frontmatter to custom deep this settings
fr3fou
fr3fou2mo ago
👍
Mara
Mara2mo ago
links: false or links.convert: false should work
fr3fou
fr3fou2mo ago
for non existent links?
Mara
Mara2mo ago
In frontmatter of the non existent (unshared) or in the "parent" (aka file that have the link) (it's a frontmatter option) See the #help tab in the settings for info Add unlink option in settings tab in 7.3.0 !
fr3fou
fr3fou2mo ago
hmm, ii can't update 🤔
No description
fr3fou
fr3fou2mo ago
No description
fr3fou
fr3fou2mo ago
yeah, just updated successfully! thanks! just had to wait
Mara
Mara2mo ago
Yeah, have some problem with the submodule !
fr3fou
fr3fou2mo ago
hmm, the unlink option doesn't seem to work for: - notes that _don't_have a share property - notes that don't exist to begin with
No description
Mara
Mara2mo ago
Hm it worked on my side with note without key Will check later I MADE A TYPO :crying: Should work now
fr3fou
fr3fou2mo ago
:02yay: thanks!
Mara
Mara2mo ago
7.3.1 v'
fr3fou
fr3fou5w ago
does this account for non-existent notes?
No description
fr3fou
fr3fou5w ago
seems to have left it inact
No description
fr3fou
fr3fou5w ago
(i figured out a workaround for myself, thanks regardless for the quick turnaround!)
Mara
Mara5w ago
Ah yes, it only works for existent as I use the links for the metadata itself
fr3fou
fr3fou5w ago
i have an unrelated problem right now, tell me if you want me to open another thread but it seems that excalidraw links don't get properly converted to svgs
No description
fr3fou
fr3fou5w ago
do i need to enable something?
Mara
Mara5w ago
It use the excalidraw plugin to svg itself, so…
fr3fou
fr3fou5w ago
🤔
Mara
Mara5w ago
Did you have something in the console when trying ?
fr3fou
fr3fou5w ago
hmm
No description
fr3fou
fr3fou5w ago
maybe this option it was set to svg image
Mara
Mara5w ago
Nan, normally .excalidraw.md should be transform but you can't share a .excalidraw.md file
fr3fou
fr3fou5w ago
it's not an excalidraw.md filethough
fr3fou
fr3fou5w ago
No description
Mara
Mara5w ago
.md is automatically hiden in obsidian
fr3fou
fr3fou5w ago
oh, you're right
No description
fr3fou
fr3fou5w ago
so, is there anything i can do if i want to embed my excalidraw drawing
Mara
Mara5w ago
Normally, they should be converted by the plugin So when you share the note contening the excalidraw, do you have something in the console ?
fr3fou
fr3fou5w ago
nothing happens right now as it thinks the assets already exist let me delete them
fr3fou
fr3fou5w ago
oh yep
No description
Mara
Mara5w ago
Hm, seems to be an excalidraw issue
fr3fou
fr3fou5w ago
seems to be from here
No description
Mara
Mara5w ago
yup
fr3fou
fr3fou5w ago
is exportSettings passed from you
Mara
Mara5w ago
Here the function I use :
export async function convertToHTMLSVG(file: TFile, app: App) {
try {
const excalidraw = app.plugins.getPlugin("obsidian-excalidraw-plugin");
if (!excalidraw) return null;
// @ts-ignore
const ea = excalidraw.ea;
const svg = await ea.createSVG(file.path, ea.getExportSettings(true, true));
return svg.outerHTML as string;
} catch (e) {
console.error(e);
return null;
}
}
export async function convertToHTMLSVG(file: TFile, app: App) {
try {
const excalidraw = app.plugins.getPlugin("obsidian-excalidraw-plugin");
if (!excalidraw) return null;
// @ts-ignore
const ea = excalidraw.ea;
const svg = await ea.createSVG(file.path, ea.getExportSettings(true, true));
return svg.outerHTML as string;
} catch (e) {
console.error(e);
return null;
}
}
Oh, I see THey updated the function and it needs more option now
Solution
Mara
Mara5w ago
should be fixed in the last version
fr3fou
fr3fou5w ago
thank you!!
Want results from more Discord servers?
Add your server