Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Astro robots not generating a robots file or a meta tag #54

Open
gkatsanos opened this issue Jun 15, 2023 · 0 comments
Open

Astro robots not generating a robots file or a meta tag #54

gkatsanos opened this issue Jun 15, 2023 · 0 comments

Comments

@gkatsanos
Copy link

gkatsanos commented Jun 15, 2023

Here's my astro config:

import { defineConfig } from "astro/config"
import node from "@astrojs/node"
import vue from "@astrojs/vue"
import svgLoader from "@gkatsanos/vite-svg-loader"
import tailwind from "@astrojs/tailwind"
import robotsTxt from "astro-robots-txt"

// https://astro.build/config
export default defineConfig({
  server: {
    port: 3000,
    host: "0.0.0.0",
  },
  output: "server",
  adapter: node({
    mode: "standalone",
  }),
  build: {
    assets: "requests-frontend/_astro",
  },
  vite: {
    server: {
      proxy: {
        "^/octopus/api/.*": {
          target: "https://www.wlw-staging.de",
          changeOrigin: true,
        },
      },
    },
    plugins: [
      svgLoader({
        defaultImport: "url", // or 'raw'
      }),
    ],

    ssr: {
      noExternal: ["path-to-regexp"],
    },
    optimizeDeps: {
      // Why? dd-trace attempts to patch graphql, but it's not a dependency of this project.
      exclude: ["graphql"],
    },
  },
  integrations: [
    vue(),
    tailwind(),
    robotsTxt({
      policy: [
        {
          userAgent: "*",
          // The next line enables or disables the crawling on the `robots.txt` level
          disallow: "/",
        },
      ],
    }),
  ],
})

Looking at the HTML and the network tab, dont see a robots file or a meta tag.. whats up?
btw my Astro app is served from a sub-directory ( www.example.com/myastroapp/ ) with an nginx webserver on top of it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant