A long-lived project that still receives updates
A Jekyll plugin + theme that scans assets/documents/**, creates a collection item per file, adds metadata (title/date/category), outputs pages, generates a JSON index for Lunr, and integrates with jekyll-sitemap.
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
2025
2026
 Dependencies

Development

~> 13.0
~> 3.12
~> 0.9

Runtime

>= 4.0
 Project Readme

jekyll-documents

Turn files in assets/documents/ into browsable document pages with icons, categories, and search.

Features:

  • Auto-collection from files
  • File type icons (4 styles)
  • Categories from folders
  • Client-side search
  • Strict validation

Quick Start

# Gemfile
gem "jekyll-documents"
# _config.yml
plugins:
  - jekyll-documents

documents:
  icon_set: "color"  # color, lines, minimal, ultra-minimal
# Add files
assets/documents/reports/2026-03-01_Annual_Report.pdf
assets/documents/minutes/2026-02-15_Board_Meeting.docx
<!-- Use in templates -->
{% include latest_documents.html %}
{% include documents_list.html %}
{% include category_list.html %}

Requirements

Ruby >= 2.7, Jekyll >= 4.0

File Naming

Format: YYYY-MM-DD_Title_With_Underscores.ext

assets/documents/reports/2026-03-01_Annual_Report.pdf
assets/documents/minutes/2026-02-15_Board_Meeting.docx
  • Date: YYYY-MM-DD
  • Title: Underscores → spaces
  • Category: From folder name

File Type Icons

The plugin automatically displays file type icons for all supported formats. Icons are included in the gem and based on designs from svgrepo.com.

Icon Sets: color (default), lines, minimal, ultra-minimal

Supported: PDF, DOCX, XLSX, PPTX, ODT, ODS, ODP, TXT, ZIP, MP3, MP4, JPG, PNG, HTML, XML, CSV, RTF

Configuration:

documents:
  icon_set: "color"  # color, lines, minimal, ultra-minimal

Icons appear in: document pages, lists, search results, category folders

Liquid filters:

{{ page.file_type | file_type_icon_tag }}
{{ page.file_type | file_type_icon }}

Icons from svgrepo.com

Includes

{% include latest_documents.html count=5 %}
{% include documents_list.html %}
{% include category_list.html %}
{% include documents_search.html %}

Search

<script src="https://unpkg.com/lunr/lunr.js"></script>
<script src="{{ '/assets/js/documents-search.js' | relative_url }}"></script>

Configuration

documents:
  root: "assets/documents"
  permalink: "/documents/:category/:slug/"
  icon_set: "color"  # color, lines, minimal, ultra-minimal
  include_extensions: [".pdf", ".docx", ".pptx", ".xlsx"]
  strict_filename: true
  json_index: true

See configuration.rb for all options.

Development

bundle install
bundle exec rspec       # Run tests
bundle exec rake doc    # Generate docs
cd example && bundle exec jekyll serve  # Example site

1. Bump version

./bump_version.sh patch # or minor/major

2. Update CHANGELOG.md

3. Commit and push

git add . git commit -m "Bump version to X.Y.Z" git push

4. Create GitHub release

→ Automatically publishes to RubyGems!

License

AGPL-3.0-only

Attribution

Icons by SVG Repo