Auto-Glossary Gem Documentation

Auto-Glossary is a Rails engine that automatically highlights and defines technical terms from Wikipedia glossaries in your Rails applications.

How This Site Adds Publisher Value

Auto-Glossary is not just a copy of source definitions. This project adds implementation guidance, integration patterns, and practical UI behavior that developers can reuse in production Rails apps.

The glossary terms come from Wikipedia (with attribution), while this documentation focuses on original engineering context: architecture decisions, setup trade-offs, accessibility behavior, and deployment practices.

We keep advertising limited to this long-form documentation screen so ads do not appear on utility pages or lightweight navigation states.

Installation

1. Add to your Gemfile

gem 'auto_glossary', '>= 0.1.1'

2. Install the gem

bundle install
rails generate auto_glossary:install

3. Use in your views

<%= mark_glossary_terms("Your content with technical terms") %>

Features

🔍 Automatic Detection

Automatically identifies and highlights technical terms in your content

📚 Wikipedia Integration

Fetches definitions from Wikipedia's comprehensive glossaries

⚡ Performance

Built-in caching (24 hours) for fast page loads

♿ Accessible

Fully keyboard accessible with proper ARIA labels

Configuration

Customize Auto-Glossary in config/initializers/auto_glossary.rb:

AutoGlossary.configure do |config|
  # Wikipedia glossary URL (default: Glossary of mycology)
  config.glossary_url = "https://en.wikipedia.org/wiki/Glossary_of_mycology"

  # Cache expiration time in seconds (default: 24 hours)
  config.cache_expiration = 86_400

  # Enable/disable caching (default: true)
  config.enable_caching = true
end

Usage Examples

Mycology Content

Input:

<%= mark_glossary_terms("The basidiospores are produced on the hymenium.") %>

Output:

The basidiospores are produced on the hymenium.

Custom Glossary

# Use a different Wikipedia glossary
AutoGlossary.configure do |config|
  config.glossary_url = "https://en.wikipedia.org/wiki/Glossary_of_biology"
end

Support & Contributing

Found a bug? Please open an issue on GitHub.

Want to contribute? Pull requests are welcome! Please read our contributing guidelines.

Need help? Check out our README or open a discussion on GitHub.