Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to add html content to maven site generated by the maven site plugin?

I am using the maven site plugin to generate a project site. This creates a default site and can be viewed under src/target/index.html. I need to add content to the index. How can this be done?

ON reading the maven documentation, I created an index.apt under the src/site folder. How do I get the content of this file to show up in the index.html page in the target folder?

like image 371
user_mda Avatar asked Feb 02 '26 18:02

user_mda


1 Answers

I am using Maven 3.3.9
My solution was to add an index.html file under ${baseDir}/src/site/resources.
Then run:

mvn clean site

Your index.html file should replace the default one.

like image 139
Ryan Pelletier Avatar answered Feb 04 '26 06:02

Ryan Pelletier