我在我的 Maven 项目中尝试了以下方法:
content.md
添加带有内容的降价文件
```java
int a = 4;
```
在src/main/site/markdown
.
写一个
site.xml
有内容的<?xml version="1.0" encoding="ISO-8859-1"?> <project> <skin> <groupId>org.apache.maven.skins</groupId> <artifactId>maven-fluido-skin</artifactId> <version>1.7</version> </skin> <body> <menu name="Dokumentation"> <item name="Benutzerhandbuch" href="content.html" /> </menu> <menu ref="reports" /> </body> </project>
写
pom.xml
一个<?xml version="1.0" encoding="UTF-8"?> <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> <modelVersion>4.0.0</modelVersion> <groupId>de.continentale.testsvn</groupId> <artifactId>site-test</artifactId> <version>0.0.1-SNAPSHOT</version> <build> <plugins> <plugin> <artifactId>maven-site-plugin</artifactId> <version>3.7.1</version> <dependencies> <dependency> <groupId>org.apache.maven.wagon</groupId> <artifactId>wagon-webdav-jackrabbit</artifactId> <version>2.6</version> </dependency> <dependency> <groupId>org.apache.maven.doxia</groupId> <artifactId>doxia-module-xhtml</artifactId> <version>1.8</version> </dependency> <dependency> <groupId>org.apache.maven.doxia</groupId> <artifactId>doxia-module-markdown</artifactId> <version>1.8</version> </dependency> </dependencies> </plugin> </plugins> </build> </project>
现在我content.html
从mvn site
. 在此文件中,不是int a = 4
语法突出显示。
我需要做什么才能获得语法突出显示?