From 0b5bde109f20ebea29b55d3c536a0baf48f22c6d Mon Sep 17 00:00:00 2001 From: Celeste Date: Mon, 20 Sep 2021 17:25:26 +0100 Subject: [PATCH] OMG THEME DEVS ARE HAPPY NOW --- main.rb | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/main.rb b/main.rb index 677272e..8d582f3 100644 --- a/main.rb +++ b/main.rb @@ -100,53 +100,53 @@ for file in workspace content = renderer.render(raw_content) - if product.include? "{SITE_NAME}" + while product.include? "{SITE_NAME}" product["{SITE_NAME}"]= site_name end - if product.include? "{SITE_DOMAIN}" + while product.include? "{SITE_DOMAIN}" product["{SITE_DOMAIN}"]= site_domain end - if product.include? "{PAGE_TITLE}" + while product.include? "{PAGE_TITLE}" product["{PAGE_TITLE}"]= title end - if product.include? "{DIRECTORY_A}" + while product.include? "{DIRECTORY_A}" product["{DIRECTORY_A}"]= da.join() end - if product.include? "{DIRECTORY_P}" + while product.include? "{DIRECTORY_P}" product["{DIRECTORY_P}"]= dp.join() end - if product.include? "{DIRECTORY_SLASH_A}" + while product.include? "{DIRECTORY_SLASH_A}" product["{DIRECTORY_SLASH_A}"]= dsa.join() end - if product.include? "{DIRECTORY_SLASH_P}" + while product.include? "{DIRECTORY_SLASH_P}" product["{DIRECTORY_SLASH_P}"]= dsp.join() end - if product.include? "{PAGE_CONTENT}" + while product.include? "{PAGE_CONTENT}" product["{PAGE_CONTENT}"]= content end - if raw_content.include? "$EWFM$" + while raw_content.include? "$EWFM$" product["$EWFM$"]= "

This page has been generated by ewfm using the " + theme + " theme!

" end - if raw_content.include? "$THEME$" + while raw_content.include? "$THEME$" product["$THEME$"]= theme end - if raw_content.include? "$TIME$" + while raw_content.include? "$TIME$" time = DateTime.now cdt = time.strftime "%d/%m/%Y %H:%M:%S" product["$TIME$"]= cdt end - if raw_content.include? "$RUBY$" + while raw_content.include? "$RUBY$" product["$RUBY$"]= RUBY_VERSION end