4 min read automation-tooling

Inside Glint: How We Built an Agent-Native Blog Engine for the AEO Era

The anatomy of @vijayatech/glint: how we engineered an open-source static blog engine with raw markdown twins, llms.txt v2 discovery, and zero-JS Pagefind search for AI answer engines.

Data visualization showing Markdown AST compilation into static HTML, raw markdown twins, and llms.txt discovery graphs

TL;DR — Most web publishing platforms were built for human eyes, wrapping content in megabytes of CSS, hydration scripts, and nested DOM trees. In the Answer Engine Optimization (AEO) era, AI crawlers (Perplexity, ChatGPT, Claude, Google AIO) read structured raw Markdown. We built and open-sourced Glint (@vijayatech/glint)—a Git-native, zero-bloat publishing engine that emits both human-optimized HTML and machine-native Markdown twins with llms.txt v2 discovery out of the box.


Why traditional publishing engines fail AI answer engines

When an LLM search agent visits a traditional WordPress or Next.js blog, it incurs severe penalties:

  1. Token bloat: A 1,200-word article wrapped in standard layout HTML easily explodes into 35,000+ tokens of navigational menus, tracking tags, and script payloads.
  2. JavaScript execution gates: Dynamic client-side rendering frequently times out before headless AI scrapers can parse main content.
  3. Missing machine discovery: Traditional sitemaps only point to HTML pages. LLM crawlers are forced to strip markup heuristics, introducing extraction errors and citation drops.

As documented in our multi-engine AEO divergence study, 63.3% of brand citations vanish on engines that struggle with page extraction. To solve this, we engineered Glint.


The 3 pillars of Glint’s agent-native architecture

                     ┌──────────────────────────────────────────────┐
                     │          Git-Native Content Layer            │
                     │          (content/blog/*.mdx)                │
                     └──────────────────────┬───────────────────────┘

                       ┌────────────────────┴───────────────────┐
                       │                                        │
                       ▼                                        ▼
      ┌─────────────────────────────────┐      ┌─────────────────────────────────┐
      │          HUMAN SURFACE          │      │         MACHINE SURFACE         │
      │   • Semantic HTML5 + VanillaCSS │      │   • Raw Markdown Twins (/raw/)  │
      │   • 0-JS Pagefind Search Index  │      │   • llms.txt v2 Auto-Generation │
      │   • Schema.org JSON-LD Emitted  │      │   • rel="alternate" (text/md)   │
      └─────────────────────────────────┘      └─────────────────────────────────┘

1. Zero-JS Markdown twins at /raw/

For every published page (e.g., /blog/my-post/), Glint automatically compiles and hosts a clean, standalone Markdown twin at /raw/blog/my-post.md.

Glint injects machine discovery headers into the HTML <head>:

<!-- Human page tells AI agents where the raw twin lives -->
<link rel="alternate" type="text/markdown" href="https://vijayatechlabs.com/raw/blog/my-post.md" />
<link rel="describedby" href="https://vijayatechlabs.com/llms.txt" />

When an AI bot requests the URL, it consumes 90% fewer tokens and retrieves 100% accurate factual nodes.

2. Native llms.txt v2 auto-generation

Glint scans your validated collection frontmatter and compiles /llms.txt and /llms-full.txt during the build step. It structures your site’s ground truth, summaries, and canonical links into an indexable index curated specifically for agentic browsing audits.

3. Sub-50ms static search with Pagefind

Instead of pulling heavy client-side search bundles or paying for external SaaS search widgets, Glint bundles an extended Pagefind integration. It indexes rendered HTML statically post-build, enabling instant search across thousands of posts with zero client overhead.


Architectural Comparison

FeatureTraditional CMS (WordPress/Ghost)Modern Headless (Next.js/React)Glint Engine (@vijayatech/glint)
Markdown TwinsRequires custom pluginsManual route handlersNative at /raw/<collection>/<slug>.md
llms.txt GenerationManual static fileCustom API routeAuto-generated during static build
Search Engine OverheadMySQL queries / PHPAlgolia / Client bundleZero-JS static Pagefind indexing
Token Efficiency for AILow (Heavy DOM bloat)Medium (Hydration tags)Maximum (Pure text/markdown twin)
Agent Ops IntegrationComplex REST/GraphQLCustom endpointsGit-native PR workflows (Hermes Stack)

How to adopt Glint

Glint is designed to drop into any Astro project. Install the package:

pnpm add @vijayatech/glint

Define your blog schema in src/content.config.ts:

import { blog as blogSchema } from "@vijayatech/glint/schema";
import { defineCollection } from "astro:content";

export const collections = {
  blog: defineCollection({ schema: blogSchema }),
};

Run glint doctor to validate category taxonomy, tag compliance, and broken markdown links before opening a PR.


Frequently Asked Questions

What is a Markdown Twin in AEO?

A Markdown Twin is an exact, unstyled plain-text Markdown replica of a published HTML webpage, served at a clean endpoint (such as /raw/blog/post-slug.md). It allows AI crawlers to ingest the core content, code snippets, and structured tables without wasting tokens on navigation, scripts, or layout styling.

Does serving Markdown twins cause duplicate content SEO penalties?

No. Glint uses standard <link rel="alternate" type="text/markdown" href="..." /> annotations and consistent canonical URLs pointing to the main HTML document. Search engines treat alternate types as machine-readable representations rather than competing duplicates.


Sources

Prefer VijayaTech Labs in Google Search (Top Stories, AI Overviews, AI Mode). This adds vijayatechlabs.com — Google does not treat /blog as its own source.