Weave Code
Weaver
Helps Laravel developers discover, compare, and choose open-source packages. See popularity, security, maintainers, and scores at a glance to make better decisions.
Feedback
Share your thoughts, report bugs, or suggest improvements.
Subject
Message

Statamic Autograph Laravel Package

j-jalving/statamic-autograph

A Statamic addon that automatically generates social share and Open Graph images for your entries, so links to your site look sharp on social platforms without manual design work. Templates are customizable to match your branding.

View on GitHub
Deep Wiki
Context7

Getting Started

Before anything else: resolve the scope ambiguity. The two sources you have disagree. The repository description calls this an e-mail signature HTML generator; description.md describes it as an Open Graph / Twitter Card metadata addon. Those are unrelated features with unrelated integration surfaces. The only other artifact — the 1.5.1 changelog line about a dark-mode addon icon — is consistent with "this is a Statamic addon with an admin UI," but tells you nothing about either claim. Read vendor/j-jalving/statamic-autograph/README.md and src/ before you install anything into a real project. Everything below is written to cover both plausible shapes and flags where they diverge.

Install and discover.

composer require j-jalving/statamic-autograph:^1.5
php artisan vendor:publish --provider="Jjalving\Autograph\ServiceProvider"   # confirm the FQCN from src/
php artisan config:clear && php artisan view:clear

Statamic addons are Laravel packages with auto-discovered service providers; the provider will typically register a tag, a fieldtype, a config merge, and possibly a publishable view namespace. Confirm all four by reading the provider's boot()/register() rather than assuming.

Where to look first, in order:

  1. src/ServiceProvider.php — what Tag, Fieldtype, Modifier, or middleware it registers. This single file tells you what the package actually does.
  2. config/autograph.php (once published) — the override/fallback surface.
  3. resources/views/ — whether output is a Blade/Antlers partial you can override.
  4. resources/dist/ or public/ — whether assets are precompiled or expect your build pipeline.

First use case, by shape:

  • If it's the signature generator: you have a single page or CP utility that renders a table-based HTML signature from structured fields, which an editor copies into Outlook/Gmail. First task: build one signature end-to-end and paste it into Outlook desktop and Gmail web, because that is where 90% of the bugs will surface.
  • If it's the social metadata addon: you drop a partial into your <head> and let it derive og:* and twitter:* tags from the current entry. First task: render one entry through the Facebook Sharing Debugger and the X Card Validator, not just "view source."

Implementation Patterns

Pattern A — signature rendering (per the repository description)

Treat the package as a renderer, not a form designer. The durable workflow is: editors fill a structured fieldset (name, role, phone, socials, logo), and the addon renders escaped, inline-styled, table-based HTML.

{{ autograph:signature
    name="{ author:name }"
    role="{ author:role }"
    email="{ author:email }"
    phone="{ author:phone }"
}}

Practical integration notes for this shape:

  • Store the signature as structured YAML in a fieldset, not as raw HTML in a Markdown field. You want the renderer to own escaping and the editor to never touch <table> markup.
  • Add a CP route or a dedicated Statamic "utility" page for the copy-to-clipboard step. A signature generator's whole value is the clipboard affordance; a raw HTML dump in a template is worse than hand-writing it.
  • Host all images (logo, headshot) at absolute URLs on your own CDN. Gmail and Outlook strip or block relative paths and cid: references.
  • Wrap the output in <partial:autograph-signature> so you can override the markup without forking the package — but only if the package publishes views. If it doesn't, you are forking.

Pattern B — social metadata (per description.md)

This is the conventional Statamic pattern and the one more likely to match "template-friendly integration with existing Antlers views."

