Skip to content

Meta Tag Generator is a lightweight JavaScript library designed to automatically generate meta tags and Open Graph tags for any HTML page. This tool simplifies the process of adding essential metadata to your web pages, enhancing SEO and social media sharing capabilities.

License

Notifications You must be signed in to change notification settings

anupammo/generateMetaTags

Repository files navigation

generateMetaTags [Generate Meta Tags]

Overview

Meta Tag Generator is a lightweight JavaScript library designed to automatically generate meta tags and Open Graph tags for any HTML page. This tool simplifies the process of adding essential metadata to your web pages, enhancing SEO and social media sharing capabilities.

Features

  • Title Tag Check: Checks if a title tag is present or not.

  • Title Tag Generation: If a title tag is not present then generate dynamically.

  • Canonical URL Check: Verifies if the canonical URL is present or not.

  • Canonical URL Generation: If the canonical URL is not present then generate dynamically.

  • Meta Description Check: Confirms the presence of meta description.

  • Meta Description Generation: Confirms the presence of meta description else generate dynamically.

  • Open Graph Tag Generation: Ensures Open Graph (og:) tags are present.

Usage

CDN jsDelivr

Important

https://cdn.jsdelivr.net/gh/anupammo/generateMetaTags@main/metaTagGenerator.js

<!-- Include the CDN -->
<script src="https://cdn.jsdelivr.net/gh/anupammo/generateMetaTags@main/metaTagGenerator.js"></script>

Manual

  1. Include the metaTagGenerator.js file in your HTML document.

    <!-- Include the external JavaScript file -->
    <!-- <script src="metaTagGenerator.js"></script> -->
    
  2. Call the checkAndCreateMetaTags() function to perform the checks.

  3. Review the results in the browser console.

Example Output

Contributing

Feel free to fork this repository, submit issues, and make pull requests to improve this utility.

License

This project is licensed under the MIT License. See the LICENSE file for more details.

About

Meta Tag Generator is a lightweight JavaScript library designed to automatically generate meta tags and Open Graph tags for any HTML page. This tool simplifies the process of adding essential metadata to your web pages, enhancing SEO and social media sharing capabilities.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published