Skip to content

harmoniqs/DocumenterCopyButton.jl

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

DocumenterCopyButton.jl

A Documenter.jl plugin that adds floating "Copy as Markdown" and "Open in AI" buttons to opted-in documentation pages.

Quick Start

Add DocumenterCopyButton to your docs environment, then pass the plugin to makedocs:

using Documenter
using DocumenterCopyButton

makedocs(;
    plugins = [CopyButton()],
    # ...
)

Then add a @copybutton block to any page you want to enable:

```@copybutton
```

The page will show floating buttons in the bottom-right corner:

  • Copy — copies the page's markdown source to the clipboard
  • AI — dropdown to open the page in Claude, ChatGPT, Perplexity, and more

Features

  • Works offline and with file:// URLs — markdown is embedded directly in the HTML
  • Bulma-native theming — inherits Documenter's active theme (light, dark, catppuccin, etc.)
  • Custom source files — point to a Literate.jl script or any other file
  • Configurable AI providers and prompt prefix

Usage with Literate.jl

In Literate.jl source files, add the block as a comment:

# ```@copybutton
# literate/tutorials/my_tutorial.jl
# ```

# # My Tutorial
using MyPackage
# ...

Documentation

See the full documentation for details on configuration, custom providers, and more.

About

Documenter.jl plugin that adds floating Copy as markdown and Open in AI buttons to documentation pages

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors