Redirect subdomain to Root Serve content from subdomain

I have a website website.com which is a rails powered legacy website. We are using caddy to serve static assets of our rails website.

We render our blog at website.com/blog/{uri}

The process is tedious for us

  1. Write content in markdown
  2. Import images and everything in static website generator jekyll
  3. build and minify jekyll website for each new article
  4. copy all the static files into the rails website where it will be served.

Can we instead just deploy the blog on blog.website.com and have it rendered on website.com/blog/ with all the pages?

How can we do this in Caddy?

I’m not too sure I understand the question.

I think you might be looking for Caddy’s templates feature?

You can render markdown on the fly with this. It’s how the Caddy docs website is built!

Could you be a bit more specific? I don’t understand this part: