OpenGraph
v0.4.0Designed og:image templates, assigned per scope and rendered to PNG
Install OpenGraphDesign OpenGraph preview images in a canvas editor, assign templates to scopes such as a post, a group or a module-wide default, and render them to PNG on demand. Templates and assignments are stored in two tables; rendering uses the resvg NIF and is cached on disk. Other modules plug in through og_variables/0 and og_resolve/2, with phoenix_kit_publishing as the reference consumer.
Use it when
- You want every page's social preview image generated from its title and image
- Different sections of your site need different preview-image designs
What it gives you
- SVG canvas editor with text, image, rect and stamp elements
- {{slot}} variables and [[global]] variables (site URL, name, locale)
- Hierarchical assignments, first match wins
- PNG rendering via resvg with CLI fallbacks, disk cache by content hash
- Kill switch and pass-through on error
Example
og = PhoenixKitOG.refine_og(og, conn, post, language)
OpenGraph news
Nothing posted about OpenGraph yet. Read its changelog or see all PhoenixKit news.
Install
1
Add to mix.exs
{:phoenix_kit_og, "~> 0.4"}
2 Fetch it and run its migrations
$ mix deps.get && mix phoenix_kit.update
3
Switch it on in /admin/modules
- Package
- phoenix_kit_og
- Releases
-
- 0.4.0
- 0.3.9
- 0.3.8
- Admin
-
/admin/open-graph - Links
- HexDocs ↗ Changelog ↗
Related modules
What it needs, what builds on it, and its neighbours in Content & community.
Boards
Collaborative infinite-canvas boards with live cursors, stored in the database
No other modules needed
Comments
Threaded comments for any resource, with reactions and moderation
No other modules needed
Document Creator
Document templates in Google Docs, filled with variables and exported to PDF
No other modules needed
Entities
Define custom content types with field schemas, no migrations per type
No other modules needed
Posts
Social, feed-style user posts with likes, tags, boards and mentions
Needs Comments
Publishing
Database-backed CMS for blogs and docs, multi-language and versioned
Needs AI