Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions app/lib/frontend/templates/layout.dart
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,10 @@ String renderLayoutPage(
/// The canonical content link that will be put in the header.
/// https://support.google.com/webmasters/answer/139066?hl=en
String? canonicalUrl,

/// The URL for the package versions feed.
String? versionsFeedUrl,
String? versionsFeedTitle,
SearchForm? searchForm,
bool noIndex = false,
PageData? pageData,
Expand Down Expand Up @@ -120,6 +124,8 @@ String renderLayoutPage(
schemaOrgSearchActionJson: isRoot ? _schemaOrgSearchAction : null,
moderationUrl: moderationUrl,
moderationSubject: moderationSubject,
versionsFeedUrl: versionsFeedUrl,
versionsFeedTitle: versionsFeedTitle,
).toString();
}

Expand Down
3 changes: 3 additions & 0 deletions app/lib/frontend/templates/package.dart
Original file line number Diff line number Diff line change
Expand Up @@ -290,6 +290,9 @@ String _renderPkgPage({
data.version,
editable: pkgPageTab == urls.PkgPageTab.admin,
),
versionsFeedUrl: urls.pkgFeedUrl(data.package.name!),
versionsFeedTitle:
'Recently published versions of package ${data.package.name!} on pub.dev',
);
}

Expand Down
11 changes: 10 additions & 1 deletion app/lib/frontend/templates/views/shared/layout.dart
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,8 @@ d.Node pageLayoutNode({
required Map<String, dynamic>? schemaOrgSearchActionJson,
required String? moderationUrl,
required ModerationSubject? moderationSubject,
required String? versionsFeedUrl,
required String? versionsFeedTitle,
}) {
final appleTouchIconUrl = faviconUrl.endsWith('.png')
? faviconUrl
Expand Down Expand Up @@ -112,9 +114,16 @@ d.Node pageLayoutNode({
d.link(
rel: 'alternate',
type: 'application/atom+xml',
title: 'Updated Packages Feed for Pub',
title: 'Recently published packages on pub.dev',
href: '/feed.atom',
),
if (versionsFeedUrl != null && versionsFeedTitle != null)
d.link(
rel: 'alternate',
type: 'application/atom+xml',
title: versionsFeedTitle,
href: versionsFeedUrl,
),
d.link(
rel: 'stylesheet',
type: 'text/css',
Expand Down
2 changes: 1 addition & 1 deletion app/test/frontend/golden/authorized_page.html
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
<link rel="stylesheet" href="https://www.gstatic.com/glue/v25_0/ccb.min.css"/>
<link rel="search" type="application/opensearchdescription+xml" title="Dart packages" href="/osd.xml"/>
<meta name="description" content="Pub is the package manager for the Dart programming language, containing reusable libraries &amp; packages for Flutter and general Dart programs."/>
<link rel="alternate" type="application/atom+xml" title="Updated Packages Feed for Pub" href="/feed.atom"/>
<link rel="alternate" type="application/atom+xml" title="Recently published packages on pub.dev" href="/feed.atom"/>
<link rel="stylesheet" type="text/css" href="/static/hash-%%etag%%/material/bundle/styles.css"/>
<link rel="stylesheet" type="text/css" href="/static/hash-%%etag%%/css/style.css"/>
<script src="/static/hash-%%etag%%/material/bundle/script.min.js" defer="defer"></script>
Expand Down
2 changes: 1 addition & 1 deletion app/test/frontend/golden/consent_page.html
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
<link rel="stylesheet" href="https://www.gstatic.com/glue/v25_0/ccb.min.css"/>
<link rel="search" type="application/opensearchdescription+xml" title="Dart packages" href="/osd.xml"/>
<meta name="description" content="Pub is the package manager for the Dart programming language, containing reusable libraries &amp; packages for Flutter and general Dart programs."/>
<link rel="alternate" type="application/atom+xml" title="Updated Packages Feed for Pub" href="/feed.atom"/>
<link rel="alternate" type="application/atom+xml" title="Recently published packages on pub.dev" href="/feed.atom"/>
<link rel="stylesheet" type="text/css" href="/static/hash-%%etag%%/material/bundle/styles.css"/>
<link rel="stylesheet" type="text/css" href="/static/hash-%%etag%%/css/style.css"/>
<script src="/static/hash-%%etag%%/material/bundle/script.min.js" defer="defer"></script>
Expand Down
2 changes: 1 addition & 1 deletion app/test/frontend/golden/create_publisher_page.html
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
<link rel="stylesheet" href="https://www.gstatic.com/glue/v25_0/ccb.min.css"/>
<link rel="search" type="application/opensearchdescription+xml" title="Dart packages" href="/osd.xml"/>
<meta name="description" content="Pub is the package manager for the Dart programming language, containing reusable libraries &amp; packages for Flutter and general Dart programs."/>
<link rel="alternate" type="application/atom+xml" title="Updated Packages Feed for Pub" href="/feed.atom"/>
<link rel="alternate" type="application/atom+xml" title="Recently published packages on pub.dev" href="/feed.atom"/>
<link rel="stylesheet" type="text/css" href="/static/hash-%%etag%%/material/bundle/styles.css"/>
<link rel="stylesheet" type="text/css" href="/static/hash-%%etag%%/css/style.css"/>
<script src="/static/hash-%%etag%%/material/bundle/script.min.js" defer="defer"></script>
Expand Down
2 changes: 1 addition & 1 deletion app/test/frontend/golden/error_page.html
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
<link rel="stylesheet" href="https://www.gstatic.com/glue/v25_0/ccb.min.css"/>
<link rel="search" type="application/opensearchdescription+xml" title="Dart packages" href="/osd.xml"/>
<meta name="description" content="Pub is the package manager for the Dart programming language, containing reusable libraries &amp; packages for Flutter and general Dart programs."/>
<link rel="alternate" type="application/atom+xml" title="Updated Packages Feed for Pub" href="/feed.atom"/>
<link rel="alternate" type="application/atom+xml" title="Recently published packages on pub.dev" href="/feed.atom"/>
<link rel="stylesheet" type="text/css" href="/static/hash-%%etag%%/material/bundle/styles.css"/>
<link rel="stylesheet" type="text/css" href="/static/hash-%%etag%%/css/style.css"/>
<script src="/static/hash-%%etag%%/material/bundle/script.min.js" defer="defer"></script>
Expand Down
2 changes: 1 addition & 1 deletion app/test/frontend/golden/help_page.html
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
<link rel="search" type="application/opensearchdescription+xml" title="Dart packages" href="/osd.xml"/>
<link rel="canonical" href="https://pub.dev/help"/>
<meta name="description" content="Pub is the package manager for the Dart programming language, containing reusable libraries &amp; packages for Flutter and general Dart programs."/>
<link rel="alternate" type="application/atom+xml" title="Updated Packages Feed for Pub" href="/feed.atom"/>
<link rel="alternate" type="application/atom+xml" title="Recently published packages on pub.dev" href="/feed.atom"/>
<link rel="stylesheet" type="text/css" href="/static/hash-%%etag%%/material/bundle/styles.css"/>
<link rel="stylesheet" type="text/css" href="/static/hash-%%etag%%/css/style.css"/>
<script src="/static/hash-%%etag%%/material/bundle/script.min.js" defer="defer"></script>
Expand Down
2 changes: 1 addition & 1 deletion app/test/frontend/golden/landing_page.html
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
<link rel="search" type="application/opensearchdescription+xml" title="Dart packages" href="/osd.xml"/>
<link rel="canonical" href="https://pub.dev/"/>
<meta name="description" content="Pub is the package manager for the Dart programming language, containing reusable libraries &amp; packages for Flutter and general Dart programs."/>
<link rel="alternate" type="application/atom+xml" title="Updated Packages Feed for Pub" href="/feed.atom"/>
<link rel="alternate" type="application/atom+xml" title="Recently published packages on pub.dev" href="/feed.atom"/>
<link rel="stylesheet" type="text/css" href="/static/hash-%%etag%%/material/bundle/styles.css"/>
<link rel="stylesheet" type="text/css" href="/static/hash-%%etag%%/css/style.css"/>
<script src="/static/hash-%%etag%%/material/bundle/script.min.js" defer="defer"></script>
Expand Down
2 changes: 1 addition & 1 deletion app/test/frontend/golden/my_activity_log_page.html
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
<link rel="stylesheet" href="https://www.gstatic.com/glue/v25_0/ccb.min.css"/>
<link rel="search" type="application/opensearchdescription+xml" title="Dart packages" href="/osd.xml"/>
<meta name="description" content="Pub is the package manager for the Dart programming language, containing reusable libraries &amp; packages for Flutter and general Dart programs."/>
<link rel="alternate" type="application/atom+xml" title="Updated Packages Feed for Pub" href="/feed.atom"/>
<link rel="alternate" type="application/atom+xml" title="Recently published packages on pub.dev" href="/feed.atom"/>
<link rel="stylesheet" type="text/css" href="/static/hash-%%etag%%/material/bundle/styles.css"/>
<link rel="stylesheet" type="text/css" href="/static/hash-%%etag%%/css/style.css"/>
<script src="/static/hash-%%etag%%/material/bundle/script.min.js" defer="defer"></script>
Expand Down
2 changes: 1 addition & 1 deletion app/test/frontend/golden/my_liked_packages.html
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
<link rel="stylesheet" href="https://www.gstatic.com/glue/v25_0/ccb.min.css"/>
<link rel="search" type="application/opensearchdescription+xml" title="Dart packages" href="/osd.xml"/>
<meta name="description" content="Pub is the package manager for the Dart programming language, containing reusable libraries &amp; packages for Flutter and general Dart programs."/>
<link rel="alternate" type="application/atom+xml" title="Updated Packages Feed for Pub" href="/feed.atom"/>
<link rel="alternate" type="application/atom+xml" title="Recently published packages on pub.dev" href="/feed.atom"/>
<link rel="stylesheet" type="text/css" href="/static/hash-%%etag%%/material/bundle/styles.css"/>
<link rel="stylesheet" type="text/css" href="/static/hash-%%etag%%/css/style.css"/>
<script src="/static/hash-%%etag%%/material/bundle/script.min.js" defer="defer"></script>
Expand Down
2 changes: 1 addition & 1 deletion app/test/frontend/golden/my_packages.html
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
<link rel="stylesheet" href="https://www.gstatic.com/glue/v25_0/ccb.min.css"/>
<link rel="search" type="application/opensearchdescription+xml" title="Dart packages" href="/osd.xml"/>
<meta name="description" content="Pub is the package manager for the Dart programming language, containing reusable libraries &amp; packages for Flutter and general Dart programs."/>
<link rel="alternate" type="application/atom+xml" title="Updated Packages Feed for Pub" href="/feed.atom"/>
<link rel="alternate" type="application/atom+xml" title="Recently published packages on pub.dev" href="/feed.atom"/>
<link rel="stylesheet" type="text/css" href="/static/hash-%%etag%%/material/bundle/styles.css"/>
<link rel="stylesheet" type="text/css" href="/static/hash-%%etag%%/css/style.css"/>
<script src="/static/hash-%%etag%%/material/bundle/script.min.js" defer="defer"></script>
Expand Down
2 changes: 1 addition & 1 deletion app/test/frontend/golden/my_publishers.html
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
<link rel="stylesheet" href="https://www.gstatic.com/glue/v25_0/ccb.min.css"/>
<link rel="search" type="application/opensearchdescription+xml" title="Dart packages" href="/osd.xml"/>
<meta name="description" content="Pub is the package manager for the Dart programming language, containing reusable libraries &amp; packages for Flutter and general Dart programs."/>
<link rel="alternate" type="application/atom+xml" title="Updated Packages Feed for Pub" href="/feed.atom"/>
<link rel="alternate" type="application/atom+xml" title="Recently published packages on pub.dev" href="/feed.atom"/>
<link rel="stylesheet" type="text/css" href="/static/hash-%%etag%%/material/bundle/styles.css"/>
<link rel="stylesheet" type="text/css" href="/static/hash-%%etag%%/css/style.css"/>
<script src="/static/hash-%%etag%%/material/bundle/script.min.js" defer="defer"></script>
Expand Down
2 changes: 1 addition & 1 deletion app/test/frontend/golden/pkg_activity_log_page.html
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
<link rel="stylesheet" href="https://www.gstatic.com/glue/v25_0/ccb.min.css"/>
<link rel="search" type="application/opensearchdescription+xml" title="Dart packages" href="/osd.xml"/>
<meta name="description" content="Pub is the package manager for the Dart programming language, containing reusable libraries &amp; packages for Flutter and general Dart programs."/>
<link rel="alternate" type="application/atom+xml" title="Updated Packages Feed for Pub" href="/feed.atom"/>
<link rel="alternate" type="application/atom+xml" title="Recently published packages on pub.dev" href="/feed.atom"/>
<link rel="stylesheet" type="text/css" href="/static/hash-%%etag%%/material/bundle/styles.css"/>
<link rel="stylesheet" type="text/css" href="/static/hash-%%etag%%/css/style.css"/>
<script src="/static/hash-%%etag%%/material/bundle/script.min.js" defer="defer"></script>
Expand Down
2 changes: 1 addition & 1 deletion app/test/frontend/golden/pkg_admin_page.html
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
<link rel="stylesheet" href="https://www.gstatic.com/glue/v25_0/ccb.min.css"/>
<link rel="search" type="application/opensearchdescription+xml" title="Dart packages" href="/osd.xml"/>
<meta name="description" content="Pub is the package manager for the Dart programming language, containing reusable libraries &amp; packages for Flutter and general Dart programs."/>
<link rel="alternate" type="application/atom+xml" title="Updated Packages Feed for Pub" href="/feed.atom"/>
<link rel="alternate" type="application/atom+xml" title="Recently published packages on pub.dev" href="/feed.atom"/>
<link rel="stylesheet" type="text/css" href="/static/hash-%%etag%%/material/bundle/styles.css"/>
<link rel="stylesheet" type="text/css" href="/static/hash-%%etag%%/css/style.css"/>
<script src="/static/hash-%%etag%%/material/bundle/script.min.js" defer="defer"></script>
Expand Down
3 changes: 2 additions & 1 deletion app/test/frontend/golden/pkg_changelog_page.html
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,8 @@
<link rel="search" type="application/opensearchdescription+xml" title="Dart packages" href="/osd.xml"/>
<link rel="canonical" href="https://pub.dev/packages/oxygen/changelog"/>
<meta name="description" content="oxygen is awesome"/>
<link rel="alternate" type="application/atom+xml" title="Updated Packages Feed for Pub" href="/feed.atom"/>
<link rel="alternate" type="application/atom+xml" title="Recently published packages on pub.dev" href="/feed.atom"/>
<link rel="alternate" type="application/atom+xml" title="Recently published versions of package oxygen on pub.dev" href="/api/packages/oxygen/feed.atom"/>
<link rel="stylesheet" type="text/css" href="/static/hash-%%etag%%/material/bundle/styles.css"/>
<link rel="stylesheet" type="text/css" href="/static/hash-%%etag%%/css/style.css"/>
<script src="/static/hash-%%etag%%/material/bundle/script.min.js" defer="defer"></script>
Expand Down
3 changes: 2 additions & 1 deletion app/test/frontend/golden/pkg_example_page.html
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,8 @@
<link rel="search" type="application/opensearchdescription+xml" title="Dart packages" href="/osd.xml"/>
<link rel="canonical" href="https://pub.dev/packages/oxygen/example"/>
<meta name="description" content="oxygen is awesome"/>
<link rel="alternate" type="application/atom+xml" title="Updated Packages Feed for Pub" href="/feed.atom"/>
<link rel="alternate" type="application/atom+xml" title="Recently published packages on pub.dev" href="/feed.atom"/>
<link rel="alternate" type="application/atom+xml" title="Recently published versions of package oxygen on pub.dev" href="/api/packages/oxygen/feed.atom"/>
<link rel="stylesheet" type="text/css" href="/static/hash-%%etag%%/material/bundle/styles.css"/>
<link rel="stylesheet" type="text/css" href="/static/hash-%%etag%%/css/style.css"/>
<script src="/static/hash-%%etag%%/material/bundle/script.min.js" defer="defer"></script>
Expand Down
2 changes: 1 addition & 1 deletion app/test/frontend/golden/pkg_index_page.html
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
<link rel="search" type="application/opensearchdescription+xml" title="Dart packages" href="/osd.xml"/>
<link rel="canonical" href="https://pub.dev/packages?q=sdk%3Adart"/>
<meta name="description" content="Pub is the package manager for the Dart programming language, containing reusable libraries &amp; packages for Flutter and general Dart programs."/>
<link rel="alternate" type="application/atom+xml" title="Updated Packages Feed for Pub" href="/feed.atom"/>
<link rel="alternate" type="application/atom+xml" title="Recently published packages on pub.dev" href="/feed.atom"/>
<link rel="stylesheet" type="text/css" href="/static/hash-%%etag%%/material/bundle/styles.css"/>
<link rel="stylesheet" type="text/css" href="/static/hash-%%etag%%/css/style.css"/>
<script src="/static/hash-%%etag%%/material/bundle/script.min.js" defer="defer"></script>
Expand Down
3 changes: 2 additions & 1 deletion app/test/frontend/golden/pkg_install_page.html
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,8 @@
<link rel="search" type="application/opensearchdescription+xml" title="Dart packages" href="/osd.xml"/>
<link rel="canonical" href="https://pub.dev/packages/oxygen/install"/>
<meta name="description" content="oxygen is awesome"/>
<link rel="alternate" type="application/atom+xml" title="Updated Packages Feed for Pub" href="/feed.atom"/>
<link rel="alternate" type="application/atom+xml" title="Recently published packages on pub.dev" href="/feed.atom"/>
<link rel="alternate" type="application/atom+xml" title="Recently published versions of package oxygen on pub.dev" href="/api/packages/oxygen/feed.atom"/>
<link rel="stylesheet" type="text/css" href="/static/hash-%%etag%%/material/bundle/styles.css"/>
<link rel="stylesheet" type="text/css" href="/static/hash-%%etag%%/css/style.css"/>
<script src="/static/hash-%%etag%%/material/bundle/script.min.js" defer="defer"></script>
Expand Down
3 changes: 2 additions & 1 deletion app/test/frontend/golden/pkg_score_page.html
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,8 @@
<link rel="search" type="application/opensearchdescription+xml" title="Dart packages" href="/osd.xml"/>
<link rel="canonical" href="https://pub.dev/packages/oxygen/score"/>
<meta name="description" content="oxygen is awesome"/>
<link rel="alternate" type="application/atom+xml" title="Updated Packages Feed for Pub" href="/feed.atom"/>
<link rel="alternate" type="application/atom+xml" title="Recently published packages on pub.dev" href="/feed.atom"/>
<link rel="alternate" type="application/atom+xml" title="Recently published versions of package oxygen on pub.dev" href="/api/packages/oxygen/feed.atom"/>
<link rel="stylesheet" type="text/css" href="/static/hash-%%etag%%/material/bundle/styles.css"/>
<link rel="stylesheet" type="text/css" href="/static/hash-%%etag%%/css/style.css"/>
<script src="/static/hash-%%etag%%/material/bundle/script.min.js" defer="defer"></script>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,8 @@
<link rel="search" type="application/opensearchdescription+xml" title="Dart packages" href="/osd.xml"/>
<link rel="canonical" href="https://pub.dev/packages/oxygen/score"/>
<meta name="description" content="oxygen is awesome"/>
<link rel="alternate" type="application/atom+xml" title="Updated Packages Feed for Pub" href="/feed.atom"/>
<link rel="alternate" type="application/atom+xml" title="Recently published packages on pub.dev" href="/feed.atom"/>
<link rel="alternate" type="application/atom+xml" title="Recently published versions of package oxygen on pub.dev" href="/api/packages/oxygen/feed.atom"/>
<link rel="stylesheet" type="text/css" href="/static/hash-%%etag%%/material/bundle/styles.css"/>
<link rel="stylesheet" type="text/css" href="/static/hash-%%etag%%/css/style.css"/>
<script src="/static/hash-%%etag%%/material/bundle/script.min.js" defer="defer"></script>
Expand Down
3 changes: 2 additions & 1 deletion app/test/frontend/golden/pkg_show_page.html
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,8 @@
<link rel="search" type="application/opensearchdescription+xml" title="Dart packages" href="/osd.xml"/>
<link rel="canonical" href="https://pub.dev/packages/oxygen"/>
<meta name="description" content="oxygen is awesome"/>
<link rel="alternate" type="application/atom+xml" title="Updated Packages Feed for Pub" href="/feed.atom"/>
<link rel="alternate" type="application/atom+xml" title="Recently published packages on pub.dev" href="/feed.atom"/>
<link rel="alternate" type="application/atom+xml" title="Recently published versions of package oxygen on pub.dev" href="/api/packages/oxygen/feed.atom"/>
<link rel="stylesheet" type="text/css" href="/static/hash-%%etag%%/material/bundle/styles.css"/>
<link rel="stylesheet" type="text/css" href="/static/hash-%%etag%%/css/style.css"/>
<script src="/static/hash-%%etag%%/material/bundle/script.min.js" defer="defer"></script>
Expand Down
Loading