Enveloppe / obsidian-enveloppe

Enveloppe helps you to publish your notes on a GitHub repository from your Obsidian Vault, for free!
https://enveloppe.github.io/
Apache License 2.0
642 stars 39 forks source link

[Bug]: Publishing note with links to unshared notes results in unshared notes being pushed to the root of the repository #363

Closed fr3fou closed 1 month ago

fr3fou commented 1 month ago

Issue validation

Command used

Upload single current active note

Plugin version

7.2.13

Describe the bug

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, regardless of the missing share property.

How to reproduce ?

  1. Create a note with a link to another note
  2. Add share: true to the first note
  3. Don't add share to the second note
  4. Publish single current active note on the first note

Minimal Reproducible Example

---
type: study
tags:
  - machine-learning
  - map
share: true
---
...
A neural network's [[Forward-Propagation]] is used for predicting data and its [[Backward-Propagation]] used for training itself.
---
type: study
tags:
  - machine-learning
---
...
The forward pass in a [[Neural Network]] is also known as the "prediction" step. You give the neural network some input and it gives you an output.

Also worth mentioning that the Backward-Propagation note doesn't exist. The Convert internal links pointing to unpublished notes doesn't seem to do what it says as it still keeps the link (it turns it into a MDLink).

Configuration

{
  "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": true,
      "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": "text-conversion"
}

Relevant log output

No response

OS

MacOS

Anything else?

No response

Obsidian information

SYSTEM INFO:
    Obsidian version: v1.6.7
    Installer version: v1.6.7
    Operating system: Darwin Kernel Version 24.0.0: Mon Aug 12 20:52:41 PDT 2024; root:xnu-11215.1.10~2/RELEASE_ARM64_T6031 24.0.0
    Login status: logged in
    Catalyst license: insider
    Insider build toggle: off
    Live preview: on
    Base theme: dark
    Community theme: Primary v2.8.0
    Snippets enabled: 0
    Restricted mode: off
    Plugins installed: 23
    Plugins enabled: 21
        1: Calendar v1.5.10
        2: Minimal Theme Settings v8.1.1
        3: Dataview v0.5.67
        4: Periodic Notes v0.0.17
        5: Settings Search v1.3.10
        6: Style Settings v1.0.9
        7: Git v2.27.0
        8: Image Toolkit v1.4.1
        9: Excalidraw v2.4.2
        10: Tasks v7.10.0
        11: Omnisearch v1.24.1
        12: Iconize v2.14.3
        13: Kanban v2.0.51
        14: Image Converter v1.1.7
        15: Hider v1.5.1
        16: Advanced URI v1.44.1
        17: Outliner v4.8.1
        18: Note Toolbar v1.13.1
        19: Beautitab v1.6.1
        20: Enveloppe v7.2.13
        21: Folder notes v1.7.30

RECOMMENDATIONS:
    Custom theme and snippets: for cosmetic issues, please first try updating your theme and disabling your snippets. If still not fixed, please try to make the issue happen in the Sandbox Vault or disable community theme and snippets.
    Community plugins: for bugs, please first try updating all your plugins to latest. If still not fixed, please try to make the issue happen in the Sandbox Vault or disable community plugins.