playframework / playframework/twirl

pluggable template post-compilation rendering (by extension) support

Open
#29 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

status:backlog
Dominant language
Scala
Stars
561
Forks
118
Avg merge
1d 15h
Merged PRs (30d)
29

Description

I'd like to see post-processing support beyond the existing format options:

Template files must be named {name}.scala.{ext} where ext can be html, js, xml, or txt.

For example, a .scala.jade file would compile from twirl into scala, then the embedded text would convert from jade into html (which I imagine would show errors in context of jade code for easier debugging) or: jade processes into html, then from there into scala (which is probably more efficient). These are my assumptions without knowing too much of twirl's underlying architecture.

Is this a feature worth pursuing?

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reviewing Twirl's existing format options and template compilation architecture, then determine where extension-based post-processing would be configured. A complete issue would specify supported extensions, processing order, error behavior, and tests demonstrating the .scala.{ext} flow.

Written by the indexing model from the issue text.

Assessment

Tech stack
scala
Domain
tooling
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.