playframework / playframework/twirl

Extension fallback

Open
#119 0 comments 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 think it is useful to add extension fallback feature to SbtTwirl.
It will work as follows.

  • If you have set formatFallback: SettingKey[Option[String]] and template's extension does not match any in templateFormats, then formatFallback will be used.
    (formatFallback will be Some("play.twirl.api.TxtFormat"))

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 locating the SbtTwirl code that matches template extensions against templateFormats and handles format settings. Verify the requested behavior for an unmatched extension: when formatFallback is configured, it should be used, including the stated TxtFormat value; add or update tests if the relevant test entry point is found.

Written by the indexing model from the issue text.

Assessment

Tech stack
scala
Domain
build-system
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.