Skip to content

Sitemap

A sitemap is a list of pages of a web site within a domain.

There are three primary kinds of sitemap:

  • Sitemaps used during the planning of a website by its designers
  • Human-visible listings, typically hierarchical, of the pages on a site
  • Structured listings intended for web crawlers such as search engines

Examples

Code
vue
<script setup lang="ts">
import { BaseSitemap } from '@point-hub/papp'

const sitemap = {
  title: 'My Sitemap',
  subtitle: 'Version 1.0',
  homepage: {
    link: 'https://dev.pointhub.net/library/papp',
    name: 'Home',
    desc: ''
  },
  menu: [
    {
      name: 'Getting Started',
      child: [
        {
          link: '/library/papp/docs/introduction',
          name: 'Introduction'
        },
        {
          link: '/library/papp/docs/quick-start',
          name: 'Quick Start'
        }
      ]
    },
    {
      name: 'Components',
      child: [
        {
          link: '/library/papp/docs/components/accordion',
          name: 'Accordion',
          child: [
            {
              link: '/library/papp/docs/components/accordion#always-open',
              name: 'Always Open'
            },
            {
              link: '/library/papp/docs/components/accordion#using-slot',
              name: 'Using Slot'
            }
          ]
        },
        {
          link: '/library/papp/docs/components/alert',
          name: 'Alert'
        },
        {
          link: '/library/papp/docs/components/avatar',
          name: 'Avatar'
        },
        {
          link: '/library/papp/docs/components/button',
          name: 'Button'
        }
      ]
    },
    {
      name: 'Form',
      child: [
        {
          link: '/library/papp/docs/form/autocomplete',
          name: 'Autocomplete'
        }
      ]
    }
  ]
}
</script>

<template>
  <component :is="BaseSitemap" :sitemap="sitemap" />
</template>

Sitemap API

Interface

ts
export interface ISitemap {
  title: string
  subtitle: string
  homepage: {
    link?: string
    name: string
    desc?: string
  }
  menu: {
    link?: string
    name: string
    desc?: string
    child?: {
      link?: string
      name: string
      desc?: string
      child?: {
        link?: string
        name?: string
        desc?: string
      }[]
    }[]
  }[]
}

Props

NameTypeDefaultDescription
sitemapobject: ISitemapSitemap menu

Released under the MIT License.