|
1 | 1 | --- |
2 | 2 | export interface Props { |
3 | | - title: string; |
| 3 | + title: string; |
| 4 | + canonical?: string; |
| 5 | + description?: string; |
| 6 | + keywords?: string; |
| 7 | + author?: string; |
| 8 | + ogImage?: string; |
| 9 | + favicon?: string; |
4 | 10 | } |
5 | 11 |
|
6 | | -const { title } = Astro.props; |
| 12 | +const { title, canonical, description, keywords, author, ogImage, favicon } = |
| 13 | + Astro.props; |
7 | 14 | --- |
8 | 15 |
|
9 | | -<!DOCTYPE html> |
| 16 | +<!doctype html> |
10 | 17 | <html lang="en"> |
11 | | - <head> |
12 | | - <meta charset="UTF-8" /> |
13 | | - <meta name="viewport" content="width=device-width" /> |
14 | | - <link rel="icon" type="image/svg+xml" href={`${import.meta.env.BASE_URL}favicon.svg`} /> |
| 18 | + <head> |
| 19 | + <meta charset="UTF-8" /> |
| 20 | + <meta name="viewport" content="width=device-width, initial-scale=1.0" /> |
| 21 | + |
| 22 | + <!-- SEO Meta Tags --> |
| 23 | + <title>{title}</title> |
| 24 | + {description && <meta name="description" content={description} />} |
| 25 | + {keywords && <meta name="keywords" content={keywords} />} |
| 26 | + {author && <meta name="author" content={author} />} |
| 27 | + <meta name="generator" content={Astro.generator} /> |
| 28 | + |
| 29 | + <!-- Canonical URL --> |
| 30 | + {canonical && <link rel="canonical" href={canonical} />} |
| 31 | + |
| 32 | + <!-- Open Graph Meta Tags --> |
| 33 | + <meta property="og:title" content={title} /> |
| 34 | + {description && <meta property="og:description" content={description} />} |
| 35 | + <meta property="og:type" content="website" /> |
| 36 | + {canonical && <meta property="og:url" content={canonical} />} |
| 37 | + {ogImage && <meta property="og:image" content={ogImage} />} |
| 38 | + |
| 39 | + <!-- Twitter Card Meta Tags --> |
| 40 | + <meta name="twitter:card" content="summary_large_image" /> |
| 41 | + <meta name="twitter:title" content={title} /> |
| 42 | + {description && <meta name="twitter:description" content={description} />} |
| 43 | + {ogImage && <meta name="twitter:image" content={ogImage} />} |
| 44 | + |
| 45 | + <!-- Favicon --> |
| 46 | + <link |
| 47 | + rel="icon" |
| 48 | + type="image/png" |
| 49 | + href={favicon || `${import.meta.env.BASE_URL}favicon.svg`} |
| 50 | + /> |
| 51 | + |
| 52 | + <!-- Fonts --> |
15 | 53 | <link |
16 | 54 | href="https://fonts.googleapis.com/css?family=Open+Sans:300,400,600,700|Noto+Sans:300,400,500,600,700,800|PT+Mono:300,400,500,600,700" |
17 | 55 | rel="stylesheet" |
18 | 56 | /> |
19 | | - <meta name="generator" content={Astro.generator} /> |
20 | | - <title>{title}</title> |
21 | | - <link rel="canonical" href="https://www.creative-tim.com/astro/" /> |
22 | | - <!-- Google Tag Manager --> |
23 | | - <script>(function(w,d,s,l,i){w[l]=w[l]||[];w[l].push({'gtm.start': |
24 | | - new Date().getTime(),event:'gtm.js'});var f=d.getElementsByTagName(s)[0], |
25 | | - j=d.createElement(s),dl=l!='dataLayer'?'&l='+l:'';j.async=true;j.src= |
26 | | - 'https://www.googletagmanager.com/gtm.js?id='+i+dl;f.parentNode.insertBefore(j,f); |
27 | | - })(window,document,'script','dataLayer','GTM-NKDMSK6');</script> |
28 | | - <!-- End Google Tag Manager --> |
29 | | - |
30 | | - <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/bootstrap-icons@1.11.3/font/bootstrap-icons.min.css"> |
31 | | - |
32 | | - </head> |
33 | | - <body> |
34 | | - <!-- Google Tag Manager (noscript) --> |
35 | | - <noscript><iframe src="https://www.googletagmanager.com/ns.html?id=GTM-NKDMSK6" |
36 | | - height="0" width="0" style="display:none;visibility:hidden"></iframe></noscript> |
37 | | - <!-- End Google Tag Manager (noscript) --> |
38 | | - <slot /> |
39 | | - </body> |
| 57 | + |
| 58 | + <!-- Bootstrap Icons --> |
| 59 | + <link |
| 60 | + rel="stylesheet" |
| 61 | + href="https://cdn.jsdelivr.net/npm/bootstrap-icons@1.11.3/font/bootstrap-icons.min.css" |
| 62 | + /> |
| 63 | + </head> |
| 64 | + <body> |
| 65 | + <slot /> |
| 66 | + </body> |
40 | 67 |
|
41 | 68 | <!-- Bootstrap JavaScript Bundle with Popper --> |
42 | | - <script src="https://cdn.jsdelivr.net/npm/bootstrap@5.3.0/dist/js/bootstrap.bundle.min.js" integrity="sha384-geWF76RCwLtnZ8qwWowPQNguL3RmwHVBC9FhGdlKrxdiJJigb/j/68SIy3Te4Bkz" crossorigin="anonymous"></script> |
| 69 | + <script |
| 70 | + src="https://cdn.jsdelivr.net/npm/bootstrap@5.3.0/dist/js/bootstrap.bundle.min.js" |
| 71 | + integrity="sha384-geWF76RCwLtnZ8qwWowPQNguL3RmwHVBC9FhGdlKrxdiJJigb/j/68SIy3Te4Bkz" |
| 72 | + crossorigin="anonymous" |
| 73 | + > |
| 74 | + </script> |
43 | 75 | <!-- Product JavaScript --> |
44 | 76 | <script> |
45 | | - import "/assets/js/astro-ecommerce.js" |
| 77 | + import "/assets/js/astro-ecommerce.js"; |
46 | 78 | </script> |
47 | 79 | </html> |
48 | 80 | <style is:global> |
49 | | - code { |
50 | | - font-family: Menlo, Monaco, Lucida Console, Liberation Mono, DejaVu Sans Mono, |
51 | | - Bitstream Vera Sans Mono, Courier New, monospace; |
52 | | - } |
| 81 | + code { |
| 82 | + font-family: |
| 83 | + Menlo, |
| 84 | + Monaco, |
| 85 | + Lucida Console, |
| 86 | + Liberation Mono, |
| 87 | + DejaVu Sans Mono, |
| 88 | + Bitstream Vera Sans Mono, |
| 89 | + Courier New, |
| 90 | + monospace; |
| 91 | + } |
53 | 92 | </style> |
0 commit comments