Jekyll tutorial · GitHub Pages · 7 minutes

How to Add llms.txt to Jekyll

Most GitHub Pages blogs run on Jekyll, which has no native llms.txt feature. Its file rules make it one of the easiest SSGs to fix, though: a static file in 60 seconds, auto-generation from your posts with a few lines of Liquid (no plugin, so GitHub Pages accepts it), or the jekyll-llms-output plugin for llms.txt plus llms-full.txt.

The Jekyll File Rule That Makes This Easy

Every root-level file in Jekyll meets one of two fates: with YAML front matter it is rendered through Liquid and written to the same path in _site; without front matter it is copied verbatim. A root file named llms.txt with a layout: null front matter block gets its Liquid processed and published at /llms.txt as plain text — no custom output formats needed.

Real-World Case: jtemporal.com

Developer advocate Jessica Temporal (Jekyll + GitHub Pages) published her exact setup. Her live file, curl-verified on 2026-09-07:

$ curl -sI https://jtemporal.com/llms.txt
HTTP/2 200
content-type: text/plain; charset=UTF-8
content-length: 32551

The _Generated timestamp proves Liquid wrote the file at build time. Her setup: layout: null front matter, a {% for post in site.posts %} loop enumerating every post, and llms.txt in the _config.yml include list (custom include lists omit unlisted files).

Method 1: A Static File in 60 Seconds

If your site is small and stable, create llms.txt at the Jekyll root without front matter — it is copied into _site unchanged:

# Acme Blog

> Acme Blog publishes practical tutorials on web performance and SEO.

## Essentials

- [About](https://acme.com/about/): who writes here and why
- [Archive](https://acme.com/archive/): every post, newest first

## Popular Posts

- [Core Web Vitals in 2026](https://acme.com/cwv-2026/): what changed and what to fix
- [Heading Hierarchy](https://acme.com/headings/): H1 to H6 done right

Caveat: if your _config.yml defines a custom include list, add llms.txt to it — otherwise the file never reaches the build output. The cost of this route is maintenance: every new post is a hand edit, and a file that drifts from your content is one agents follow into stale territory.

Method 2: Auto-Generate from site.posts with Liquid

For a blog, the no-plugin template is the sweet spot: no gem, so it runs inside the stock GitHub Pages build, and it regenerates on every bundle exec jekyll build:

---
layout: null
---
# Acme Blog

> Acme Blog publishes practical tutorials on web performance and SEO.
> Generated: {{ site.time | date: "%Y-%m-%d" }}

## Posts

{% for post in site.posts %}
- [{{ post.title }}](https://acme.com{{ post.url }}): {{ post.excerpt | strip_html }}
{% endfor %}

layout: null emits plain text instead of your theme's HTML wrapper. URLs are hard-coded because site.url stays empty until you set url: in _config.yml. A one-line description per post becomes the link description agents read.

Variant: link to raw Markdown sources using post.path: raw.githubusercontent.com/USER/REPO/main/{{ post.path }}. Clean Markdown is the most LLM-friendly form — like the per-page .md files the llms.txt v2 spec defines.

Method 3: jekyll-llms-output for llms.txt + llms-full.txt

For spec-grade output without writing Liquid, jekyll-llms-output generates /llms.txt and /llms-full.txt. In curated mode, drop a _data/llms.yml mapping sections to links; without it, auto mode emits one ## Section per collection, one bullet per document. Add the gem to your Gemfile:

# Gemfile
gem "jekyll-llms-output", group: :jekyll_plugins

# terminal
bundle install

Paired with jekyll-markdown-output, it writes a clean .md sibling for every page, and llms-full.txt concatenates every document's full body under # Title headers. See the llms.txt vs llms-full.txt guide.

The GitHub Pages catch: Pages only allows a whitelist of Jekyll plugins, and this gem is not on it — building from a gh-pages branch means it silently never runs. Build in CI and deploy the resulting _site directory instead.

Static, Liquid or Plugin?

ApproachSetupGitHub PagesAuto-updatesllms-full.txt
Static root file1 minuteYesNoNo
Liquid template~5 minutesYes, no plugin neededEvery buildNo
jekyll-llms-output~10 minutesVia CI onlyEvery buildYes

For a typical blog the Liquid route offers the best return: it stays inside GitHub Pages' constraints and your post list can never go stale. Choose the plugin when you also want llms-full.txt or per-page Markdown and already build in CI. Either way, follow llms.txt best practices — a summary per link beats a raw title.

Verify and Maintain

curl -s -o /dev/null -w "%{http_code} %{content_type}\n" https://yourblog.com/llms.txt
# Expect: 200 text/plain

Paste the URL into the free llms.txt checker, or feed your blog's sitemap into the free llms.txt generator, then let Liquid keep it current — a zero-maintenance byproduct of the build that already publishes your blog.