Uploaded image for project: 'Tamaya'
  1. Tamaya
  2. TAMAYA-178 Create new homepage skeleton based on jBake
  3. TAMAYA-220

Bug: unable to inject custom variable in Thymeleaf and markdown templates

    XMLWordPrintableJSON

Details

    • Sub-task
    • Status: Closed
    • Major
    • Resolution: Fixed
    • None
    • 0.3-incubating
    • Website
    • None

    Description

      The template `templates/menu.thyme` contains a reference to the generated javadoc and relies on the variable:

      tamaya_version=0.3-incubating-SNAPSHOT
      

      At the moment the variable is available in markdown/asciidoc pages, but not in Thymeleaf:
      https://github.com/jbake-org/jbake/issues/326

      Working:

      • Asciidoc
        jbake.properties:
        asciidoctor.attributes.export=true
        foo_version=0.1.2-SNAPSHOT
        
        example in adoc:
        <version>{foo_version}</version>
        
      • Thymeleaf
        jbake.properties:
        foo_version=0.1.2-SNAPSHOT
        
        need to use Thymeleaf directives, a direct input into tags is not supported:
        th:text="'Javadoc '+ ${config.foo_version} +' (external)'"
        
      • Markdown
        Does not yet support variables - need to move templates to Asciidoc in order to use variables!

      Attachments

        Activity

          People

            pottlinger Philipp Ottlinger
            pottlinger Philipp Ottlinger
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: