Last active
November 22, 2019 16:53
-
-
Save hamzamu/dff35e6a7b59805b928d07f7d2144dc4 to your computer and use it in GitHub Desktop.
HTML. generator [Red]
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Red [ | |
Title: Simple HTML Generation Test | |
] | |
data: [ | |
title: "This is the title" | |
content: "This is a content block" | |
] | |
html: { | |
<HTML> | |
<HEAD> | |
<TITLE>$title</TITLE> | |
</HEAD> | |
<BODY> | |
$content | |
</BODY> | |
</HTML> | |
} | |
foreach [k v] data [ | |
n: rejoin ["$" k] | |
html: replace html n v | |
; print [k " : " v "-" n] | |
] | |
print html | |
write %html.index.html probe html | |
;append html header |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment