Ecosyste.ms: Awesome

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

Awesome Lists | Featured Topics | Projects

https://github.com/emaringolo/seaside-opengraph

OpenGraph metadata generator for Seaside
https://github.com/emaringolo/seaside-opengraph

Last synced: 16 days ago
JSON representation

OpenGraph metadata generator for Seaside

Awesome Lists containing this project

README

        

# Seaside-OpenGraph
![OpenGraph logo](https://ogp.me/logo.png)

[OpenGraph](https://ogp.me) metadata generator for [Seaside](https://github.com/SeasideSt/Seaside).

## Brief description

Provides a descriptor object where you can define properties that will be rendered into the `` of a Seaside component.

```smalltalk
| descriptor |
descriptor := WAOpenGraphDescriptor new
title: 'Sample OpenGraph Seaside page';
description: 'This is a sample OpenGraph description generated in Seaside.';
url: self requestContext request url;
type: 'article';
yourself.
descriptor addElement: (WAOpenGraphImage new
url: imageUrl;
alt: 'Seaside Logo';
width: 500;
height: 500).
^ descriptor
```

## Installation
Execute this (requires Seaside already installed).
```smalltalk
Metacello new
baseline: 'SeasideOpenGraph';
repository: 'github://eMaringolo/seaside-opengraph/src';
load.
```

## Example

When loading the package `Seaside-OpenGraph-Examples` it will provide a `WAOpenGraphPageOneComponent` registered at `/opengraph` that you can access using your browser and inspecting the `` to see the meta data.

If you access your local Seaside server using something like [`ngrok`](https://ngrok.io) or you have a publicly accessible server, you can test it using [Facebook's sharing debugger](https://developers.facebook.com/tools/debug/).

It should produce an output like this:
![Debugger screenshot](screenshot1.png)