mirror of
				https://github.com/valentineus/popov.link.git
				synced 2025-11-04 06:49:45 +03:00 
			
		
		
		
	Added canonical URL
This commit is contained in:
		@@ -1,4 +1,5 @@
 | 
				
			|||||||
import { defineConfig } from "astro/config";
 | 
					import { defineConfig } from "astro/config";
 | 
				
			||||||
 | 
					
 | 
				
			||||||
// https://astro.build/config
 | 
					export default defineConfig({
 | 
				
			||||||
export default defineConfig({});
 | 
						site: "https://popov.link",
 | 
				
			||||||
 | 
					});
 | 
				
			||||||
 
 | 
				
			|||||||
							
								
								
									
										5
									
								
								src/components/CanonicalURL.astro
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										5
									
								
								src/components/CanonicalURL.astro
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1,5 @@
 | 
				
			|||||||
 | 
					---
 | 
				
			||||||
 | 
					const canonicalURL = new URL(Astro.url.pathname, Astro.site);
 | 
				
			||||||
 | 
					---
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					<link href={canonicalURL} rel="canonical" />
 | 
				
			||||||
@@ -1,5 +1,5 @@
 | 
				
			|||||||
---
 | 
					---
 | 
				
			||||||
 | 
					import CanonicalURL from "../components/CanonicalURL.astro";
 | 
				
			||||||
---
 | 
					---
 | 
				
			||||||
 | 
					
 | 
				
			||||||
<html>
 | 
					<html>
 | 
				
			||||||
@@ -18,7 +18,7 @@
 | 
				
			|||||||
		<link href="#" rel="alternate" title="RSS" type="application/atom+xml" />
 | 
							<link href="#" rel="alternate" title="RSS" type="application/atom+xml" />
 | 
				
			||||||
 | 
					
 | 
				
			||||||
		<!-- Canonical URL -->
 | 
							<!-- Canonical URL -->
 | 
				
			||||||
		<link href="#" rel="canonical" />
 | 
							<CanonicalURL />
 | 
				
			||||||
	</head>
 | 
						</head>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	<body>
 | 
						<body>
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user