我有多個html文件,這是要合併成一個單一的html文件。這些多個文件就像頁眉,頁腳等,這是多個文件通用的。我正在使用enlive的html-resource
方法。但是,該方法插入缺少的html標籤到最終文件中,我不想要。結合多個html片段文件與有活力,clojure
以下爲輸出地圖,
({:tag :html, :attrs nil, :content (
{:tag :head, :attrs nil, :content (
{:tag :meta, :attrs {:content text/html; charset=utf-8, :http-equiv Content-Type}, :content()}
{:tag :title, :attrs nil, :content (HewaniLife | Changing The Way You Live)}
{:tag :link, :attrs {:href styles/main.css, :rel stylesheet, :type text/css}, :content()})}
{:tag :body, :attrs nil, :content (
{:tag :html, :attrs nil, :content ({:tag :body, :attrs nil, :content ({:tag :div, :attrs {:id header}, :content (
{:tag :h1, :attrs nil, :content ({:tag :a, :attrs {:href index.xhtml, :id logo}, :content (
{:tag :span, :attrs {:class img-replace}, :content (hewaniLife)})})}
{:tag :div, :attrs {:id main-nav}, :content (
{:tag :ul, :attrs nil, :content (
{:tag :li, :attrs nil, :content ({:tag :a, :attrs {:href login.xhtml, :id btn-login}, :content (
{:tag :span, :attrs {:class img-replace}, :content (Login)})})}
{:tag :li, :attrs nil, :content ({:tag :a, :attrs {:href index.xhtml, :id btn-home}, :content (
{:tag :span, :attrs {:class img-replace}, :content (Home)})})}
{:tag :li, :attrs nil, :content ({:tag :a, :attrs {:href search.xhtml, :id btn-search}, :content (
{:tag :span, :attrs {:class img-replace}, :content (Search)})})})})}
{:type :comment, :data end of div#main-nav }
{:tag :br, :attrs {:class clear-all}, :content nil})} {:type :comment, :data end of div#header })})})})}
在這裏,你可以看到嵌套的HTML標記時,我插入的文件。
是否有任何方法可以插入這些文件..?
任何人都可以使用任何其他方法..?