2.0.7 • Published 2 years ago
@abdaldeen/custom-nuxt3-sitemap v2.0.7
Custom Nuxt3 Sitemap
Custom Nuxt3 Sitemap for doing amazing things.
Features
- ⛰ Made by Abdel rahman
- 🚠 Vary fast
- 🌲 Strong
Quick Setup
- Add @abdaldeen/custom-nuxt3-sitemapdependency to your project
# Using pnpm
pnpm add -D @abdaldeen/custom-nuxt3-sitemap
# Using yarn
yarn add --dev @abdaldeen/custom-nuxt3-sitemap
# Using npm
npm install --save-dev @abdaldeen/custom-nuxt3-sitemap- Add @abdaldeen/custom-nuxt3-sitemapto themodulessection ofnuxt.config.ts
export default defineNuxtConfig({
  modules: [
    '@abdaldeen/custom-nuxt3-sitemap'
  ],
  nuxt3Sitemap: {
    siteUrl: " Your site domain EX: eijaby.com ",
    apiBaseURL: process.env.BASE_URL,
    sitemapFiles : [ // this is the default value
      {
        name: "sitemap-article-{n}.xml",
        count: 8,
      },
      {
        name: "sitemap-author-{n}.xml",
        count: 8,
      },
      {
        name: "sitemap-others.xml",
      },
    ],
    prefixes: {
      categoryPage: 'd',
      articlePage: 'e',
      staticPage: 'f',
      writerPage: 's',
    },
    TemplateID1: process.env.TEMPLATE_ID1 || '',
    extendRoutes: [],
    contactUsPageName: 'اتصل-بنا', // this is the default value
    // this is used to generate default robots.txt
    isProduction: process.env.STAGE  == "production"
    // or use this to override the default robots.txt
    robots: {
      UserAgent: '*',
      Allow: '/',
      Disallow: ['/api', '/search'],
    }
  }
})That's it! You can now use Custom Nuxt3 Sitemap in your Nuxt app ✨
Development
# Install dependencies
npm install
# Generate type stubs
npm run dev:prepare
# Develop with the playground
npm run dev
# Build the playground
npm run dev:build
# Run ESLint
npm run lint
# Run Vitest
npm run test
npm run test:watch
# Release new version
npm run release