Jekyll logo

jekyll_outline

Published 2020-10-03. Last modified 2026-11-18.
Time to read: 3 minutes.

This page is part of the jekyll_plugins collection.

This Jekyll tag plugin creates a clickable table of contents.

You can see this plugin in action in most of the index pages of this web site.

Order

This plugin requires every page in a collection to have an entry for order in its front matter. The value of order must be an integer. This entry is normally used for sorting the pages.

The front matter for this page, the page that you are reading right now, is:

Front matter
---
categories: [Jekyll]
date: 2020-10-03
description: "Organizes the index of a collection into chapters."
last_modified_at: 2025-01-09
layout: jekyll
order: 100
title: <span class="code">jekyll_outline</span>
---

Examples

Following is the source for two of of this web site’s index pages.

Django / Django-Oscar index.html

Below is a simple outline, without images.

/django/index.html
      {% outline attribution django %}
        0: Django / Oscar Evaluation
        400: Notes
        800: Digging Deeper
        1900: Debugging
        2700: Production
      {% endoutline %}
      <!-- endregion -->
    </div>
    <div>
      {% all_collections
        collection_name="django"
        date_column="last_modified"
        id="by_last_modified"
        heading=""
        sort_by="-last_modified, -date"
      %}
    </div>
    <div>
      {% all_collections
        collection_name="django"
        date_column="date"
        id="by_date"
        heading=""
        sort_by="-date, title"
      %}
  </div>
</div>
<!-- endregion Tabs -->

{% outline_js wrap_in_script_tag %}

A/V Studio index.html

The following outline features images associated with specific entries.

/av_studio/index.html
      <!-- #region Outline -->
      {% outline attribution av_studio %}
      0: Production Infrastructure
      15000: Audio
      20000: Video
      30000: RME
      40000: OBS Studio
      50000: Pro Tools
      55000: Ableton Live &amp; Push
      60000: Other Music Software
      70000: MIDI Hardware &amp; Software
      80000: DaVinci Resolve
      90000: VST Plugins
      100000: Computer Analysis
      200000: Music Theory
      300000: Business
      400000: General
      {% endoutline %}
      <!-- endregion Outline -->
    </div>
    <div>
      {% all_collections
        collection_name="av_studio"
        date_column="last_modified"
        id="by_last_modified"
        heading=""
        sort_by="-last_modified, -date"
      %}
    </div>
    <div>
      {% all_collections
        collection_name="av_studio"
        date_column="date"
        id="by_date"
        heading=""
        sort_by="-date, title"
      %}
    </div>
  </div>
</div>
<!-- endregion Tabs -->


<!-- #region images -->
<div style="display: none">
  {% img
    align="right"
    class=""
    id="outline_150"
    src="/av_studio/images/everse8/everse8d.webp"
    size="eighthsize"
    style="margin-top: 0"
    wrapper_class="clear"
  %}
  {% img
    align="right"
    class=""
    id="outline_200"
    src="./images/equipment/sony_a7iii/sony_a7iii.webp"
    size="eighthsize"
    style="margin-top: 0"
    wrapper_class="clear"
  %}
  {% img
    align="right"
    class=""
    id="outline_300"
    src="./images/rme/rme_logo.webp"
    size="eighthsize"
    style="margin-top: 0"
    wrapper_class="clear"
  %}
  {% img
    align="right"
    class=""
    id="outline_400"
    src="./images/obsStudio/obs_logo.webp"
    size="eighthsize"
    style="margin-top: 0"
    wrapper_class="clear"
  %}
  {% img
    align="right"
    class=""
    id="outline_500"
    src="./images/proTools/proToolsLogo.webp"
    size="eighthsize"
    style="margin-top: 0"
    wrapper_class="clear"
  %}
  {% img
    align="right"
    class=""
    id="outline_550"
    src="./images/ableton/ableton_live_logo.webp"
    size="eighthsize"
    style="margin-top: 0"
    wrapper_class="clear"
  %}
  {% img
    align="right"
    class="rounded"
    id="outline_600"
    src="./images/music21.webp"
    size="eighthsize"
    style="margin-top: 0"
    wrapper_class="clear"
  %}
  {% img
    align="right"
    class=""
    id="outline_700"
    src="./images/midi/MIDI_logo.webp"
    size="eighthsize"
    style="margin-top: 0"
    wrapper_class="clear"
  %}
  {% img
    align="right"
    class=""
    id="outline_800"
    src="./images/davinci_resolve/daVinci_resolve_logo.webp"
    size="eighthsize"
    style="margin-top: 0"
    wrapper_class="clear"
  %}
  {% img
    align="right"
    class="rounded"
    id="outline_2000"
    src="./images/music_theory.webp"
    size="eighthsize"
    style="margin-top: 0"
    wrapper_class="clear"
  %}
  {% img
    align="right"
    class=""
    id="outline_4000"
    src="./images/handsfree/pageflip_firefly.webp"
    size="eighthsize"
    style="margin-top: 0"
    wrapper_class="clear"
  %}