{{# resources/views/layout.antlers.html #}}
<head>
  <title>{{ title }} — {{ site:name }}</title>
  {{ partial:autograph/meta }}
</head>

Expected workflow, to be validated:

  • The addon reads the current entry's fields (title, excerpt/summary, featured image) and emits tags with a fallback chain: entry field → collection config override → global config default.
  • Configure per-collection overrides in the published config rather than conditionals in the template. If the package supports per-collection keys, that is the correct place for "blog posts use the wide hero, products use the square thumbnail."
  • Put the partial in your base layout once. Do not call it per-template; drift between templates is how you end up with half your site missing og:image.
  • Verify against the entry's resolved URL, not the current request, if you use multi-site. Multi-site URL generation is the classic failure point for og:url.

Cross-cutting patterns

  • Pin ^1.5. There is one release artifact and zero dependents. Treat minor bumps as reviewable changes, not automatic updates.
  • Own the output. Whichever shape applies, the package is a producer of static HTML. Once the tags or signature are in the markup, nothing at runtime depends on the package. That makes it safe to wrap and, if abandoned, safe to replace.
  • Keep configuration in config/autograph.php, not in templates. Any conditional you write in Antlers is a conditional you cannot test, and the package's own config already exists for this.

Gotchas and Tips

The scope contradiction is the #1 risk. Do not schedule work, write a spec, or promise a stakeholder anything until you have opened src/ServiceProvider.php. An "email signature generator" and an "OG metadata addon" have zero overlap in integration effort, testing strategy, and browser-client exposure. If the README is also ambiguous, the source is the tiebreaker.

Email-client rendering (Pattern A).

  • Use tables and inline style= attributes. External stylesheets and <style> blocks are unreliable in Outlook 2016–2019 and stripped in Gmail's clip.
  • Outlook desktop (Word rendering engine) needs MSO conditional comments for spacing and mso-line-height-rule. Any modern layout (flex, grid) will collapse.
  • Set explicit width/height attributes on images and keep display:block — Outlook adds phantom gaps otherwise.
  • Gmail strips <style> in some contexts and ignores class-based dark mode. If the package emits prefers-color-scheme CSS, test in Outlook dark mode and Gmail app dark mode; both invert colors in ways authors do not expect.
  • Never emit a signature taller than ~600px of content. Some clients clip.

Social metadata (Pattern B).

  • Static caching will bite you. If you use Statamic's static cache or a CDN, the OG tags are baked into the cached HTML at generation time. Change the fallback image config → clear the static cache, not just view:clear. A stale og:image in a cached page is invisible in dev and very visible in Slack.
  • og:image must be absolute, at least 1200×630, and served with a Content-Type that the crawler accepts. A perfectly configured addon with a relative image URL fails every validator.
  • Twitter/X falls back to og:* when twitter:* is absent but not when twitter:card is present and malformed. If the package emits twitter:card=summary_large_image unconditionally, entries without an image render a broken card. Check whether the card type is conditional on image presence.
  • Sanitize/escape excerpts. An unescaped " in a content="" attribute truncates the tag silently — no error, just a wrong preview.

Config and caching.

  • After publishing and editing config/autograph.php, run php artisan config:clear. In a cached-config environment (config:cache in deploy), a changed config file has zero effect until the cache is rebuilt. This is the most common "the package is broken" false alarm.
  • If you upgrade, re-publish assets. The 1.5.1 icon change is a published-asset change: without a republish or a cache-bust, the admin icon stays light-mode and you will file a phantom bug.

Admin icon / dark mode (from 1.5.1).

  • Cosmetic and admin-only. It cannot break request handling. Budget zero planning time for it.
  • If the icon is inline SVG, a strict Content-Security-Policy will silently block it in production while it renders fine locally. Verify under production headers.
  • If dark mode is resolved via a Tailwind dark class strategy rather than prefers-color-scheme, the icon depends on your host app putting the class on <html>. If your CP toggle works but the icon doesn't, that's the cause.

Maintenance and extension points.

  • Single-maintainer, zero-dependents, one changelog entry. Fine for a presentational addon; disqualifying if anything on the critical path starts depending on it. Keep the integration boundary thin — a single partial or a single tag call — so replacement is a one-file change.
  • Prefer the package's published views and config over subclassing its classes. If it publishes neither, that is a real signal about how easy it will be to correct its output, and it should factor into the adoption decision.
  • Escaping: if the signature generator returns HTML, the Antlers call must be unescaped ({{ ... }} in Antlers does not strip tags by default, but confirm). If the metadata addon returns attribute values, they must be escaped. Getting this backwards is either a broken signature or an XSS vector — check which one you have before going live.
  • What changes this assessment: a release touching routing, auth, or storage; a change to Laravel/PHP constraints; or a README that resolves the scope contradiction. Until then, treat it as a low-risk, HTML-producing addon and validate in a throwaway branch first.
Weaver

How can I help you explore Laravel packages today?

Conversation history is not saved when not logged in.
Prompt
Add packages to context
No packages found.
mehedimi/laravel-amp-mail
happones/laravel-vue-i18n-generator
jwerd/inertia-table
siberfx/flysystem-wasabi
hollyit/token-replace
ippanelcom/laravel-sdk
adachsoft/changelog-linter
adachsoft/collection
payerurl/telegrambot-crypto-payment-instant-payout
dskripchenko/laravel-hybrid-search
riorizkyrainey/lara-ced
mehedimi/static-vel
zharp/zharp
nonsapiens/bigquery-model-sync
lgu-bayambang-ict-office/lgu-laravel-development-standards
andydefer/laravel-support
se7enxweb/flysystem
lampwick/laravel
jeslage/statamic-emojis
micahdshackelford/rmap-laravel