macports / macports-webapp

Web application to display information about ports, build history and installation statistics
https://ports.macports.org/
BSD 2-Clause "Simplified" License
56 stars 28 forks source link

Could we support parsing more than one URL for homepage? #363

Closed barracuda156 closed 1 year ago

barracuda156 commented 1 year ago

See: https://trac.macports.org/ticket/68460

Unless there are reasons not to, IMO, it is desirable. It is not a rare case when there is a separate website with documentation and then a development repo, or alike.

ryandesign commented 1 year ago

As explained in that Trac ticket, the homepage option is intended to contain one URL, not multiple.

barracuda156 commented 1 year ago

As explained in that Trac ticket, the homepage option is intended to contain one URL, not multiple.

I have seen the statement, I did not see any reasoning for that. It is technically complicated to add an ability to parse more than one URLs? Or why not?

neverpanic commented 1 year ago

I regularly use port gohome with port names, and expect that to open one page in my browser. How would you envision port gohome would behave with more than one URL?

I'd think it would be pretty bad user experience if twelve URLs in a Portfile would open twelve browser tabs when invoking port gohome.

barracuda156 commented 1 year ago

That is a fair reason to have a single homepage.

Could we consider additional, but distinct field? Or you think it is unneeded? (Just asking, it is not a case where I see a point in trying to convince someone.)

jmroot commented 1 year ago

Additional URLs can already be listed in the long_description or even the notes if it's important for users to know about them.

barracuda156 commented 1 year ago

@jmroot Ok, fair enough. Let me close this.

Dave-Allured commented 11 months ago

Please re-open this for discussion. I favor allowing more than one URL listed for "homepage", for the simple reason given originally. Independently I ran into this in PR https://github.com/macports/macports-ports/pull/21729. It was the same thing. Upstream sports a master website for documentation, plus a github repo for development and release distribution. This seems like a pretty modest extension for the "homepage" directive.

@neverpanic said:

I regularly use port gohome with port names, and expect that to open one page in my browser. How would you envision port gohome would behave with more than one URL?

Simple. Open only the first one.

mascguy commented 11 months ago

Please re-open this for discussion. I favor allowing more than one URL listed for "homepage", for the simple reason given originally. Independently I ran into this in PR https://github.com/macports/macports-ports/pull/21729.

It was the same thing. Upstream sports a master website for documentation, plus a github repo for development and release distribution. This seems like a pretty modest extension for the "homepage" directive.

I'd suggest choosing one of their sites - either the documentation site, or the GitHub repo - particularly if each one links to the other.

Personally I tend to favor the repo, as not all documentation sites are constantly updated. Making the repo the most up-to-date source for project info, etc.

Regardless, the key point is that we're not trying to provide links to every possible information source for a project.

Does that make sense?

Anyone else... thoughts?

barracuda156 commented 11 months ago

@mascguy TBH implementing it should be trivial, and I do not think we face a realistic concern that someone gonna add a ridiculous number of URLs (or just limit those to exactly two when parsing portfile). Having said that, it would be a minor improvement, and given that so many things are broken and some are disputable, this one is perhaps not worth arguing about :) I would rather have two URLs than one, but can certainly live with a single.