JSPM

  • Created
  • Published
  • Downloads 5144
  • Score
    100M100P100Q132251F
  • License MIT

Package Exports

  • nuxt-seo-experiments

Readme

nuxt-seo-experiments

NPM version NPM Downloads GitHub stars

Experimental SEO for Nuxt.


Status: Experimental
Please report any issues 🐛
Made possible by my Sponsor Program 💖
Follow me @harlan_zw đŸĻ â€ĸ Join Discord for help

â„šī¸ Looking for a complete SEO solution? Check out Nuxt SEO Kit.

âš ī¸ This package was previously called nuxt-unhead. It has been renamed to nuxt-seo-experiments to better reflect the scope of the package.

Features

  • ✨ Automatic social share meta tags
  • 🧙 Automatic SEO tags based on public files
  • đŸŒŗ TypeScript autocompletion for tag href and src attributes
  • Fix tags that need to be absolute (og:image, twitter:image)
  • đŸ“Ļ Infer data from package.json
  • Public runtime data exposed to Template Params NUXT_PUBLIC_SITE_TITLE=test -> title: %siteTitle

Background

This module was built to test bug fixes as well as experimental new features which may land into the Nuxt core.

Install

npm install --save-dev nuxt-seo-experiments

# Using yarn
yarn add --dev nuxt-seo-experiments

Setup

nuxt.config.ts

export default defineNuxtConfig({
  modules: [
    'nuxt-seo-experiments',
  ],
})

Module Configuration

Config key: seoExperiments

nuxt.config.ts

export default defineNuxtConfig({
  modules: ['nuxt-seo-experiments'],

  seoExperiments: {
    // config (see below)
  },
  //...
})

Usage

Config

inferTagsFromFiles

  • Type: boolean

  • Default: true

    Automatically infer meta tags from public files.

    For example, if you have a favicon.ico in your public directory, it will automatically infer the favicon meta tag.

seoOptimise

  • Type: boolean

  • Default: true

    Automatically optimise meta tags for SEO.

    It will automatically infer the og:title, og:description when a title and description are set respectively. It will ensure a twitter:card is set to summary_large_image if not set.

    This will do more in the future.

Sponsors

License

MIT License Š 2022-PRESENT Harlan Wilton