1.13.0 • Published 6 months ago

@zfben/astro-head v1.13.0

Weekly downloads
-
License
MIT
Repository
github
Last release
6 months ago

Effortless SEO for Astro with @zfben/astro-head

License: MIT NPM Version

Managing SEO for your Astro website just got easier with @zfben/astro-head. This package simplifies the process of adding essential meta tags and open graph/twitter meta data to your Astro components, boosting your website's search engine visibility.

Key Features

  • Simplified Integration: Seamlessly integrate SEO elements directly within your Astro components. No complex configurations needed!
  • Automated Meta Generation: Automatically generate open graph and twitter meta tags, saving you time and ensuring consistent data across your site.
  • Leverages Astro Configuration: Utilizes your existing site settings in astro.config.js to automatically generate accurate URLs within meta tags.
  • SEO Best Practices: Follows SEO best practices to ensure your website is optimized for search engines.

Getting Started

  1. Installation: Install the package using npm: npm install @zfben/astro-head
  2. Configuration: Ensure you have a site property defined within your astro.config.js file. This provides the base URL for your website.
  3. Import and Usage: Import the Head component from the package and use it within your Astro components:
---
import { Head } from "@zfben/astro-head";
---

<html>
  <head>
    <Head
      title="Hello world"
      path="/"
    />
  </head>
</html>

Supported Props

PropOutputFormat
disableSEODisable SEO advices in log outputboolean, default is false
titletitle, og:title, twitter:titlestring, required
pathcanonical, url, og:url, twitter:urlstring, required, must be started with /
typeog:typestring, default is website
charsetcharsetstring, default is utf-8
langog:localestring
descriptiondescription, og:description, twitter:descriptionstring
imageimage, og:image, twitter:imagestring
siteNameog:site_namestring
authorauthor, article:authorstring
twittertwitter:site, twitter:creatorstring, must be started with @
twitterCardtwitter:cardstring, one of summarysummary_large_imageappplayer, default is summary
alternatesalternate, og:locale:alternatelang, path and default list
gaGoogle Analytics' tracking codestring, must be started with G-
clarityClarity's tracking codestring
adsenseAdSense's tracking codestring
ahrefsAhrefs Web Analyticsstring
scpContent Security Policystring, default is default-src 'self'; img-src https://*; child-src 'none';

Links

1.13.0

6 months ago

1.12.0

7 months ago

1.11.0

8 months ago

1.10.2

9 months ago

1.9.1

9 months ago

1.9.0

9 months ago

1.10.1

9 months ago

1.10.0

9 months ago

1.8.1

10 months ago

1.8.0

10 months ago

1.7.1

11 months ago

1.7.0

11 months ago

1.6.0

1 year ago

1.5.0

1 year ago

1.4.0

1 year ago

1.3.1

1 year ago

1.3.0

1 year ago

1.2.1

1 year ago

1.2.0

1 year ago

1.1.0

1 year ago

1.0.0

1 year ago