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.
-
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.
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>
-
Include the
metaTagGenerator.js
file in your HTML document.<!-- Include the external JavaScript file --> <!-- <script src="metaTagGenerator.js"></script> -->
-
Call the
checkAndCreateMetaTags()
function to perform the checks. -
Review the results in the browser console.
Feel free to fork this repository, submit issues, and make pull requests to improve this utility.
This project is licensed under the MIT License. See the LICENSE file for more details.