Skip to content

eMaringolo/seaside-opengraph

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Seaside-OpenGraph

OpenGraph logo

OpenGraph metadata generator for Seaside.

Brief description

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

Installation

Execute this (requires Seaside already installed).

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 <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.

It should produce an output like this: Debugger screenshot

About

OpenGraph metadata generator for Seaside

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published