Add new SVG icon, web manifest, meta component, and robots.txt

Introduce an SVG icon to the project and establish a new web manifest containing app details and icon information. Add a Meta component to serve structured site metadata for better web presentation and search engine optimization. Include a new robot.txt to instruct web crawlers. The addition of these elements promotes better site recognition and SEO, enhancing user navigation and experience.
This commit is contained in:
Emil Gulamov 2024-02-12 07:37:22 +04:00
parent 3f6efbc54f
commit 2530eb2316
11 changed files with 115 additions and 0 deletions

BIN
public/apple-touch-icon.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.2 KiB

BIN
public/favicon.ico Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.8 KiB

BIN
public/icon-192.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.5 KiB

BIN
public/icon-512.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 13 KiB

8
public/icon.svg Normal file
View file

@ -0,0 +1,8 @@
<svg width="512" height="512" viewBox="0 0 512 512" fill="none" xmlns="http://www.w3.org/2000/svg">
<rect x="-0.00585938" y="-0.000488281" width="512" height="512" rx="100" fill="#262626"/>
<rect x="20.9297" y="109.01" width="173.138" height="40.5431" rx="20.2715" transform="rotate(0.0432252 20.9297 109.01)" fill="#FACC15"/>
<rect x="100.982" y="183.969" width="173.138" height="40.5431" rx="20.2715" transform="rotate(0.0432252 100.982 183.969)" fill="#FACC15"/>
<rect x="181.491" y="259.354" width="173.138" height="40.5431" rx="20.2715" transform="rotate(0.0432252 181.491 259.354)" fill="#FACC15"/>
<rect x="261.998" y="334.739" width="62.4311" height="40.5431" rx="20.2715" transform="rotate(0.0432252 261.998 334.739)" fill="#FACC15"/>
<path d="M442.513 435.922C445.843 442.651 438.906 449.847 432.059 446.766L355.339 412.235C350.291 409.962 349.021 403.373 352.863 399.387L392.264 358.515C396.106 354.53 402.737 355.557 405.193 360.519L442.513 435.922Z" fill="#FACC15"/>
</svg>

After

Width:  |  Height:  |  Size: 987 B

View file

@ -0,0 +1,35 @@
{
"short_name": "OpenStove",
"name": "OpenStove",
"icons": [
{
"src": "/icon-192.png",
"sizes": "192x192",
"type": "image/png",
"purpose": "any"
},
{
"src": "/icon-512.png",
"sizes": "512x512",
"type": "image/png",
"purpose": "any"
},
{
"src": "/maskable_icon_x512.png",
"sizes": "512x512",
"type": "image/png",
"purpose": "maskable"
},
{
"src": "/maskable_icon.png",
"sizes": "1000x1000",
"type": "image/png",
"purpose": "maskable"
}
],
"display": "minimal-ui",
"id": "/",
"start_url": "/",
"theme_color": "#FFEDD5",
"background_color": "#FFEDD5"
}

BIN
public/maskable_icon.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 36 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 14 KiB

BIN
public/social.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 60 KiB

56
src/components/Meta.astro Normal file
View file

@ -0,0 +1,56 @@
---
const title: string = "ScrewFast";
const author:string = "Emil Gulamov"
const description:string = "";
const URL:string = "";
const socialImage:string = "";
---
<script type="application/ld+json">
{
"@context": "https://schema.org",
"@type": "WebSite",
"name": "{title}",
"url": "{URL}",
"description": "{description}"
}
</script>
<meta
content={description}
name="description"
/>
<meta name="web_author" content={author}/>
<meta name="viewport"
content="width=device-width, initial-scale=1.0, maximum-scale=5.0, minimum-scale=1.0">
<meta http-equiv="X-UA-Compatible" content="ie=edge">
<!-- Facebook Meta Tags -->
<meta property="og:locale" content="en_US" />
<meta property="og:url" content={URL}>
<meta property="og:type" content="website">
<meta property="og:title" content={title}>
<meta property="og:site_name" content={title}/>
<meta property="og:description" content={description}>
<meta property="og:image" content={socialImage}>
<meta content="1200" property="og:image:width"/>
<meta content="600" property="og:image:height"/>
<meta content="image/png" property="og:image:type"/>
<!-- Twitter Meta Tags -->
<meta name="twitter:card" content="summary_large_image">
<meta property="twitter:domain" content={URL}>
<meta property="twitter:url" content={URL}>
<meta name="twitter:title" content={title}>
<meta name="twitter:description" content={description}>
<meta name="twitter:image" content={socialImage}>
<link rel="manifest" href="/manifest.webmanifest" />
<link rel="sitemap" href="/sitemap-index.xml" />
<link href="/favicon.ico" rel="icon" sizes="any" type="image/x-icon"/>
<link href="/icon.svg" rel="icon" type="image/svg+xml" sizes="any"/>
<meta name="mobile-web-app-capable" content="yes">
<link href="/apple-touch-icon.png" rel="apple-touch-icon"/>
<link href="/apple-touch-icon.png" rel="shortcut icon"/>
<meta name="theme-color" content="#facc15">

16
src/pages/robots.txt.ts Normal file
View file

@ -0,0 +1,16 @@
import type { APIRoute } from 'astro';
const robotsTxt = `
User-agent: *
Allow: /
Sitemap: ${new URL('sitemap-index.xml', import.meta.env.SITE).href}
`.trim();
export const GET: APIRoute = () => {
return new Response(robotsTxt, {
headers: {
'Content-Type': 'text/plain; charset=utf-8',
},
});
};