added footer support
[asciidoctor_to_rss.git] / src / main / java / net / wpitchoune / asciidoctor / HTML.java
index 8c3bc0b..9e150bf 100644 (file)
@@ -76,9 +76,11 @@ public final class HTML {
        }   
        
         
-       public static void appendHTMLFooter(StringBuffer sb) {
-               sb.append("</body>\n");
-               sb.append("</html>");           
+       private void appendHTMLFooter(StringBuffer sb) throws IOException {
+               sb.append(new String(Files.readAllBytes(config.getHTMLFooterFile().toPath()),
+                                    StandardCharsets.UTF_8));
+               appendEndTag(sb, "body", 1, true);
+               appendEndTag(sb, "html", 0, false);
        }                     
        
        public String toHTML(SyndEntry entry) throws IOException {
@@ -181,7 +183,7 @@ public final class HTML {
                                
                buf.append("</div>\n");
                
-               HTML.appendHTMLFooter(buf);
+               appendHTMLFooter(buf);
                
                return buf.toString();
        }