Just the Docs Theme & Search Setup
Table of contents
- Theme Overview
- Search Functionality
- Navigation Structure
- Customization Options
- Page Layout Options
- Advanced Features
- Local Development
- Deployment
- Troubleshooting
- Resources
Theme Overview
TVx documentation now uses Just the Docs, a modern, highly customizable Jekyll theme with powerful built-in search functionality.
Why Just the Docs?
- π Built-in Search - Fast, client-side search with previews
- π¨ Dark Mode - Beautiful dark color scheme by default
- π± Responsive - Works perfectly on all devices
- π Fast - Optimized for performance
- π― Navigation - Auto-generated sidebar from front matter
- π Anchor Links - Every heading gets an anchor
- π Clean Typography - Excellent readability
Search Functionality
Built-in Search (Default)
Just the Docs includes a powerful search feature thatβs:
- Client-side - No server required, works on GitHub Pages
- Fast - Instant results as you type
- Smart - Searches headings, content, and page titles
- Preview - Shows context around matches
- Configurable - Customize behavior in
_config.yml
Search Configuration
Current settings in _config.yml:
1
2
3
4
5
6
7
8
9
search_enabled: true
search:
heading_level: 2 # Include h2 headings in search
previews: 3 # Show 3 preview snippets per result
preview_words_before: 5 # Words before match in preview
preview_words_after: 10 # Words after match in preview
tokenizer_separator: /[\s/]+/
rel_url: true
button: true
Alternative Search Options
If you need more advanced search, here are three excellent options:
1. Algolia DocSearch (Recommended for Popular Projects)
Pros:
- π Ultra-fast, hosted search
- π¨ Beautiful UI with keyboard shortcuts
- π Auto-indexes your site
- π° Free for open-source documentation
Setup:
1
2
3
4
5
6
7
8
# _config.yml
plugins:
- jekyll-algolia
algolia:
application_id: YOUR_APP_ID
index_name: YOUR_INDEX_NAME
search_only_api_key: YOUR_SEARCH_KEY
Apply: https://docsearch.algolia.com/apply/
2. Lunr.js (Just the Docs Default)
Pros:
- β Already integrated in Just the Docs
- π¦ No external dependencies
- π Privacy-friendly (no tracking)
- π» Works offline
Cons:
- Limited to smaller sites (< 500 pages)
- Basic relevance ranking
This is what weβre currently using! No additional setup needed.
3. Custom Google Search
Pros:
- π Leverages Googleβs powerful search
- π Search analytics
- π¨ Customizable appearance
Setup:
- Create a Custom Search Engine at cse.google.com
- Add this to your layout:
1
2
<script async src="https://cse.google.com/cse.js?cx=YOUR_CX_ID"></script>
<div class="gcse-search"></div>
Navigation Structure
Pages are ordered using nav_order in front matter:
1
2
3
4
5
---
layout: default
title: Page Title
nav_order: 1 # Lower numbers appear first
---
Current Navigation Order:
- Home (Landing Page)
- Installation
- Usage
- Troubleshooting
- Development
- Server Implementation
- Bug Fix System
- Bug Fix Documentation
Customization Options
Color Schemes
Available built-in schemes:
dark(current)lightcustom(define your own)
Change in _config.yml:
1
color_scheme: dark
Custom Color Scheme
Create _sass/color_schemes/tvx.scss:
1
2
3
4
5
$body-background-color: #1a1a1a;
$sidebar-color: #2d2d2d;
$link-color: #b5e853;
$btn-primary-color: #b5e853;
$base-button-color: #f3f3f3;
Then use it:
1
color_scheme: tvx
Logo
Add your logo to _config.yml:
1
logo: "/assets/images/tvx-logo.png"
Aux Links (Top Right)
Currently configured:
1
2
3
4
5
aux_links:
"GitHub":
- "//github.com/dopeytree/TVx"
"Sponsor β€οΈ":
- "//github.com/sponsors/dopeytree"
Page Layout Options
Home Layout
Landing pages use layout: home:
1
2
3
4
5
6
7
---
layout: default
title: Home
nav_order: 1
description: "Your description"
permalink: /
---
Default Layout
Standard documentation pages:
1
2
3
4
5
---
layout: default
title: Page Title
nav_order: 2
---
No Nav Pages
Exclude from navigation:
1
2
3
4
5
---
layout: default
title: Hidden Page
nav_exclude: true
---
Advanced Features
Callouts
Create attention-grabbing blocks:
1
2
3
4
5
6
7
8
{: .note }
> This is a note callout
{: .warning }
> This is a warning callout
{: .important }
> This is an important callout
Code Blocks with Line Numbers
1
2
3
4
kramdown:
syntax_highlighter_opts:
block:
line_numbers: true
Table of Contents
Auto-generate TOC for any page:
1
2
3
4
5
## Table of contents
{: .no_toc .text-delta }
1. TOC
{:toc}
Buttons
1
2
[Get Started](installation.md){: .btn .btn-primary }
[View on GitHub](https://github.com){: .btn }
Local Development
Start Server
1
2
3
cd docs
bundle install
jekyll serve --host 0.0.0.0 --port 4000 --baseurl /TVx
Visit: http://localhost:4000/TVx/
Live Reload
Changes to markdown files auto-reload. Restart for _config.yml changes.
Build Site
1
bundle exec jekyll build
Output in _site/ directory.
Deployment
GitHub Pages
- Push changes to your branch
- GitHub Actions automatically builds with Just the Docs
- Site live at:
https://dopeytree.github.io/TVx/
Custom Domain
Add CNAME file to /docs:
1
docs.tvx.example.com
Then configure DNS:
1
CNAME docs -> dopeytree.github.io
Troubleshooting
Search not working
- Check
search_enabled: truein_config.yml - Rebuild site:
bundle exec jekyll build - Clear browser cache
Sidebar not showing
- Verify
nav_orderin front matter - Check layout is
defaultorhome - Ensure page is not
nav_exclude: true
Theme not loading
- Verify
remote_theme: just-the-docs/just-the-docs - Run
bundle install - Check GitHub Pages build status