From eb32d8d4a1e2bd50e5416fcfefd72dfe6da1a7bb Mon Sep 17 00:00:00 2001 From: Li Haoyi Date: Mon, 13 Aug 2018 00:42:18 +0800 Subject: Add scalatags example --- docs/pages/1 - Cask: a Scala HTTP micro-framework .md | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'docs/pages/1 - Cask: a Scala HTTP micro-framework .md') diff --git a/docs/pages/1 - Cask: a Scala HTTP micro-framework .md b/docs/pages/1 - Cask: a Scala HTTP micro-framework .md index 7ed6916..b41fbe6 100644 --- a/docs/pages/1 - Cask: a Scala HTTP micro-framework .md +++ b/docs/pages/1 - Cask: a Scala HTTP micro-framework .md @@ -184,6 +184,17 @@ Cask provides some convenient helpers `cask.Redirect` and `cask.Abort` which you can return; these are simple wrappers around `cask.Request`, and simply set up the relevant headers or status code for you. +### HTML Rendering + +Cask doesn't come bundled with HTML templating functionality, but it makes it +really easy to use community-standard libraries like +[Scalatags](https://github.com/lihaoyi/scalatags) to render your HTML. Simply +adding the relevant `ivy"com.lihaoyi::scalatags:0.6.7"` dependency to your +`build.sc` file is enough to render Scalatags templates: + +$$$scalatags + + ### Extending Endpoints with Decorators -- cgit v1.2.3