obsidian-hub
obsidian-hub copied to clipboard
When reading manifest files, ignore authorUrl values that match plugin URL
Originally posted by @claremacrae in https://github.com/obsidian-community/obsidian-hub/pull/216#discussion_r782058142
Background
The update-releases.py
script gathers author Urls from the authorUrl
values in all the manifest.json files in the author's plugins.
It then picks one of them, and uses that.
Not all plugin authors use that field consistently across all their repos... there are a few prolific plugin authors who put the Plugin's Url in the authorUrl field. This means that as they add new plugins, the generated url changes... and it's the (undocumented) convention of this project to revert those scripted edits...
The attached file shows all the author URLs that point in to GitHub.com:
github-account-as-author-url.txt
I created that file with:
cd obsidian-hub/01 - Community/People
cat * | grep Website: | sort | uniq | grep github > github-account-as-author-url.txt
# then manually pruning out a few GitHub pages links and similar (looks like a few stray GitHub.io link got missed)
Recommendation
When parsing plugin manifest.json files, if the authorURL
is equivalent [*] to the plugin URL, then treat that information as not useful, and ignore it.
Hub users will still be able to get to the plugin's GitHub repo, as the author page will have a link to all of their plugins, which in turn will of course link to the plugin repo.
The big benefit of this is that it will remove one of the most common type of manual reversion needed when updating Hub content, for those authors of multiple plugins who out plugin URL in the authorUrl field.
[*] I say "equivalent to" because there is at least one case where the manifest URL has .git
appended: https://github.com/KjellConnelly/obsidian-jsonifier.git