Skip to content

Commit

Permalink
(fixes) robots.txt
Browse files Browse the repository at this point in the history
  • Loading branch information
kevincobain2000 committed Dec 31, 2023
1 parent 93dbdcc commit a7f8cc1
Show file tree
Hide file tree
Showing 2 changed files with 34 additions and 28 deletions.
50 changes: 24 additions & 26 deletions frontend/src/components/Layout.astro
Original file line number Diff line number Diff line change
@@ -1,39 +1,37 @@
---
interface Props {
title: string;
description: string;
title: string;
description: string;
}
const { title, description } = Astro.props;
---

<!doctype html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<meta name="description" content={description} />
<meta name="viewport" content="width=device-width" />
<link rel="icon" type="image/svg+xml" href="/favicon.ico" />
<meta name="generator" content={Astro.generator} />
<title>{title}</title>
</head>
<body class="leading-normal tracking-normal text-indigo-400 m-6 bg-cover bg-gradient">
<slot />
</body>
<head>
<meta charset="UTF-8" />
<meta name="description" content={description} />
<meta name="viewport" content="width=device-width" />
<link rel="icon" type="image/svg+xml" href="/favicon.ico" />
<meta name="generator" content={Astro.generator} />
<title>{title}</title>
</head>
<body
class="leading-normal tracking-normal text-indigo-400 m-6 bg-cover bg-gradient"
>
<slot />
</body>
</html>
<style is:global>
* {
-webkit-font-smoothing: antialiased;
-moz-osx-font-smoothing: grayscale;
}

* {
-webkit-font-smoothing: antialiased;
-moz-osx-font-smoothing: grayscale;
}

.bg-gradient {
background: #780206; /* fallback for old browsers */
background: -webkit-linear-gradient(to right, #061161, #780206); /* Chrome 10-25, Safari 5.1-6 */
background: linear-gradient(to right, #061161, #780206); /* W3C, IE 10+/ Edge, Firefox 16+, Chrome 26+, Opera 12+, Safari 7+ */

}


.bg-gradient {
background: #780206;
background: -webkit-linear-gradient(to right, #061161, #780206);
background: linear-gradient(to right, #061161, #780206);
}
</style>
12 changes: 10 additions & 2 deletions pkg/routes.go
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,16 @@ const (
DOCS_URL = "https://github.com/kevincobain2000/instachart"
FAVICON_FILE = "favicon.ico"
ROBOTS_FILE = "robots.txt"
ROBOTS_TXT = "User-agent: *\nAllow: /"
DIST_DIR = "frontend/dist"
ROBOTS_TXT = `User-agent: *\n
Allow: /
Disallow: /line
Disallow: /bar
Disallow: /radar
Disallow: /funnel
Disallow: /donut
Disallow: /pie
Disallow: /table`
DIST_DIR = "frontend/dist"
)

func SetupRoutes(e *echo.Echo, baseURL string, publicDir embed.FS) {
Expand Down

0 comments on commit a7f8cc1

Please sign in to comment.