Skip to content

Interactive Julia documentation portal with syntax highlighting, search, and user examples.

Notifications You must be signed in to change notification settings

gamila-wisam/UltimateJuliaDocs

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Ultimate Julia Documentation Portal

A prototype documentation engine for Julia packages that automatically extracts docstrings, generates clean per-symbol HTML pages, and provides fast, client-side search — inspired by and designed to complement Documenter.jl.

This project explores how Julia’s documentation system works internally and demonstrates how a full documentation portal can be built from first principles using Julia’s reflection and doc APIs.

Overview

The Ultimate Julia Documentation Portal is a static documentation generator for Julia modules. Given a Julia module, it:

  • Inspects its public API.

  • Extracts docstrings, signatures, and metadata.

  • Generates a modern HTML documentation website.

  • Produces one page per function, struct, and constant.

The goal is to understand — and extend — the ideas behind Julia’s documentation tooling by building a complete, standalone system.

Features

  • One Page per Symbol

  • Generates a dedicated HTML page for each:

  • Function

  • Struct

  • Constant

  • Clean URLs (e.g. add.html, Person.html)

Includes:

  • Docstring

  • Function signatures

  • Source location (for functions)

  • Struct fields (for types)

Julia-Native Introspection

  • Uses Julia’s built-in documentation system (Base.Docs).

  • Extracts method signatures from the method table.

  • Filters symbols by module ownership.

  • Ignores undocumented or private bindings.

Client-Side Search

  • Static JSON search index.

  • Fast in-browser search using MiniSearch.

Features:

  • Fuzzy matching.

  • Boosted symbol-name ranking.

  • Search by name, module, or doc content.

Syntax Highlighting

  • Julia syntax highlighting via Prism.js

Highlighted:

  • Function signatures.

  • Docstring code blocks.

Dark Mode

  • Toggleable dark/light theme.

  • Preference stored in localStorage.

Fully Static Output

  • No server required.

  • Works with GitHub Pages or any static host.

  • All pages and search data generated ahead of time.

Example: Input Module

The project includes a small test module with:

  • Functions

  • A struct

  • A constant

  • Proper docstrings

This ensures the documentation engine handles different Julia symbol types correctly.

How It Works

  • Symbol Discovery

  • Public names are collected using names(mod; all=false)

  • Docstring Extraction

  • Uses Base.Docs.doc

  • Renders Markdown to plain text

  • Metadata Collection

  • Function signatures from methods

  • Source file and line numbers

  • Struct field names and types

  • HTML Generation

  • One page per symbol

  • Module overview page

  • Global index page

  • Search Index Creation

  • JSON index generated at build time

  • Loaded and queried client-side

Usage

include("src/UltimateJuliaDocs.jl") include("src/MyTestModule.jl")

using Main.UltimateJuliaDocs using Main.MyTestModule

items = collect_docs(MyTestModule) render_all_html(items, MyTestModule)

This generates the full documentation website in the docs/ directory.

Project Goals

  1. Demonstrate deep understanding of Julia’s documentation system

  2. Explore how documentation tools like Documenter.jl work internally

  3. Prototype advanced documentation features such as:

  • Per-symbol pages

  • Search ranking

  • Frontend UX improvements

  • Serve as a foundation for future extensions

Planned Enhancements

  1. Module-qualified URLs (/reference/Base/sort)

  2. Backlinks between related symbols

  3. Better search result snippets with highlighting

  4. Versioned documentation

  5. JuliaSyntax-based highlighting

  6. LaTeX / PDF output

  7. User-contributed examples and notes

Status

This project is an active prototype. The current implementation focuses on correctness, clarity, and architecture rather than full feature completeness.

Acknowledgements

Inspired by Julia’s official documentation ecosystem and the design philosophy of Documenter.jl.

About

Interactive Julia documentation portal with syntax highlighting, search, and user examples.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages