Markdown in directory results in literal `dir/.md`

1. Output of caddy version:


2. How I run Caddy:

caddy run

b. Command:

caddy run

d. My complete Caddy config:


3. The problem I’m having:

attempting to go into a directory with the default caddy website’s markdown directives, aka

{{$path := splitList "/" .OriginalReq.URL.Path}}
{{$mdfn := default "index" (slice $path 1 | join "/")}}
{{$mdfp := printf "/md/" $mdfn }}

and so i try to go into say, about which leads to, and none results in index, which ends up with i have a directory called extra that has inside it, however when i go to visit extra, it leads to extra/.md.

i have html i want to include in the markdown, which is handled with index.html and markdown via the directives i used.

4. Error messages and/or full log output:

2022/12/26 18:00:43.713 ERROR   http.handlers.reverse_proxy     aborting with incomplete response        {"error": "context canceled"}

5. What I already tried:

  1. using the ext or try_files directives, which won’t work for my setup

6. Links to relevant resources:

I’m not sure I follow… the error message doesn’t really line up with the problem statement. Can you give me instructions to reproduce what you’re seeing, from scratch, as minimally as possible?

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