Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
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
- Host: GitHub
- URL: https://github.com/emaringolo/seaside-opengraph
- Owner: eMaringolo
- License: mit
- Created: 2021-07-14T02:53:56.000Z (over 3 years ago)
- Default Branch: master
- Last Pushed: 2021-08-11T21:07:32.000Z (over 3 years ago)
- Last Synced: 2024-10-09T13:25:10.660Z (about 1 month ago)
- Language: Smalltalk
- Size: 101 KB
- Stars: 2
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
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)