Skip to content

Command Line

ReFreezed edited this page Jun 30, 2018 · 10 revisions

To use LuaWebGen, navigate to your site's root folder and run this from the command line:

lua "path/to/LuaWebGen/main.lua" some_command [options]

In Windows you can optionally add path/to/LuaWebGen to your PATH and take advantage of webgen.exe:

webgen some_command [options]

Much nicer! The rest of the documentation will use this format.


Commands

build

webgen build [options]

Build the website. (Also look at available options.)

new page

webgen new page "page_path"

Create a new page with some basic information. Example: webgen new page blog/first-post.md

new site

webgen new site "folder_name"

Initialize a folder to contain a new site.

Build Options

--autobuild or -a

Auto-build website when changes are detected. This makes LuaWebGen run until you press Ctrl+C in the command prompt.

--drafts or -d

Include page drafts when building. Meant for debugging.

--force or -f

Force-update all. This makes LuaWebGen treat all previously outputted files as if they were modified. This has the same effect as deleting the output folder.

--verbose or -v

Enable verbose printing in the console.

Clone this wiki locally