blog-software-java/src/main/java/eu/m724/blog/Template.java
2025-01-07 11:41:30 +01:00

25 lines
647 B
Java

package eu.m724.blog;
import java.io.IOException;
import java.nio.file.Files;
import java.nio.file.Path;
public class Template {
private final Path templateDirectory;
public Template(Path templateDirectory) {
this.templateDirectory = templateDirectory;
}
public String postTemplate() throws IOException {
return Files.readString(templateDirectory.resolve("article_template.html"));
}
public String indexTemplate() throws IOException {
return Files.readString(templateDirectory.resolve("index.html"));
}
public void copyStatic() {
templateDirectory.resolve("static").co
}
}