File tree 2 files changed +4
-1
lines changed
2 files changed +4
-1
lines changed Original file line number Diff line number Diff line change @@ -349,6 +349,8 @@ class TemplateService {
349
349
documentationUrl.startsWith ('http://pub.dartlang.org/' ))) {
350
350
documentationUrl = null ;
351
351
}
352
+ final isGitHubHomepage = selectedVersion.homepage != null &&
353
+ selectedVersion.homepage.startsWith ('https://github.com/' );
352
354
353
355
final values = {
354
356
'package' : {
@@ -371,6 +373,7 @@ class TemplateService {
371
373
'authors_title' : 'Author' ,
372
374
'authors_html' :
373
375
_getAuthorsHtml (selectedVersion.pubspec.getAllAuthors ()),
376
+ 'homepage_label' : isGitHubHomepage ? 'Homepage (GitHub)' : 'Homepage' ,
374
377
'homepage' : selectedVersion.homepage,
375
378
'documentation' : documentationUrl,
376
379
'dartdocs_url' : urls.pkgDocUrl (
Original file line number Diff line number Diff line change 72
72
{ {#package.description} }
73
73
<p >{ {package.description} }</p >
74
74
<p >
75
- { {#package.homepage} }<a class =" link" href =" { { & package.homepage} } " >Homepage </a ><br />{ {/package.homepage} }
75
+ { {#package.homepage} }<a class =" link" href =" { { & package.homepage} } " >{ {package.homepage_label } } </a ><br />{ {/package.homepage} }
76
76
{ {#package.documentation} }<a class =" link" href =" { { & package.documentation} } " >Documentation</a ><br />{ {/package.documentation} }
77
77
<a class =" link" href =" { { & package.dartdocs_url} } " >API Docs</a >
78
78
</p >
You can’t perform that action at this time.
0 commit comments