botprzemek
botprzemek
NNuxt
Created by botprzemek on 3/28/2025 in #❓・help
Enabling indexing with X-Robots-Tag
@kapa.ai close the discussion
40 replies
NNuxt
Created by botprzemek on 3/28/2025 in #❓・help
Enabling indexing with X-Robots-Tag
Thanks for helping, left the issue on gh :nuxt:
40 replies
NNuxt
Created by botprzemek on 3/28/2025 in #❓・help
Enabling indexing with X-Robots-Tag
I have managed to reproduce the error, It seems that after setting buildAssetsDir to something other than default value SEO engine creates wrong paths. Should I create issue on GitHub?
defineNuxtConfig({
app: {
buildAssetsDir: string,
}
})
defineNuxtConfig({
app: {
buildAssetsDir: string,
}
})
@harlan
40 replies
NNuxt
Created by botprzemek on 3/28/2025 in #❓・help
Enabling indexing with X-Robots-Tag
40 replies
NNuxt
Created by botprzemek on 3/28/2025 in #❓・help
Enabling indexing with X-Robots-Tag
It should be fine as default values are correct, absolute url pointing to the domain
40 replies
NNuxt
Created by botprzemek on 3/28/2025 in #❓・help
Enabling indexing with X-Robots-Tag
For better understanding, I need to provide environment variables within building stage
40 replies
NNuxt
Created by botprzemek on 3/28/2025 in #❓・help
Enabling indexing with X-Robots-Tag
No description
40 replies
NNuxt
Created by botprzemek on 3/28/2025 in #❓・help
Enabling indexing with X-Robots-Tag
Just wondering, do env variables load in production ex. in docker-compose environment?
40 replies
NNuxt
Created by botprzemek on 3/28/2025 in #❓・help
Enabling indexing with X-Robots-Tag
export default defineNuxtConfig({
compatibilityDate: "2024-11-01",
devtools: {
enabled: true,
timeline: {
enabled: true
}
},
modules: [
"@nuxtjs/seo",
"@nuxtjs/i18n",
"@nuxtjs/tailwindcss",
"@nuxt/eslint",
"@nuxt/test-utils",
"@nuxt/image"
],
runtimeConfig: {
public: {
name: "notbyte",
url: "https://nuxt.notbyte.com/",
prefix: "/"
}
},
app: {
baseURL: process.env.NUXT_PUBLIC_PREFIX || "/",
buildAssetsDir: "/",
rootAttrs: {
id: "notbyte-root"
},
rootTag: "body",
teleportAttrs: {
id: "notbyte-teleports"
},
teleportTag: "aside"
},
ogImage: {
defaults: {
cacheMaxAgeSeconds: 60 * 60 * 24 * 7,
fonts: ["Chakra Petch:400", "Chakra Petch:700"],
component: "Default"
},
fonts: [
{
name: "Chakra Petch",
weight: 400,
path: "/fonts/chakra-petch-v11-latin_latin-ext-regular.woff"
},
{
name: "Chakra Petch",
weight: 700,
path: "/fonts/chakra-petch-v11-latin_latin-ext-700.woff"
}
]
},
i18n: {
baseUrl: process.env.NUXT_PUBLIC_URL,
bundle: {
optimizeTranslationDirective: false
},
customRoutes: "page",
defaultLocale: "en",
detectBrowserLanguage: {
useCookie: true,
cookieKey: "notbyte-lang",
redirectOn: "root"
},
locales: [
{
code: "en",
name: "English",
language: "en-US",
file: "en-US.ts"
},
{
code: "pl",
name: "Polski",
language: "pl-PL",
file: "pl-PL.ts"
}
],
strategy: "prefix_and_default"
}
});
export default defineNuxtConfig({
compatibilityDate: "2024-11-01",
devtools: {
enabled: true,
timeline: {
enabled: true
}
},
modules: [
"@nuxtjs/seo",
"@nuxtjs/i18n",
"@nuxtjs/tailwindcss",
"@nuxt/eslint",
"@nuxt/test-utils",
"@nuxt/image"
],
runtimeConfig: {
public: {
name: "notbyte",
url: "https://nuxt.notbyte.com/",
prefix: "/"
}
},
app: {
baseURL: process.env.NUXT_PUBLIC_PREFIX || "/",
buildAssetsDir: "/",
rootAttrs: {
id: "notbyte-root"
},
rootTag: "body",
teleportAttrs: {
id: "notbyte-teleports"
},
teleportTag: "aside"
},
ogImage: {
defaults: {
cacheMaxAgeSeconds: 60 * 60 * 24 * 7,
fonts: ["Chakra Petch:400", "Chakra Petch:700"],
component: "Default"
},
fonts: [
{
name: "Chakra Petch",
weight: 400,
path: "/fonts/chakra-petch-v11-latin_latin-ext-regular.woff"
},
{
name: "Chakra Petch",
weight: 700,
path: "/fonts/chakra-petch-v11-latin_latin-ext-700.woff"
}
]
},
i18n: {
baseUrl: process.env.NUXT_PUBLIC_URL,
bundle: {
optimizeTranslationDirective: false
},
customRoutes: "page",
defaultLocale: "en",
detectBrowserLanguage: {
useCookie: true,
cookieKey: "notbyte-lang",
redirectOn: "root"
},
locales: [
{
code: "en",
name: "English",
language: "en-US",
file: "en-US.ts"
},
{
code: "pl",
name: "Polski",
language: "pl-PL",
file: "pl-PL.ts"
}
],
strategy: "prefix_and_default"
}
});
# Build a production distribution

FROM cgr.dev/chainguard/node:latest AS builder

WORKDIR /app

COPY --chown=node:node package*.json .

RUN npm install --clean

COPY --chown=node:node . .

RUN npm run build

# Run output in a clean environment

FROM alpine AS runner

WORKDIR /app

LABEL authors="botprzemek"

RUN apk add --update nodejs

COPY --from=builder --chown=node:node /app/.output ./.output

ENV NODE_ENV="production"

CMD ["node", ".output/server/index.mjs"]

EXPOSE 3000
# Build a production distribution

FROM cgr.dev/chainguard/node:latest AS builder

WORKDIR /app

COPY --chown=node:node package*.json .

RUN npm install --clean

COPY --chown=node:node . .

RUN npm run build

# Run output in a clean environment

FROM alpine AS runner

WORKDIR /app

LABEL authors="botprzemek"

RUN apk add --update nodejs

COPY --from=builder --chown=node:node /app/.output ./.output

ENV NODE_ENV="production"

CMD ["node", ".output/server/index.mjs"]

EXPOSE 3000
40 replies
NNuxt
Created by botprzemek on 3/28/2025 in #❓・help
Enabling indexing with X-Robots-Tag
Yeah, deployed it right now https://nuxt.notbyte.com/
40 replies
NNuxt
Created by botprzemek on 3/28/2025 in #❓・help
Enabling indexing with X-Robots-Tag
useReponseHeader correctly says noindex, nofollow
40 replies
NNuxt
Created by botprzemek on 3/28/2025 in #❓・help
Enabling indexing with X-Robots-Tag
No description
40 replies
NNuxt
Created by botprzemek on 3/28/2025 in #❓・help
Enabling indexing with X-Robots-Tag
@kapa.ai My useSeoMeta are set like this const robots = (): string => "index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1";
40 replies