Code Monkey home page Code Monkey logo

Comments (4)

anjali89r avatar anjali89r commented on July 30, 2024 1

Sure, here is the nuxt config. I'm generating the site map during the build time.

export default defineNuxtConfig({

    runtimeConfig: {

        public: {
            apiBase: process.env.NUXT_PUBLIC_API_BASE,

        }
    },
    // ,
    // , 
    modules: ['nuxt-simple-sitemap', '@nuxtjs/tailwindcss', '@nuxtjs/robots'],
    sitemap: {
        siteUrl: 'https://example.com',
        urls: async () => {
            return await getUrls()
        },
    },
    meta: {
        htmlAttrs: {
            lang: 'en',
        },
        charset: 'utf8',
        link: [
            { rel: 'icon', type: 'image/ico', href: '/favicon.ico' },
        ],
        meta: [

            {
                name: 'google-site-verification',
                content:
                    'XXXXXXX',
                hid: 'google-site-verification'
            }],
        script: [
            {
                src: 'https://www.googletagmanager.com/gtag/js?id=UA-XXXXX-1',
                body: false,
                async: true
            }
        ]
    },
    nitro: {
        preset: 'aws-lambda'
    },
    server: {
        host: '0'
    },
    css: ["~/assets/css/tailwind.css"],
    build: {

        transpile: ['@heroicons/vue'],

        postcss: {
            postcssOptions: {
                plugins: {
                    tailwindcss: {},
                    autoprefixer: {},
                },
            },
        },
    }
})

I also tested passing the CDN URL(NUXT_APP_CDN_URL) for all my js,css files and sitemap.xml to save in the s3 and that also didn't work. I got the 500 error with the sitemap not available error.

from sitemap.

harlan-zw avatar harlan-zw commented on July 30, 2024

Thanks for the issue @anjali89r! I will try to look into this when possible.

One issue is that I don't use Lambda for any of my personal sites so it may be a vendor specific issue that will require me to set up infastucture I haven't used before.

Would it be possible to provide more of your nuxt config in the mean time? Would be good to know if you're generating thre sitemap at build time or runtime.

from sitemap.

anjali89r avatar anjali89r commented on July 30, 2024

Also I followed this blog to setup the app in was lambda - https://towardsserverless.com/articles/nuxt3-ssr-on-aws-lambda

from sitemap.

harlan-zw avatar harlan-zw commented on July 30, 2024

Hi, is this still an issue? The latest is working on Netlify which uses AWS under the hood so should be okay 🤔

from sitemap.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.