https://github.com/alexstevovich/lydio-meta
[Node.js] Structured composition for the HTML < head > π¨ Proprietary software β see LICENSE for details.
https://github.com/alexstevovich/lydio-meta
html-meta lydio proprietary-license web-build web-frontend web-standards
Last synced: 2 months ago
JSON representation
[Node.js] Structured composition for the HTML < head > π¨ Proprietary software β see LICENSE for details.
- Host: GitHub
- URL: https://github.com/alexstevovich/lydio-meta
- Owner: alexstevovich
- License: other
- Created: 2025-03-11T04:15:37.000Z (3 months ago)
- Default Branch: main
- Last Pushed: 2025-03-11T04:19:55.000Z (3 months ago)
- Last Synced: 2025-03-11T05:23:37.473Z (3 months ago)
- Topics: html-meta, lydio, proprietary-license, web-build, web-frontend, web-standards
- Language: JavaScript
- Homepage:
- Size: 38.1 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# @lydio/meta
**DISCLAIMER:**
#### π¨This project is **NOT** open source. It is exposed to satisfy requirements related to my business.
_Thank you for your understanding._
Copyright Β© 2015-2025 Alex Stevovich. All Rights Reserved.
No permission is granted to use, copy, modify, distribute, sublicense, or create derivative works of this software, in whole or in part, without explicit prior written permission from the copyright holder.See `LICENSE` and `TRADEMARK.md` for more.
---
**Structured composition for the HTML < head >**
**`@lydio/meta`** provides a **structured, automated way** to manage the **entire** `` section of an HTML document.
It ensures **SEO best practices**, **social media preview optimization**, and **modern web standards compliance**.**Automatically generates:**
β **Essential meta tags** (SEO, Open Graph, Twitter Cards)
β **Canonical URLs & structured metadata**
β **Title, description, viewport, theme color, and more**
β **Warnings for missing critical metadata**Built on **Lydioβs HTML components**, `@lydio/meta` simplifies metadata management with its **MetaFragment** class, which dynamically constructs a **fully optimized** `` section.
**Github:**
[https://github.com/alexstevovich/lydio-meta](https://github.com/alexstevovich/lydio-meta)**Lydio (Core):**
[https://github.com/alexstevovich/lydio](https://github.com/alexstevovich/lydio)## Installation
```bash
npm install lydio
npm install @lydio/meta
```**Note** lydio is required but not listed as a dependency to simplify installation on private package managers. Please ensure both are installed!
## Usage
```js
import { MetaFragment } from '@lydio/meta';// This is only a sample of possibilities
const meta = new MetaFragment({
title: 'Example Page',
description: 'This is a structured meta tag generator',
canonical: 'https://example.com',
ogType: 'website',
ogTitle: 'Example Open Graph Title',
ogDescription: 'Description for Open Graph metadata',
ogImage: 'https://example.com/image.jpg',
twitterTitle: 'Twitter Card Title',
twitterDescription: 'Description for Twitter preview',
twitterImage: 'https://example.com/twitter-image.jpg',
});console.log(meta.toHtml());
```**Generated Output Example**
```html
Example Page
```
## **Features**
- **Automated Metadata Generation** β SEO, Open Graph (Facebook, LinkedIn, etc.), Twitter Cards.
- **Canonical URL Support** β Prevents duplicate content issues for search engines.
- **Theme & Branding** β Supports `theme-color`, `og:site_name`, and more.
- **Social Media Optimization** β Automatically generates **Open Graph** (`og:*`) and **Twitter** (`twitter:*`) meta tags.
- **Locale Awareness** β Handles `og:locale`, `og:determiner`, and `twitter:site`.
- **Viewport & Charset Defaults** β Ensures **best-practice settings** for mobile and modern browsers.
- **Warnings for Missing Best-Practice Tags** β Ensures **completeness** and **proper metadata structure**.## License
Copyright Β© 2015-2025 Alex Stevovich. All Rights Reserved.
No permission is granted to use, copy, modify, distribute, sublicense, or create derivative works of this software, in whole or in part, without explicit prior written permission from the copyright holder.This project is **NOT** open source. It is exposed to satisfy requirements related to my business.
_Thank you for your understanding._See `LICENSE` and `TRADEMARK.md` for more.