OpenGraph metadata generator for Seaside.
Provides a descriptor object where you can define properties that will be rendered into the <head>
of a Seaside component.
| 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
Execute this (requires Seaside already installed).
Metacello new
baseline: 'SeasideOpenGraph';
repository: 'github://eMaringolo/seaside-opengraph/src';
load.
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 <head>
to see the meta data.
If you access your local Seaside server using something like ngrok
or you have a publicly accessible server, you can test it using Facebook's sharing debugger.