Skip to content

Commit

Permalink
Merge pull request #89 from gvkhna:main
Browse files Browse the repository at this point in the history
Add sizes override to Link element
  • Loading branch information
jonasmerlin authored Feb 19, 2024
2 parents d2f841d + 5ba950e commit 9862453
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 3 deletions.
3 changes: 2 additions & 1 deletion cypress/e2e/seo.cy.js
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,7 @@ describe("Basic Tags Without URL", () => {
cy.get('head meta[property="og:url"]').should(
"have.attr",
"content",
"http://localhost:4321/ogBasicTagsWithoutUrl/"
"http://localhost:4321/ogBasicTagsWithoutUrl"
);
});
});
Expand Down Expand Up @@ -384,6 +384,7 @@ describe("Extended link tags", () => {
cy.get('head link[rel="icon"]').should("have.attr", "href", "/favicon.ico");
cy.get('head link[rel="icon"]').should("have.attr", "rel", "icon");
cy.get('head link[rel="icon"]').should("have.attr", "type", "image/svg+xml");
cy.get('head link[rel="icon"]').should("have.attr", "sizes", "60x60");
});
});

Expand Down
3 changes: 2 additions & 1 deletion src/SEO.astro
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,10 @@ import LanguageAlternatesTags from "./components/LanguageAlternatesTags.astro";
export type TwitterCardType = "summary" | "summary_large_image" | "app" | "player";
export interface Link extends HTMLLinkElement {
export interface Link extends Omit<HTMLLinkElement, 'sizes'> {
prefetch: boolean;
crossorigin: string;
sizes: string;
}
export interface Meta extends HTMLMetaElement {
Expand Down
2 changes: 1 addition & 1 deletion src/pages/extendedLinkTags.astro
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ import SEO from "../SEO.astro";
title="Francis York Morgan"
description="Agent"
canonical="Zach"
extend={{ link: [{ rel: "icon", href: "/favicon.ico", type:"image/svg+xml" }] }}
extend={{ link: [{ rel: "icon", href: "/favicon.ico", type:"image/svg+xml", sizes: "60x60" }] }}
/>
</head>
<body>Test</body>
Expand Down

0 comments on commit 9862453

Please sign in to comment.