</div>
<!-- endregion -->
<!-- endregion -->


{% comment %}
{% outline_js wrap_in_script_tag %}
{% endcomment %}

Usage

All files in a collection are included in the outline, except for those whose name starts with index, and those with the following in their front matter:

Jekyll Page Front Matter
exclude_from_outline: true

Note that Jekyll requires all documents in a collection to have a value for order in their front matter. This value is ignored by outline_tag if exclude_from_outline has a truthy value.

The following examples are taken from demo/index.html.

Sort by the order field:

Jekyll web page
{% outline attribution
  fields=" title  –  description "
  stuff
%}
000: A Topic 0..19
020: A Topic 20..39
040: A Topic 40..
{% endoutline %}

Sort by the title field:

Jekyll web page
{% outline attribution sort_by_title
  fields=" title  –  description "
  stuff
%}
000: B Topic 0..19
020: B Topic 20..39
040: B Topic 40..
{% endoutline %}

Listing The Outline

The first task one must face when starting a new article in a collection is provide front matter. This plugin requires the `order` key to have a value, or the articles cannot be sorted. Deciding on the best `order` value for a new article can be frustrating when you have a lot of articles with many sections in the collection.

The msls command was designed to solve that problem. It is installed when you install this gem as described above.

Here is a portion of the msls output when run on the Jekyll repository for this website (color for draft articles is not shown here):

