Download the PHP package anvildev/craft-beacon without Composer

On this page you can find all versions of the php package anvildev/craft-beacon. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package craft-beacon

Beacon

SEO and GEO for Craft 5 — meta, schema, redirects, llms.txt, AI crawler controls. CP-first, API-first, PHPBench-verified performance budgets on every PR.

Why Beacon

Performance

Operation Budget Verified (μs median)
Redirect lookup (exact match) < 1ms ~0.1μs
Redirect lookup (exact miss) < 1ms ~0.1μs
Redirect lookup (glob single-segment) < 5ms ~1.1μs
Redirect lookup (glob multi-segment) < 5ms ~1.1μs
Redirect lookup (regex) < 5ms ~1.0μs

Numbers from bench/baseline.json (PHPBench, PHP 8.4). CI enforces the budget on every PR.

Requirements

Install

Uninstall

Uninstalling drops all Beacon tables and their data — including redirects, short links, authors, schema bundles, per-site text-surface config, and the bot/404/GEO-score history. Export anything you want to keep (e.g. the redirects CSV export under /admin/beacon/redirects) before uninstalling.

Quick start

After install, visit /admin/beacon for the dashboard. All configuration lives in the Control Panel — no project-config YAML required.

First-run path:

  1. Open /admin/beacon.
  2. Set your identity under Settings → Organization (name, logo, social profiles) — this feeds JSON-LD sitewide.
  3. Add the Beacon SEO field to your entry types' field layouts so editors get per-entry meta + live previews. By default the field opens in lite mode (char meters + Google preview; checklist and extra platform tabs hidden). Set seoFieldLiteMode => false in config/beacon.php for the full UI — see Settings → SEO field lite mode.
  4. Add head() to your layout (below) so meta, Open Graph, and JSON-LD render.
  5. Go live: set CRAFT_ENVIRONMENT=production. Outside production Beacon emits noindex on every page by design — see Troubleshooting.

In your Twig layout <head>:

If you need manual composition, placement-specific tracking helpers are also available:

That renders title, description, canonical, robots, Open Graph + Twitter Card meta (og:* / twitter:*), optional article:* times when og:type is article, and JSON-LD. For the full reference — every function, every parameter, call-order rules, headless usage — see docs/TWIG_API.md.

For social images, register a Craft image transform named beaconSocial (~1200×630) — Beacon applies it by default. To use a different handle (or none / original / full to serve the native asset URL), set socialImageTransform in config/beacon.php.

CP screens

Beacon is fully CP-driven. All configuration lives in DB tables managed via /admin/beacon:

Public endpoints

Beacon registers these site URLs automatically (overridable in config/routes.php):

Sitemap extensibility: hook \anvildev\beacon\Plugin::EVENT_REGISTER_SITEMAP_URLS (event class \anvildev\beacon\events\RegisterSitemapUrlsEventpushUrl($loc, $lastmod?, $changefreq?, $priority?)). Duplicate loc values: last registration wins.

Headless / GraphQL

Beacon registers a beacon field on Craft's EntryInterface:

The resolver is lazy — entries that don't include beacon in the query never touch the plugin.

Schema-graph scope: GraphQL beacon.schemas and beacon.schemaNodes return the CP-configured schema bundles (Article / Product / Recipe / HowTo / FAQPage / Review) plus any per-entry schemaAddons from the Beacon SEO field. The auto-emitted nodes that appear in the HTML <head> (BreadcrumbList from the breadcrumb chain, the WebPage / WebSite identity pair, the Organization / Person node, the GEO-provenance citations node) are HTML-only in this release. Headless clients can rebuild them client-side from beacon.breadcrumbs { name url } plus a static Organization JSON-LD constant in their layout. Full parity (single schema-graph builder used by both HTML and GraphQL paths) is tracked for a future release.

GraphQL: redirects & 404 log

Two read-only top-level queries are exposed when the corresponding schema components are granted on a token:

Both BeaconRedirect and BeaconRedirect404 are queryable via __type introspection. The plural queries return non-null lists of non-null items — clients can skip null checks. The singular beaconRedirect(id: …) returns null when no row matches.

GraphQL: short links

beaconShortLinks(siteId, enabled, search, limit) exposes short links read-only, gated by beaconShortLinks:read. Pass siteId to return only the links live on that site. Returns the BeaconShortLink type (id, propagationMethod, slug, destination, statusCode, enabled, clicks, lastClicked, expiresAt, …).

GraphQL: GEO content score

The beacon field exposes a geoScore sub-field that returns the composite 0–100 GEO score plus per-pillar breakdown. The resolver is lazy — entries that don't include geoScore in the selection set never touch the score table — and the field is gated by the beaconGeoScore:read schema component (returns null without it).

A live smoke is in bench/gql-geoscore.sh (set TOKEN, ENTRY_ID, optional ANON_TOKEN).

GraphQL writes (Beacon SEO field)

Beacon does not register custom GraphQL mutations. For headless authoring, use Craft's built-in entry mutations and set your Beacon SEO field handle as an object input.

Example payload shape (assuming field handle seo):

$seo can include keys such as title, description, canonical, robots, ogImageId, authorIds, and schemaAddons.

See additional docs:

CLI commands

Command What it does
beacon/cache/regenerate-all Warm every text/sitemap surface in one pass (ideal post-deploy hook).
beacon/cache/regenerate-sitemap Rebuild the sitemap caches.
beacon/cache/regenerate-llms-txt Rebuild the llms.txt caches.
beacon/cache/flush Clear Beacon's render caches.
beacon/markdown/generate Pre-generate the per-URL GEO Markdown exports.
beacon/markdown/clear Clear generated Markdown.
beacon/redirects/import <csvFile> Import redirects from a CSV file.
beacon/redirects/audit Report redirect problems (loops, chains).
beacon/redirects/prune404-log Prune the 404 log (--site, --threshold-days).
beacon/index-now/generate-key Generate a per-site IndexNow key.
beacon/index-now/submit <url> Submit one URL to IndexNow (--site).
beacon/index-now/section <handle> Submit every URL in a section.
beacon/index-now/all Submit all public URLs.

Whisper coexistence boundary

When Beacon and Whisper are installed together, Beacon is the canonical redirect owner.

Rationale: both plugins have 404 interceptors; running both creates ambiguous redirect chains and support risk.

Troubleshooting

Security

Found a vulnerability? See docs/SECURITY.md for responsible-disclosure instructions.

Roadmap

See docs/ROADMAP.md for the prioritized post-v1 feature list.

Status

Stable. APIs are frozen and follow semver. See CHANGELOG.md for release history.

License

Proprietary. See LICENSE.md.


All versions of craft-beacon with dependencies

PHP Build Version
Package Version
Requires php Version ^8.2
craftcms/cms Version ^5.0
league/html-to-markdown Version ^5.1
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package anvildev/craft-beacon contains the following files

Loading the files please wait ...