Aggiornamenti sul modo migliore per creare un archivio HTML di un sito statico?

L’ho fatto di recente, ed è così che l’ho fatto.

 def serve
    file_path = File.expand_path(
      params[:path]+"."+params[:format],
      File.join(File.dirname(__FILE__), "../../public")
    )
    if File.file?(file_path)
      send_file file_path, type: "text/html", disposition: "inline"
    else
      render plain: "404 Not Found", status: 404
    end
  end