2025-08-04 15:49:46 +02:00
2025-08-04 15:36:59 +02:00
2025-08-02 19:53:48 +02:00
2025-08-04 15:49:46 +02:00
2025-08-04 15:36:59 +02:00
2025-08-04 15:36:59 +02:00
2025-08-02 19:53:48 +02:00
2025-08-04 15:49:46 +02:00

WL

WL is a powerful and flexible templating language for the web.

Here's an example template in WL with a recursive comment view element:

posts = [
    {
        author: "UserA",
        title: "I'm the first post",
        content: "Sup everyone!",
        comments: [
            {
                author: "UserB",
                content: "Hello! This is a comment!",
                comments: [
                    {
                        author: "UserA",
                        content: "Hello to you!",
                        comments: []
                    }
                ]
            }
        ]
    }
]

fun comment(c)
    <div>
        <a>\c.author</a>
        <p>\c.content</p>
        \for subc in c.comments:
            comment(subc)
    </div>

<html>
    <head>
        <title>List of posts</title>
    </head>
    <body>
        \for post in posts:
            <div class="post">
                <h2>
                    \post.title
                </h2>
                <span>
                    Posted on \post.date by \post.author
                </span>
                <p>
                    \post.content
                </p>
                <div class="comments">
                    \for c in post.comments:
                        comment(c)
                </div>
            </div>
    </body>
</html>
S
Description
A language for writing websites
Readme
196 KiB
Languages
C 98.3%
Wolfram Language 1.1%
Makefile 0.6%