Shell
$ msls llm
_llm  (68 articles, 18 drafts)

  [0] End User Experience
        0  hermes.html                    Hermes Workspace  2026-04-30
      500  whisper.html                   OpenAI Whisper  2024-04-21
      750  chat-transcripts.html          Recording Chat Transcripts  2025-12-14
      755  session_resume.html            Resuming a Claude Code Session on Another Computer  2026-10-31

  [1000] Math Background
     1000  latex.html                     LaTeX Notes  2026-02-02
     1100  html-math.html                 Writing Math For Web Pages  2026-02-02
     1200  probablility-theory.html       Quick Review of Probability Theory  2024-01-27

  [1500] LLM Theory
     1500  llm-notes.html                 Large Language Model Notes  2025-09-12
     1550  diffusion-implementation.html  Diffusion Model Implementation From Scratch.  2024-02-11
     1553  edit_format.html               LLM Edit Formats  2026-04-21
     1555  system-prompts.html            LLM System Prompts  2025-11-25
     1560  rag.html                       Retrieval Augmented Generation (RAG)  2025-12-12
     1565  planning-vs-waterfall.html     AI Planning vs. Waterfall Project Management  2025-10-12
     1566  social-llms.html               LLM Societies  2025-12-13
     1570  deterministic_plan.html        Deterministic Plans for LLMs  2026-08-10

  [1750] MCP
     1750  mcp-protocol.html              Model Context Protocol (MCP)  2025-10-27
     1760  mcp-vscode.html                Visual Studio Code Extension Host MCP Servers  2025-10-27
     1770  mcp-tools.html                 MCP Tools  2025-11-23
     1777  websearch.html                 MiniMax Web Search with ddgr  2026-10-31

  [2000] LLMs in the Cloud
     2100  hugging-face.html              Hugging Face  2024-01-16
     2200  chatgpt-writers.html           ChatGPT-4 Plugins for Writers  2024-01-13

  [4000] Dependencies
     4000  llm-wsl.html                   Running LLMs on WSL  2024-02-13
     4200  anaconda.html                  Anaconda  2024-01-19
     4400  chat_frameworks.html           Chat frameworks  2024-02-09

  [6000] Local LLMs
     6100  ollama.html                    Large Language Models with Ollama  2026-10-25
     6101  ollama_mgmt.html               Managing Ollama Models  2025-12-12
     6104  ollama_vscode.html             Using Ollama and Gemma-4 with Visual Studio Code  2026-10-25
     6200  oterm.html                     oterm, A Text-Based Ollama Client  2025-09-20
     6300  ollama-webui.html              Open WebUI  2024-01-17
     6400  ollama-ruby.html               Ollama-Ruby  2024-01-14
     6999  minimax-local.html             Running MiniMax-M2 on an NVIDIA 3060  2025-11-24
     7000  stable-diffusion.html          Image Generation With Stable Diffusion  2025-09-21
     7200  stable-diffussion-webui.html   Stable Diffusion WebUI by AUTOMATIC1111  2024-01-18
     7400  comfyui.html                   ComfyUI  2025-09-21
     7410  flux.html                      Flux 1  2025-11-06
     7600  fooocus.html                   Image Generation With Fooocus  2024-01-18
     7700  privategpt.html                PrivateGPT: Secure Q/A for a Corpus  2024-02-14
     7800  renting-vs-buying-gpus.html    Renting vs. Purchasing GPUs for LLMs Throughout Canada  2026-08-22
     7803  glm.html                       Running GLM on the Ollama app  2026-04-11

  [7900] Agentic Programming
     7901  coding-llms.html               Best Local LLMs for Coding  2026-08-10
     7902  agentic-comparison.html        Agentic Coding Assistant Comparison  2026-04-02
     7904  llm_pipeline.html              Early Draft: Multi-LLM Agent Pipelines  2025-11-08
     7920  claude.html                    Claude Code Is Magnificent, But Anthropic is Rapacious  2026-04-02
     7922  claude-cli-leak.html           Critique of Leaked Claude Code CLI  2026-04-03
     7960  grok.html                      Using Grok With Visual Studio Code  2025-11-16
     7996  minimax.html                   MiniMax-M3.1 Flash Review  2026-11-17
     7997  minimax-claude-config.html     Running MiniMax M3.1 Flash on Claude Code CLI  2026-11-15
     7998  gemini-vs-sonnet.html          Gemini vs. Sonnet 3.5 and 4.6 for Meticulous Work  2026-02-18
     7998  mini-agent2.html               Mini-Agent Review  2026-10-31

  [8300] Other LLMs
     8300  vid-llms.html                  Video-focused LLMs  2025-07-15

  [9000] Evaluating LLMs
     9500  inspect.html                   Inspect: A Framework for Evaluating LLMs  2024-06-08

  [10000] Video-focused LLMs

  [11000] Harnesses and IDE Extensions
    11000  llm-harnesses.html             LLM Harnesses  2024-02-13
    11010  aider.html                     Aider: A Lean and Focused Agentic Programming Assistant  2026-04-21
    11020  antigravity.html               Antigravity  2026-05-20
    11030  chatgpt-copilot.html           ChatGPT Copilot  2025-11-03
    11040  codegpt.html                   CodeGPT  2025-10-21
    11045  codex.html                     Codex: Agentic Programming with ChatGPT in Visual Studio Code  2026-01-14
    11050  cursor.html                    Cursor - The Most Expensive IDE Available in 2025  2025-10-14
    11060  forgecode.html                 Forgecode  2026-04-08
    11070  gemini.html                    Gemini Code Assist  2026-03-03
    11080  github-copilot.html            GitHub Copilot  2025-10-16
    11090  gpt4all.html                   GPT4 All  2023-04-18
    11100  lmstudio.html                  LM Studio  2025-10-04
    11110  opencode.html                  OpenCode: An Open Source Alternative to Claude Code  2025-11-02
    11120  windsurf.html                  Windsurf  2025-10-12
    11150  agent_maggie.html              Agent Maggie - Ready to Integrate On Your Behalf  2025-12-10

  [12000] Methodology

  [13000] Miscellaneous
    13100  editing_documents.html         LLMs for Editing Textual Documents  2026-04-21
    13100  jev_clones.html                F/OSS Jev Clones  2026-09-20 

When invoked with no arguments, msls lists all articles in all collections.

Installation

Add the following line to your Jekyll website’s Gemfile, within the jekyll_plugins group:

Shell
{% noselect group :jekyll_plugins do %}
  gem 'jekyll_outline'
{% noselect end %}

And then execute:

Shell
$ bundle install

Fields

By default, each displayed entry consists of a document title, wrapped within an <a href></a> HTML tag that links to the page for that entry, followed by an indication of whether the document is visible (a draft) or not.

Entries can include following fields: draft, categories, description, date, last_modified_at, layout, order, title, slug, ext, and tags.

The following example uses fields title and description:

Shell
{% outline fields="title – <i> description </i>" %}
000: Topic 0..19
020: Topic 20..39
040: Topic 40..
{% endoutline %}

Words in the fields argument that are not recognized as a field are transcribed into the output.

In the above example, notice that the HTML is space-delimited from the field names. The parser is simple and stupid: each token is matched against the known keywords. Tokens are separated by white space.

Outline Tabs

This example shows the actual HTML used to display the outline in the tabs in the LLM index

Sample code for a tabbed outline
---
css: https://cdn.jsdelivr.net/npm/jsuites/dist/jsuites.min.css
javascriptEnd: [
    https://cdn.jsdelivr.net/npm/jsuites/dist/jsuites.min.js,
    /assets/js/jtab.js
  ]
---
<!-- #region Tabs -->
<div class="jtabs">
  <div id="jtabs-headers">
    <div id="organized">Organized</div>
    <div id="by_last_modified">By Last Modified</div>
    <div id="by_date">By Original Publication Date</div>
  </div>
  <div id="jtabs-content">
    <div>
      {% outline attribution llm %}
        0000: End User Experience
        1000: Math Background
        1500: LLM Theory
        1750: MCP
        2000: LLMs in the Cloud
        4000: Dependencies
        6000: Local LLMs
        7900: Agentic Programming
        8300: Other LLMs
        9000: Evaluating LLMs
        10000: Video-focused LLMs
        11000: Harnesses and IDE Extensions
        12000: Methodology
        13000: Miscellaneous
      {% endoutline %}
    </div>
    <div>
      {% all_collections
        collection_name="llm"
        date_column="last_modified"
        id="by_last_modified"
        heading=""
        sort_by="-last_modified, -date"
      %}
    </div>
    <div>
      {% all_collections
        collection_name="llm"
        date_column="date"
        id="by_date"
        heading=""
        sort_by="-date, title"
      %}
    </div>
  </div>
</div>
<!-- endregion Tabs -->

{% outline_js wrap_in_script_tag %}

CSS

The CSS used for the demo website should be copied to your project.

demo/assets/css/jekyll_outline.css
.clearfix:after {
  content:"";
  display:block;
  clear:both;
 }

.outer_posts { }

.posts {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  line-height: 170%;
}

.posts > *:nth-child(odd) {
  font-family: Monaco, "Bitstream Vera Sans Mono", "Lucida Console", Terminal, monospace;
  font-stretch: semi-condensed;
  font-size: 10pt;
  width: 120px;
}

.posts > *:nth-child(even) {
  margin-bottom: 1em;
  width: calc(100% - 120px);
}

.post_title {
  margin-bottom: 0;
}

.outer_posts .jps_attribute {
  display: flex;
  margin-top: 1.5em;
}

.outline_error {
  background-color: rgb(248, 149, 149);
  border-radius: 4pt;
  border: rgb(155, 141, 141) 2px solid;
  color: black;
  font-family: Monaco, "Bitstream Vera Sans Mono", "Lucida Console", Terminal, monospace;
  font-stretch: semi-condensed;
  font-size: 9pt;
  line-height: 150%;
  padding: 2pt 4pt 2pt 4pt;
}

