Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/agneym/og-image-element

Custom Element used for creating Open Graph Image
https://github.com/agneym/og-image-element

component open-wc web

Last synced: about 2 months ago
JSON representation

Custom Element used for creating Open Graph Image

Awesome Lists containing this project

README

        

# \

To be used with [Open Graph Generator Image Action](https://github.com/BoyWithSilverWings/generate-og-image)

![Screenshot](/demo/shot.png?raw=true "Element Output Generated")

This webcomponent follows the [open-wc](https://github.com/open-wc/open-wc) recommendation.

## Installation
```bash
npm i og-image-element
```

## Usage
```html

import 'og-image-element/og-image-element.js';

Title of the Post

```

You can customise styling with CSS variables:

```css
og-image-element {
--heading-font: 'Aleo', serif;
--background: #ffffff;
--font-color: #000000;
--font-size: 100%;
}
```

## Testing using karma (if applied by author)
```bash
npm run test
```

## Demoing using storybook (if applied by author)
```bash
npm run storybook
```

## Linting
```bash
npm run lint
```