New file browse template

1. The problem I’m having:

I saw some nice pictures of the new file browse template on Matt’s twitter, and I am just curious if I can try it out already and how? I thought “browse” defaults to it already, but I still get the old template… and I also had no success when I manually downloaded the latest browse.html from GitHub and specified the path to it in [<template-file>].

3. Caddy version:

v2.6.4

4. How I installed and ran Caddy:

a. System environment:

DietPi v8.15.2 RPi 4 Model B (aarch64)

d. My complete Caddy config:

:80 {
        file_server {
                root /home/pi/pics
                browse /var/lib/caddy/browse.html
        }
}

I also tried without the path to the template file

:80 {
        file_server {
                root /home/pi/pics
                browse /var/lib/caddy/browse.html
        }
}

5. Links to relevant resources:

The new template: https://pbs.twimg.com/media/FsUVrYyXsAM3lon?format=jpg&name=medium
https://pbs.twimg.com/media/FsUVrZkWcAIWlq3?format=jpg&name=medium

1 Like

The new template isn’t in a tagged release yet. It was just merged to the master branch a few weeks ago. This is the commit:

You can copy the template from there for now if you like, or you can just build Caddy from that commit (or from master) to try it out.

1 Like

There’s also CI artifacts available here if you just want to download a build to try: (bottom of page)

Thanks, Francis and Matt, for your answers. However, I think I am not understanding everything completely.

So am I correct to think that I would just need to copy the latest browse.html from the link Francis provided or from the master brench?

atm I copied the 3 latest most recent changed files: browse.go, browse.html and browsetplcontext.go into /var/lib/caddy

My Caddyfile looks like this:

:80 {
        file_server {
                root /home/dietpi/pics
                browse /var/lib/caddy/browse.html
        }
}

However I am getting a blank screen on every browser…

I should have forgotten some files or directive somewhere, right?

I think you need to run the latest Caddy binary, simply replacing the template won’t do because there are changes to the compiled code needed to support the new browse template.

Okay Thanks Matt I’ll try that out!

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.