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]: "Root folder" setting not respected for the plugin #272

Closed yodahuang closed 9 months ago

yodahuang commented 9 months ago

Issue validation

Command used

Refresh published and upload new notes

Plugin version

6.13.3

Describe the bug

The notes I have in obsidian vault are no longer published under the default doc folder, breading mkdocs.

How to reproduce ?

Just run the "Refresh published and update new notes" command, in a vault that is structured like this image.

You can see what publisher tries to do from this pr: https://github.com/yodahuang/notes/pull/19 (there's also link conversion going on but that's expected)

Minimal Reproducible Example

Any notes would do. I don't think it's related to file content

Configuration

{
  "github": {
    "branch": "main",
    "automaticallyMergePR": false,
    "tokenPath": "%configDir%/plugins/%pluginID%/env",
    "api": {
      "tiersForApi": "Github Free/Pro/Team (default)",
      "hostname": ""
    },
    "workflow": {
      "commitMessage": "[PUBLISHER] Merge",
      "name": ""
    },
    "verifiedRepo": true
  },
  "upload": {
    "behavior": "obsidian",
    "defaultName": "docs",
    "rootFolder": "",
    "yamlFolderKey": "",
    "frontmatterTitle": {
      "enable": false,
      "key": "title"
    },
    "replaceTitle": [],
    "replacePath": [],
    "autoclean": {
      "enable": true,
      "excluded": [
        "docs/assets/js",
        "docs/assets/meta",
        "docs/assets/css",
        "tags.md",
        "graph.md"
      ]
    },
    "folderNote": {
      "enable": false,
      "rename": "index.md",
      "addTitle": {
        "enable": false,
        "key": "title"
      }
    },
    "metadataExtractorPath": ""
  },
  "conversion": {
    "hardbreak": false,
    "dataview": true,
    "censorText": [],
    "tags": {
      "inline": false,
      "exclude": [],
      "fields": []
    },
    "links": {
      "internal": true,
      "unshared": false,
      "wiki": true,
      "slugify": false
    }
  },
  "embed": {
    "attachments": true,
    "overrideAttachments": [],
    "keySendFile": [],
    "notes": false,
    "folder": "",
    "convertEmbedToLinks": "keep",
    "charConvert": "->"
  }
}

Relevant log output

No response

OS

MacOS

Anything else?

No response

Obsidian information

SYSTEM INFO:
    Obsidian version: v1.4.16
    Installer version: v1.3.5
    Operating system: Darwin Kernel Version 23.3.0: Fri Dec  1 03:16:13 PST 2023; root:xnu-10002.80.11~58/RELEASE_ARM64_T6020 23.3.0
    Login status: not logged in
    Insider build toggle: off
    Live preview: on
    Legacy editor: off
    Base theme: dark
    Community theme: Things v2.1.18
    Snippets enabled: 0
    Restricted mode: off
    Plugins installed: 14
    Plugins enabled: 11
        1: Completr v3.2.0
        2: Contextual Typography v2.2.5
        3: Hider v1.3.1
        4: Kanban v1.5.3
        5: Metadata Extractor v1.1.0
        6: Style Settings v1.0.7
        7: Minimal Theme Settings v7.3.1
        8: Text Format v2.4.0
        9: Quick Latex for Obsidian v2.6.4
        10: Remotely Save v0.3.37
        11: Github Publisher v6.13.3

RECOMMENDATIONS:
    Update installer: installer version too low, please download from https://obsidian.md/download?os=mac&arch=arm64 and reinstall.
    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.
Mara-Li commented 9 months ago

Oups, I'm sorry! When I refactored the way path was parsed, I made a typo error that breaks that.

yodahuang commented 9 months ago

Thanks for the quick fix!