Package Exports
- nuxt-seo-experiments
Readme
nuxt-seo-experiments
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
hrefandsrcattributes - 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-experimentsSetup
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:
booleanDefault:
trueAutomatically infer meta tags from public files.
For example, if you have a
favicon.icoin yourpublicdirectory, it will automatically infer thefaviconmeta tag.
seoOptimise
Type:
booleanDefault:
trueAutomatically optimise meta tags for SEO.
It will automatically infer the
og:title,og:descriptionwhen a title and description are set respectively. It will ensure atwitter:cardis set tosummary_large_imageif not set.This will do more in the future.
Sponsors
License
MIT License Š 2022-PRESENT Harlan Wilton