Skip to content

A Solr response writer to use the Thymeleaf templating engine for HTML templating.

License

Notifications You must be signed in to change notification settings

cointify/solr-thymeleaf

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

17 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

solr-thymeleaf-responsewriter

travis ci build status

A Solr component to use the Thymeleaf template engine.

Installing the component

Configuring template resolving

Pass the template to render in the tl.template request parameter. You can configure Thymeleaf template resolving:

<queryResponseWriter name="html" class="com.s24.search.solr.response.ThymeleafResponseWriter">
     <str name="tl.templateMode">XHTML</str>
     <str name="tl.locale">de_de</str>
     <str name="tl.cacheTTLMs">3600000</str>
     <str name="tl.prefix">.html</str>
     <str name="tl.suffix">${solr.core.config}/templates/</str>
</queryResponseWriter>

The template context is prefilled with the current request, the request params and a solr response.

Building the project

This should install the current version into your local repository

$ export JAVA_HOME=$(/usr/libexec/java_home -v 1.7)
$ export MAVEN_OPTS="-Dmaven.wagon.http.ssl.insecure=true -Dmaven.wagon.http.ssl.allowall=true -Dmaven.wagon.http.ssl.ignore.validity.dates=true"
$ mvn clean install

Releasing the project to maven central

Define new versions

$ export NEXT_VERSION=<version>
$ export NEXT_DEVELOPMENT_VERSION=<version>-SNAPSHOT

Then execute the release chain

$ mvn org.codehaus.mojo:versions-maven-plugin:2.0:set -DgenerateBackupPoms=false -DnewVersion=$NEXT_VERSION
$ git commit -a -m "pushes to release version $NEXT_VERSION"
$ mvn -P release

Then, increment to next development version:

$ git tag -a v$NEXT_VERSION -m "`curl -s http://whatthecommit.com/index.txt`"
$ mvn org.codehaus.mojo:versions-maven-plugin:2.0:set -DgenerateBackupPoms=false -DnewVersion=$NEXT_DEVELOPMENT_VERSION
$ git commit -a -m "pushes to development version $NEXT_DEVELOPMENT_VERSION"
$ git push origin tag v$NEXT_VERSION && git push origin

License

This project is licensed under the Apache License, Version 2.

About

A Solr response writer to use the Thymeleaf templating engine for HTML templating.

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages