diff --git a/.gitignore b/.gitignore
index 209a4d6799e59d7892fba4b50eb57b6ced53d7c7..a95163ca706b117b19ad46599ddf3ab87bff8f6d 100644
--- a/.gitignore
+++ b/.gitignore
@@ -10,4 +10,5 @@ build/
 .gradle/
 buildCMake/
 install/
-
+index.html
+public/
diff --git a/build.gradle b/build.gradle
index 4e0dab8f4e4b9ee9b0348111074e6a9077c14713..8919eef251d47e3959b0c98942f84c2d6cf14589 100644
--- a/build.gradle
+++ b/build.gradle
@@ -56,3 +56,23 @@ jacocoTestReport {
 // Finalize test task with jacocoTestReport function
 test.finalizedBy(jacocoTestReport)
 
+
+task formatIndex(type: Copy) {
+  from 'index_template.html'
+  into '.'
+  rename { String fileName -> fileName.replace("index_template.html", "index.html")}
+  // Substitute property references in files
+  //expand(version: "${project.version}")
+  def remote = "git rev-parse --abbrev-ref --symbolic-full-name @{u}".execute().text.trim().split('/')[0]
+  def url = "git remote get-url $remote".execute().text.trim()
+  def pageurl = ""
+  if(url.contains("github.com")){
+	pageurl = "https://darrivau.github.io/Testproject"
+  }
+  if(url.contains("lis-lab.fr")){
+  	pageurl = "http://denis.arrivault.pages.lis-lab.fr/Test_Project"
+  }
+  println(pageurl)
+}
+
+javadoc.finalizedBy formatIndex
diff --git a/index.html b/index.html
deleted file mode 100644
index 46e543ad8d52def16419cf18acc341de51daf561..0000000000000000000000000000000000000000
--- a/index.html
+++ /dev/null
@@ -1,14 +0,0 @@
-<html>
-<head>
-<title>Test Project web pages</title>
-</head>
-<body>
-<h3>Welcome to my super Test Project web pages</h3>
-<ul>
-<li><a href="http://denis.arrivault.pages.lis-lab.fr/Test_Project/Tests_Results/">See the unit tests report</a></li>
-<li><a href="http://denis.arrivault.pages.lis-lab.fr/Test_Project/Jacoco/">See the Jacoco coverage report</a></li>
-<li><a href="http://denis.arrivault.pages.lis-lab.fr/Test_Project/Javadoc/">See the javadoc</a></li>
-<li><a href="http://denis.arrivault.pages.lis-lab.fr/Test_Project/ImmutableComplex.jar" download="ImmutableComplex.jar">Download the executable jar</a>
-</ul>
-</body>
-</html>
\ No newline at end of file
diff --git a/index_github.html b/index_github.html
deleted file mode 100644
index c5157a8ff878edf4cec8e9dc2e745e07730ca2f6..0000000000000000000000000000000000000000
--- a/index_github.html
+++ /dev/null
@@ -1,14 +0,0 @@
-<html>
-<head>
-<title>Test Project web pages</title>
-</head>
-<body>
-<h3>Welcome to my super Test Project web pages</h3>
-<ul>
-<li><a href="https://darrivau.github.io/Testproject/Tests_Results/">See the unit tests report</a></li>
-<li><a href="https://darrivau.github.io/Testproject/Jacoco/">See the Jacoco coverage report</a></li>
-<li><a href="https://darrivau.github.io/Testproject/Javadoc/">See the javadoc</a></li>
-<li><a href="https://darrivau.github.io/Testproject/ImmutableComplex.jar" download="ImmutableComplex.jar">Download the executable jar</a>
-</ul>
-</body>
-</html>
\ No newline at end of file
diff --git a/index_template.html b/index_template.html
new file mode 100644
index 0000000000000000000000000000000000000000..2ba034a159ce7129baabdb7b85488eacdbfc0049
--- /dev/null
+++ b/index_template.html
@@ -0,0 +1,14 @@
+<html>
+<head>
+<title>Test Project web pages</title>
+</head>
+<body>
+<h3>Welcome to my super Test Project web pages</h3>
+<ul>
+<li><a href="${pageurl}/Tests_Results/">See the unit tests report</a></li>
+<li><a href="${pageurl}/Jacoco/">See the Jacoco coverage report</a></li>
+<li><a href="${pageurl}/Javadoc/">See the javadoc</a></li>
+<li><a href="${pageurl}/ImmutableComplex-${version}.jar" download="ImmutableComplex-${version}.jar">Download the executable jar</a>
+</ul>
+</body>
+</html>
\ No newline at end of file
diff --git a/public/ImmutableComplex.jar b/public/ImmutableComplex.jar
deleted file mode 100644
index f045c766069282966ac991584d861525e4505cf2..0000000000000000000000000000000000000000
Binary files a/public/ImmutableComplex.jar and /dev/null differ