File tree Expand file tree Collapse file tree 6 files changed +32
-3
lines changed
Expand file tree Collapse file tree 6 files changed +32
-3
lines changed Original file line number Diff line number Diff line change 1414Webpages are generated using HTML and Markdown * templates* with embedded Lua code.
1515CSS files can also include code.
1616
17- [ ** Download latest release** ] ( https://github.com/ReFreezed/LuaWebGen/releases/latest )
17+ [ ** >> Download latest release << ** ] ( https://github.com/ReFreezed/LuaWebGen/releases/latest )
1818
1919- [ Why?] ( #why )
2020- [ Example] ( #example )
Original file line number Diff line number Diff line change 1+ Information
2+ Example Blog
3+
4+ Blog posts are stored in content/posts/, categorized in subfolders by year and
5+ month. It doesn't matter how/if they're categorized, but this format is pretty
6+ common for blogs. All blog post pages specify that they should use the
7+ "blogPost" layout.
8+
9+ The homepage, content/index.html, loops through all pages under the
10+ content/posts/ folder and shows a truncated version of them. Both this index
11+ file and the "blogPost" layout include the "_blogPost" layout which generates
12+ the actual HTML for the given blog post.
13+
14+ We have given the "partial" layouts for this site a filename that starts with
15+ an underscore. It's a good idea to separate layouts that pages can use, and
16+ layouts used by other layouts. The "_header" and "_footer" layouts are both
17+ included by both the "blogPost" layout and the default "page" layout.
18+
19+ The "_header" layout does a similar thing as the homepage - it loops through
20+ all posts and creates a small menu with links to each one.
Original file line number Diff line number Diff line change 1+ Information
2+ Minimal Example
3+
4+ This site only has a single, pretty bare, page - the homepage. It uses uses a
5+ very simple layout.
Original file line number Diff line number Diff line change 11return {
22 title = " Minimal Example Website" ,
3- baseUrl = " http://example.com /" ,
3+ baseUrl = " http://minimal.example /" ,
44}
Original file line number Diff line number Diff line change 1+ Information
2+ Test site
3+
4+ This site contains a bunch of random things used for testing purposes!
Original file line number Diff line number Diff line change @@ -1061,7 +1061,7 @@ local function setup()
10611061 scriptEnvironmentGlobals.echoRaw(s:format(...))
10621062 end,
10631063
1064- include = function(htmlFileBasename, ...)
1064+ include = function(htmlFileBasename, ...) -- @Doc: Extra arguments.
10651065 assertContext("template", "include")
10661066 if htmlFileBasename:find"^/" then
10671067 errorf(2, "Filename is not valid: %s", htmlFileBasename)
You can’t perform that action at this time.
0 commit comments