Skip to content
/ luaueb Public

lua generator for websites (spelled as "loua oueb")

Notifications You must be signed in to change notification settings

jeangit/luaueb

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 

Repository files navigation

luaueb

spelled as Loua Oueb

Purpose

It's for generating web sites, in less than 100 lines of Lua.

More exactly, generating web pages with pattern replacing.

It's useful if you have a static website, in several languages.

Prerequisite

You must have Lua installed.

It should work with all flavors of Lua if > 5.1 .

Files needed

Prepare a directory templates containing your sources files and the patterns files.

A source file has a .tpl extension.

Pattern files have the same basename than source file, with language as extension.

Example

filename contains
templates/foo.tpl template file (classical html, with patterns to insert)
templates/foo.en patterns file (english)
templates/foo.fr patterns file (french)

Grammar

A template file will contain a list of patterns name, followed by text to insert.

[pattern 1]
This text will replace the above pattern in the associated template file.
[foobar]
Same for this one, and so on.

Links in template file must be written with a .tpl suffix.

That is : <a href="foo.tpl">foo</a> will become after generation foo.en.html and foo.fr.html , depending of generated file.

Full sample

See the templates directory for a full sample.

How to generate output

When templates directory is ready, launch ./luaweb and here you go.

Output location

Generated files will be found in final subdirectories.

If final doesn't exist, it is created.

About

lua generator for websites (spelled as "loua oueb")

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published