Docc Plugin Hot Reload

Hello, is there any way to enable hot reload while previewing a documentation using the docc plugin? Although the changes are monitored, the browser does not automatically reload.


You're correct that the browser does not automatically reload in sync with the updated compilation that occurs in preview mode as the content is updated. I can definitely see the benefit in making something like this work in the future though.


I'm currently working with two screens, where on one I edit the documentation and on the other I have the preview running in a browser. So I have to keep changing the focus between screens to reload the browser and see the changes and I often end up reloading the editing screen by accident.

If you use Safari, you might find the following script useful. Maybe you can have your build process run it automatically, or bind it to a key in your editor, or run it automatically using entr. Change targetUrl to something appropriate for you.

The script tells Safari to reload and activate the first tab it finds whose url starts with targetUrl, or (if no such tab exists) to create and activate a tab showing targetUrl.

#!/usr/bin/osascript -lJavaScript

(() => {
    const targetUrl = 'http://localhost/your/url/here/';
    const safari = Application('Safari');

    for (const w of {
        // Inspectors don't have tabs.
        if (w.currentTab() === null) {

        for (const t of w.tabs()) {
            if (t.url().startsWith(targetUrl)) {
                safari.doJavaScript('location.reload()', { in: t });

                // Activate the tab.
                w.currentTab = t;

                // Raise the window.
                w.index = 1;


    if ( < 1) {
        let w = safari.Window();;

    let w =[0];
    let t = safari.Tab({ url: targetUrl });
    w.currentTab = t;
    w.index = 1;
1 Like