diff options
Diffstat (limited to 'examples/site/build.lua')
| -rw-r--r-- | examples/site/build.lua | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/examples/site/build.lua b/examples/site/build.lua index 7a9dfd4..1d7368b 100644 --- a/examples/site/build.lua +++ b/examples/site/build.lua @@ -9,7 +9,7 @@ local features = { "mixed content" } -local feature_list = assert(html.find_by_class(page, "feature-list")) +local feature_list = assert(html.query(page, ".feature-list")) for _, feature in ipairs(features) do feature_list:append(html.element("li", nil, feature)) end @@ -20,20 +20,20 @@ for entry in fs.walk(".") do end table.sort(entries, function(left, right) return left.path < right.path end) -local summary = assert(html.find_by_class(page, "file-summary")) +local summary = assert(html.query(page, ".file-summary")) summary.text = tostring(#entries) .. " entries" -local file_list = assert(html.find_by_class(page, "file-list")) +local file_list = assert(html.query(page, ".file-list")) for _, entry in ipairs(entries) do html.append(file_list, html.element("li", nil, html.element("code", nil, entry.path), " (", entry.type, ")")) end -local build_summary = assert(html.find_by_class(page, "build-summary")) +local build_summary = assert(html.query(page, ".build-summary")) build_summary.text = "Built with " .. site.name .. " " .. site.version -local mixed = assert(html.find_by_class(page, "mixed-content")) +local mixed = assert(html.query(page, ".mixed-content")) mixed.children = { { kind = "comment", text = "generated by Lua" }, "Text with ", |
