使用 Maven Site 插件呈现 Asciidoctor 文档时过度处理属性

Overhanding properties when rendering Asciidoctor documents with Maven Site plugin

我的 Maven 站点包含几个 Asciidoctor 文档。我想使用在 Maven Site 插件的配置中声明的属性,但似乎它们不会过度交给 Asciidoctor。

<plugin>

  <artifactId>maven-site-plugin</artifactId>

  <dependencies>
        
    <dependency>
      <groupId>org.asciidoctor</groupId>
            
      <artifactId>asciidoctor-maven-plugin</artifactId>
                 
    </dependency>
        
              
  </dependencies>
    
  <configuration>
        
    <attributes>

      <ta>ddd</ta>

    </attributes>
    
  </configuration>
</plugin>


这是我如何尝试在我的 Asciidoctor 文档中使用属性 ta 的示例。

= Example Document

Value of ta is: {ta}

如何在我的 Asciidoctor 文档中使用为 Maven Site 插件定义的属性?

目前(自 AsciidoctorJ 1.52 起)无法在 Asciidoctor 文档中使用 Maven 站点的属性。

我就此提出了一个问题 (https://github.com/asciidoctor/asciidoctor-maven-plugin/issues/170)。

暂时我找到了解决方法。我使用资源插件将所有属性写入文件并将该文件包含在我的文档中。解决方法。直接访问定义的属性会更方便。