Skip to content

Commit 5951a26

Browse files
committed
Readme files for example sites.
1 parent 8e89178 commit 5951a26

File tree

6 files changed

+32
-3
lines changed

6 files changed

+32
-3
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
Webpages are generated using HTML and Markdown *templates* with embedded Lua code.
1515
CSS 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)

examples/blog/README.txt

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
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.

examples/minimal/README.txt

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
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.

examples/minimal/config.lua

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
return {
22
title = "Minimal Example Website",
3-
baseUrl = "http://example.com/",
3+
baseUrl = "http://minimal.example/",
44
}

examples/testsite/README.txt

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
Information
2+
Test site
3+
4+
This site contains a bunch of random things used for testing purposes!

src/app.lua2p

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff 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)

0 commit comments

Comments
 (0)