obsidianmd / obsidian-developer-docs

173 stars 68 forks source link

Plugin folder name should match plugin id in manifest.json #153

Open SashaKryzh opened 1 week ago

SashaKryzh commented 1 week ago

For Obsidian to work correctly, the folder name in .obsidian/plugins must match the id in manifest.json. Without this, methods such as onExternalSettingsChange won't be called. However, this requirement isn't mentioned anywhere in the Obsidian documentation (neither on the Manifest page nor the onExternalSettingsChange page).

Why this is a problem:

Solutions:

  1. Update the documentation to include a "rename folder" step in the Build a Plugin guide and add this information to the Manifest and onExternalSettingsChange pages.
  2. Alternatively, changes could be made to Obsidian's code to address this issue, but that seems more complex and unnecessary.
SashaKryzh commented 6 days ago

Should I create a PR to update the docs?

sigrunixia commented 6 days ago

Should I create a PR to update the docs?

It would be helpful if you could at least get the foundations started. Joethei just go back from vacation and is catching up on plugin reviews, and my focus is on the main help docs for this week at least. :)

SashaKryzh commented 4 days ago

Should I create a PR to update the docs?

It would be helpful if you could at least get the foundations started. Joethei just go back from vacation and is catching up on plugin reviews, and my focus is on the main help docs for this week at least. :)

I created a PR that addresses "Build a plugin" and "Manifest" pages. I think it would be good to also add this info to onExternalSettingsChange documentation.

sigrunixia commented 4 days ago

Should I create a PR to update the docs?

It would be helpful if you could at least get the foundations started. Joethei just go back from vacation and is catching up on plugin reviews, and my focus is on the main help docs for this week at least. :)

I created a PR that addresses "Build a plugin" and "Manifest" pages. I think it would be good to also add this info to onExternalSettingsChange documentation.

To confirm, this is roughly the part that you think should be added to onExternalSettingsChange?

[!note] For local development, the id should match the plugin's folder name; otherwise some methods, such as onExternalSettingsChange, won't be called.

SashaKryzh commented 4 days ago

To confirm, this is roughly the part that you think should be added to onExternalSettingsChange?

Note

For local development, the id should match the plugin's folder name; otherwise some methods, such as onExternalSettingsChange, won't be called.

Yes. When it didn’t work for me, the first page I opened was the onExternalSettingsChange documentation.

Maybe something like this: For local development, the id in the manifest.json should match the plugin's folder name; otherwise, this method won't be called.

sigrunixia commented 4 days ago

Got it, I'll add it to my batch of changes this evening as your PR was already merged. :)

Edit: Joethei will handle this actually and get something added. <3