.outline_error code {
  color: lightgray;
  font-size: 10pt;
}

JavaScript

Copy jekyll_outline.js to your Jekyll website's JavaScript directory.

This project's outline_js tag returns the JavaScript necessary to position images relating to the outline. If used without parameters it just returns the JavaScript; use the tag this way:

Shell
<script> 
  {%= outline_js %}
</script> 

If passed the wrap_in_script_tag parameter, it wraps the JavaScript in <script></script>. Use the tag this way:

Shell
{% outline_js wrap_in_script_tag %}

Explanation

Given an outline that looks like this:

Shell
{% outline my_collection %}
000: Topic 0..19
020: Topic 20..39
040: Topic 40..
{% endoutline %}

...and given pages in the stuff collection with the following names:

  • 010-published.html has title Published Stuff Post 010
  • 020-unpublished.html has title Unpublished Post 020
  • 030-unpublished.html has title Unpublished Post 030

Then links to the pages in the stuff collection's pages are interleaved into the generated outline like this:

Shell
<div class="outer_posts">
  <h3 class='post_title clear' id="title_0">Topic 0..19</h3>
  <div id='posts_wrapper_0' class='clearfix'>
    <div id='posts_0' class='posts'>
      <span>2022-04-01</span> <span><a href='/stuff/010-published.html'>Published Stuff Post 010</a></span>
      <span>2022-04-17</span> <span><a href='/stuff/020-unpublished.html'>Unpublished Post 020</a> <i class='jekyll_draft'>Draft</i></span>
    </div>
  </div>
  <h3 class='post_title clear' id="title_20">Topic 20..39</h3>
  <div id='posts_wrapper_20' class='clearfix'>
    <div id='posts_20' class='posts'>
      <span>2022-04-17</span> <span><a href='/stuff/030-unpublished.html'>Unpublished Post 030</a> <i class='jekyll_draft'>Draft</i></span>
    </div>
  </div>
</div>

The JavaScript searches for images in the current page that were created by the jekyll_img plugin, and have ids that correspond to outline sections.

Each of following image’s ids have an outline_ prefix, followed by a number, which corresponds to one of the sections. Note that leading zeros in the first column above are not present in the ids below.

Headings that do not have corresponding pages are not displayed.

If you want to provide images to embed at appropriate locations within the outline, wrap them within an invisible div so the web page does not jump around as the images are loaded.

Shell
<div style="display: none;">
  {% img align="right"
    id="outline_0"
    size="quartersize"
    src="/assets/images/porcelain_washbasin.webp"
    style="margin-top: 0"
    wrapper_class="clear"
  %}
  {% img align="right"
    id="outline_20"
    size="quartersize"
    src="/assets/images/pipes.webp"
    style="margin-top: 0"
    wrapper_class="clear"
  %}
  {% img align="right"
    id="outline_40"
    size="quartersize"
    src="/assets/images/libgit2.webp"
    style="margin-top: 0"
    wrapper_class="clear"
  %}
</div>

The JavaScript identifies the images and repositions them in the DOM such that they follow the appropriate heading. If no image corresponds to a heading, no error or warning is generated. The images can be located anywhere on the page; they will be relocated appropriately. If an image does not correspond to a heading, it is deleted.

Attribution

See the jekyll_plugin_support plugin for an explanation of attribution.

Demo

A demo / test website is provided in the demo directory. It can be used to debug the plugin or to run freely. Please examine the HTML files in the demo to see how the plugin works.

  1. To run the demo freely from the command line, type:
    Shell
    $ demo/_bin/debug -r
  2. View the generated website at localhost:4444.
* indicates a required field.

Please select the following to receive Mike Slinn’s newsletter:

You can unsubscribe at any time by clicking the link in the footer of emails.

Mike Slinn uses Mailchimp as his marketing platform. By clicking below to subscribe, you acknowledge that your information will be transferred to Mailchimp for processing. Learn more about Mailchimp’s privacy practices.