PHPackages                             calevans/answer-engine-optimization - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Utility &amp; Helpers](/categories/utility)
4. /
5. calevans/answer-engine-optimization

ActiveLibrary[Utility &amp; Helpers](/categories/utility)

calevans/answer-engine-optimization
===================================

StaticForge Feature: AnswerEngineOptimization

2.2.3(1mo ago)0111MITPHPPHP ^8.4

Since Apr 15Pushed 1mo agoCompare

[ Source](https://github.com/calevans/staticforge-answer-engine-optimization)[ Packagist](https://packagist.org/packages/calevans/answer-engine-optimization)[ RSS](/packages/calevans-answer-engine-optimization/feed)WikiDiscussions master Synced 3w ago

READMEChangelogDependencies (4)Versions (9)Used By (1)

AnswerEngineOptimization
========================

[](#answerengineoptimization)

A StaticForge feature package that optimises your site for AI-powered answer engines (LLMs, RAG pipelines, AI search). It handles structured data injection, `llms.txt` generation, AI-bot `robots.txt` rules, and data-driven FAQ schema — all automatically as part of the StaticForge build pipeline.

Installation
------------

[](#installation)

```
composer require calevans/AnswerEngineOptimization
```

Features
--------

[](#features)

FeatureDescriptionAI-bot `robots.txt`Adds `Allow: /` rules for `OAI-SearchBot`, `ChatGPT-User`, `Google-Extended`, `Anthropic-ai`, and `Claude-Web`Article JSON-LDInjects `Article` structured data into every page ``BreadcrumbList JSON-LDInjects `BreadcrumbList` structured data on all non-home pagesFAQ JSON-LDInjects `FAQPage` structured data from frontmatter, `[faq]` shortcodes, or a shared JSON data file`llms.txt`Generates a site-wide `llms.txt` index for AI crawlers, with a titled header and per-page descriptions`llms` link tagInjects `` into every page ```.md` copyPublishes a stripped Markdown copy of each page alongside its HTML outputConfiguration
-------------

[](#configuration)

### `siteconfig.yaml`

[](#siteconfigyaml)

All keys are optional. The package works with sensible defaults when they are absent.

```
site:
  name: "My Site"           # Becomes the `# Title` in llms.txt and the Article schema publisher name.
                            # Defaults to "LLMs Documentation" in llms.txt when not set.
  tagline: "My tagline"     # Becomes the `> description` blockquote in llms.txt.
                            # Falls back to `site.description` if `tagline` is absent.
  description: "..."        # Fallback description for llms.txt when `site.tagline` is not set.

social:
  default_image: "https://example.com/logo.png"  # Added as `publisher.logo` in the Article JSON-LD schema.

answer_engine_optimization:
  faq_data_file: content/assets/faq.json  # Path (relative to project root) to the shared FAQ JSON data file.
                                           # Defaults to `content/assets/faq.json` when not set.
```

### Per-page frontmatter

[](#per-page-frontmatter)

```
---
title: "Page Title"
description: "Shown as the description in the llms.txt entry for this page."
no_llms: true        # Set to true to exclude this page from llms.txt and suppress the  tag.
aeo:
  key_takeaways: "A custom summary written by the author, used verbatim in llms.txt."
  faqs:
    - question: "What is this page about?"
      answer: "It is about answer engine optimisation."
---
```

### FAQ data file

[](#faq-data-file)

When `answer_engine_optimization.faq_data_file` is configured (or the default `content/assets/faq.json` exists), the package loads a shared bank of FAQs that can be referenced from any page via `data-faq` HTML attributes.

**`content/assets/faq.json`**

```
[
  {"id": "what-is-aeo", "question": "What is answer engine optimisation?", "answer": "It is the practice of structuring content so AI systems can accurately surface it in answers."},
  {"id": "pricing",     "question": "How much does it cost?",              "answer": "It is free and open source."}
]
```

Reference an entry in your Markdown by adding a `data-faq` attribute to any HTML element:

```

```

The matching entries are automatically included in the `FAQPage` JSON-LD schema for that page.

### Priority order for FAQ sources

[](#priority-order-for-faq-sources)

FAQs from all three sources are merged in this order:

1. `aeo.faqs` in page frontmatter
2. `[faq question="…" answer="…"]` shortcodes in page content
3. `data-faq="id"` references resolved from the shared JSON data file

### Priority order for `llms.txt` summary

[](#priority-order-for-llmstxt-summary)

The per-page summary line in `llms.txt` is resolved in this order:

1. `aeo.key_takeaways` in page frontmatter (author-written, highest priority)
2. `description` in page frontmatter
3. Empty string (the colon is still emitted; the AI crawler can infer context from the `.md` copy)

###  Health Score

43

—

FairBetter than 89% of packages

Maintenance92

Actively maintained with recent releases

Popularity6

Limited adoption so far

Community10

Small or concentrated contributor base

Maturity57

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~9 days

Recently: every ~1 days

Total

8

Last Release

39d ago

Major Versions

1.0.1 → 2.0.02026-05-02

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/426938?v=4)[Cal Evans](/maintainers/calevans)[@calevans](https://github.com/calevans)

---

Top Contributors

[![calevans](https://avatars.githubusercontent.com/u/426938?v=4)](https://github.com/calevans "calevans (16 commits)")

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/calevans-answer-engine-optimization/health.svg)

```
[![Health](https://phpackages.com/badges/calevans-answer-engine-optimization/health.svg)](https://phpackages.com/packages/calevans-answer-engine-optimization)
```

###  Alternatives

[pratiksh/nepalidate

Laravel package to convert AD to BS that can work with carbon.

276.7k1](/packages/pratiksh-nepalidate)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
