forked from ewfm/ewfm
OMG THEME DEVS ARE HAPPY NOW
This commit is contained in:
parent
1bc67b3e9f
commit
0b5bde109f
1 changed files with 12 additions and 12 deletions
24
main.rb
24
main.rb
|
@ -100,53 +100,53 @@ for file in workspace
|
||||||
|
|
||||||
content = renderer.render(raw_content)
|
content = renderer.render(raw_content)
|
||||||
|
|
||||||
if product.include? "{SITE_NAME}"
|
while product.include? "{SITE_NAME}"
|
||||||
product["{SITE_NAME}"]= site_name
|
product["{SITE_NAME}"]= site_name
|
||||||
end
|
end
|
||||||
|
|
||||||
if product.include? "{SITE_DOMAIN}"
|
while product.include? "{SITE_DOMAIN}"
|
||||||
product["{SITE_DOMAIN}"]= site_domain
|
product["{SITE_DOMAIN}"]= site_domain
|
||||||
end
|
end
|
||||||
|
|
||||||
if product.include? "{PAGE_TITLE}"
|
while product.include? "{PAGE_TITLE}"
|
||||||
product["{PAGE_TITLE}"]= title
|
product["{PAGE_TITLE}"]= title
|
||||||
end
|
end
|
||||||
|
|
||||||
if product.include? "{DIRECTORY_A}"
|
while product.include? "{DIRECTORY_A}"
|
||||||
product["{DIRECTORY_A}"]= da.join()
|
product["{DIRECTORY_A}"]= da.join()
|
||||||
end
|
end
|
||||||
|
|
||||||
if product.include? "{DIRECTORY_P}"
|
while product.include? "{DIRECTORY_P}"
|
||||||
product["{DIRECTORY_P}"]= dp.join()
|
product["{DIRECTORY_P}"]= dp.join()
|
||||||
end
|
end
|
||||||
|
|
||||||
if product.include? "{DIRECTORY_SLASH_A}"
|
while product.include? "{DIRECTORY_SLASH_A}"
|
||||||
product["{DIRECTORY_SLASH_A}"]= dsa.join()
|
product["{DIRECTORY_SLASH_A}"]= dsa.join()
|
||||||
end
|
end
|
||||||
|
|
||||||
if product.include? "{DIRECTORY_SLASH_P}"
|
while product.include? "{DIRECTORY_SLASH_P}"
|
||||||
product["{DIRECTORY_SLASH_P}"]= dsp.join()
|
product["{DIRECTORY_SLASH_P}"]= dsp.join()
|
||||||
end
|
end
|
||||||
|
|
||||||
if product.include? "{PAGE_CONTENT}"
|
while product.include? "{PAGE_CONTENT}"
|
||||||
product["{PAGE_CONTENT}"]= content
|
product["{PAGE_CONTENT}"]= content
|
||||||
end
|
end
|
||||||
|
|
||||||
if raw_content.include? "$EWFM$"
|
while raw_content.include? "$EWFM$"
|
||||||
product["$EWFM$"]= "<p>This page has been generated by ewfm using the " + theme + " theme!</p>"
|
product["$EWFM$"]= "<p>This page has been generated by ewfm using the " + theme + " theme!</p>"
|
||||||
end
|
end
|
||||||
|
|
||||||
if raw_content.include? "$THEME$"
|
while raw_content.include? "$THEME$"
|
||||||
product["$THEME$"]= theme
|
product["$THEME$"]= theme
|
||||||
end
|
end
|
||||||
|
|
||||||
if raw_content.include? "$TIME$"
|
while raw_content.include? "$TIME$"
|
||||||
time = DateTime.now
|
time = DateTime.now
|
||||||
cdt = time.strftime "%d/%m/%Y %H:%M:%S"
|
cdt = time.strftime "%d/%m/%Y %H:%M:%S"
|
||||||
product["$TIME$"]= cdt
|
product["$TIME$"]= cdt
|
||||||
end
|
end
|
||||||
|
|
||||||
if raw_content.include? "$RUBY$"
|
while raw_content.include? "$RUBY$"
|
||||||
product["$RUBY$"]= RUBY_VERSION
|
product["$RUBY$"]= RUBY_VERSION
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue