Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Bug]: link is generated without filename in certain cases #378

Open
2 tasks done
kurko opened this issue Jan 19, 2025 · 1 comment
Open
2 tasks done

[Bug]: link is generated without filename in certain cases #378

kurko opened this issue Jan 19, 2025 · 1 comment
Assignees
Labels
🐛 Bug Something isn't working ❓ Question Further information is requested 🔁 No reproduction Where I can't repro the bug

Comments

@kurko
Copy link
Contributor

kurko commented Jan 19, 2025

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.5.2

Describe the bug

In some occasions, links are being generated with exclusion of parts of the filename path. For example, page 2 has property filename: _pages/some_name, but page 1's [[some_name|Title]]'s link is being generated as [Title](./some_name). This can be seen in this pull request line, where [Check out my work setup](./my-digital-workbench.md) is pointing to a file that has filename: _pages/my-digital-workbench.

Image

On other occasions, though, it keeps filename intact. For example, in the same link above, [How to use Jekyll with Obsidian.md](../guide/_posts/2022-10-15-jekyll-with-obsidian.md) points to a file with filename: filename: guide/_posts/2022-10-15-jekyll-with-obsidian.

How to reproduce ?

I mean, just send a file with the reproducible example and you should see that.

Minimal Reproducible Example

File 1

Some personal texts:

- [[my-digital-workbench|Check out my work setup]]
- [[jekyll-and-obsidian-blogging|How to use Jekyll with Obsidian.md]]

***

File 2

---
share: true
filename: '_pages/my-digital-workbench'
rss: false
date: 2020-01-02 15:02:54 -0200
---

This is still in progress.

***

---
share: true
title: "Jekyll Blogging with Obsidian"
date: 2022-10-15 06:00:00 -0400
filename: "guide/_posts/2022-10-15-jekyll-with-obsidian"
render_with_liquid: false
---

This is another content.

Configuration

{
  "github": {
    "branch": "main",
    "automaticallyMergePR": false,
    "dryRun": {
      "enable": false,
      "folderName": ""
    },
    "tokenPath": "%configDir%/plugins/%pluginID%/env",
    "api": {
      "tiersForApi": "Github Free/Pro/Team (default)",
      "hostname": ""
    },
    "workflow": {
      "commitMessage": "[PUBLISHER] Merge",
      "name": ""
    },
    "verifiedRepo": true
  },
  "upload": {
    "behavior": "fixed",
    "defaultName": "obsidian",
    "rootFolder": "",
    "yamlFolderKey": "",
    "frontmatterTitle": {
      "enable": true,
      "key": "filename"
    },
    "replaceTitle": [
      {
        "type": "title",
        "regex": "/../..",
        "replacement": ""
      }
    ],
    "replacePath": [],
    "autoclean": {
      "includeAttachments": true,
      "enable": true,
      "excluded": ""
    },
    "folderNote": {
      "enable": false,
      "rename": "index.md",
      "addTitle": {
        "enable": false,
        "key": "filename"
      }
    },
    "metadataExtractorPath": ""
  },
  "conversion": {
    "hardbreak": false,
    "dataview": true,
    "censorText": [],
    "tags": {
      "inline": false,
      "exclude": [],
      "fields": []
    },
    "links": {
      "internal": true,
      "unshared": false,
      "wiki": true,
      "slugify": false,
      "unlink": false
    }
  },
  "embed": {
    "attachments": true,
    "overrideAttachments": [],
    "keySendFile": [
      "obsidian"
    ],
    "notes": false,
    "folder": "images/obsidian",
    "convertEmbedToLinks": "keep",
    "charConvert": "->",
    "unHandledObsidianExt": [],
    "sendSimpleLinks": true,
    "forcePush": true
  },
  "plugin": {
    "shareKey": "share",
    "excludedFolder": [],
    "copyLink": {
      "enable": false,
      "links": "",
      "removePart": [
        ""
      ],
      "transform": {
        "toUri": true,
        "slugify": "lower",
        "applyRegex": []
      }
    },
    "setFrontmatterKey": "Set"
  },
  "tabsId": "text-conversion"
}

Relevant log output

OS

MacOS

Anything else?

No response

Obsidian information

SYSTEM INFO:
	Obsidian version: v1.7.7
	Installer version: v1.5.12
	Operating system: Darwin Kernel Version 24.2.0: Fri Dec  6 18:40:14 PST 2024; root:xnu-11215.61.5~2/RELEASE_ARM64_T8103 24.2.0
	Login status: logged in
	Language: en
	Catalyst license: insider
	Insider build toggle: off
	Live preview: off
	Base theme: light
	Community theme: obsidian_ia
	Snippets enabled: 1
	Restricted mode: off
	Plugins installed: 16
	Plugins enabled: 14
		1: Mind Map v1.1.0
		2: Tag Wrangler v0.5.3
		3: Metadata Extractor v1.0.2
		4: Dataview v0.5.67
		5: Force note view mode v1.2.2
		6: Obsidian42 - BRAT v0.6.35
		7: Reading Time v1.1.1
		8: Local images v0.14.2
		9: Commander v0.5.1
		10: Copilot v2.6.6
		11: Periodic Notes v0.0.17
		12: Advanced URI v1.44.2
		13: ToBlog v0.0.1
		14: Enveloppe v7.5.2

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.
@kurko kurko added the 🐛 Bug Something isn't working label Jan 19, 2025
@Mara-Li
Copy link
Member

Mara-Li commented Jan 21, 2025

Can't repro :/
Here the test setup:

Image

Do you have another hierarchy?

Also, the first file (index) have the following setup:

---
share: true
---
Some personal texts:

- [[my-digital-workbench|Check out my work setup]]
- [[jekyll-and-obsidian-blogging|How to use Jekyll with Obsidian.md]]

@Mara-Li Mara-Li added ❓ Question Further information is requested 🔁 No reproduction Where I can't repro the bug labels Jan 21, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🐛 Bug Something isn't working ❓ Question Further information is requested 🔁 No reproduction Where I can't repro the bug
Projects
None yet
Development

No branches or pull requests

2 participants