Skip to content

Scalate integration for Play Framework

License

Notifications You must be signed in to change notification settings

scalate/play-scalate

This branch is 197 commits ahead of, 1 commit behind tototoshi/play-scalate:master.

Folders and files

NameName
Last commit message
Last commit date

Latest commit

4f74092 · Mar 17, 2025
Feb 4, 2025
Dec 11, 2017
May 16, 2023
Mar 17, 2025
Oct 26, 2014
Dec 9, 2020
Oct 26, 2014
May 16, 2023
Jan 10, 2025
Oct 8, 2022

Repository files navigation

play-scalate

Install

libraryDependencies ++= Seq(
  "org.scalatra.scalate" %% "play-scalate" % "0.5.0",
  "org.scalatra.scalate" %% "scalate-core" % "1.9.1",
  "org.scala-lang" % "scala-compiler" % scalaVersion.value
)

Compile / unmanagedResourceDirectories += baseDirectory.value / "app" / "views"

Usage

package controllers

import javax.inject.{ Inject, Singleton }

import com.github.tototoshi.play2.scalate._
import play.api.mvc._

@Singleton
class JadeController @Inject() (scalate: Scalate, val controllerComponents: ControllerComponents) extends BaseController {

  def index = Action { implicit request =>
    Ok(scalate.render("index.jade", Map("message" -> "hello, jade")))
  }

}

About

Scalate integration for Play Framework

Resources

License

Stars

Watchers

Forks

Languages

  • Scala 96.7%
  • Pug 1.7%
  • Shell 1.1%
  • Mustache 0.5%