|
16 hours ago | |
---|---|---|
src | 6 days ago | |
LICENSE | 2 months ago | |
Makefile | 2 days ago | |
README.md | 16 hours ago | |
wg.lua | 6 days ago |
A static website generator written in Fennel.
Inline code
: Inline code signifies package names, filenames, or commands.Code block
: Code blocks signify file contents.wg.lua
from sourcewg.lua
file using one of the following commands:
curl https://git.m455.casa/m455/wg/raw/branch/main/wg.lua -o wg
wget https://git.m455.casa/m455/wg/raw/branch/main/wg.lua -O wg
wg
to a directory on your $PATH.wg help
.This section will guide you through downloading and installing wg either globally or locally.
This section consists of the following subsections:
This section will guide you through downloading wg using git.
git clone https://git.m455.casa/m455/wg
This section will guide you through compiling the files that make up wg into a single Lua script.
make compile
This section will guide you through installing wg globally. This method
will install wg into /usr/local/bin
, which requires you to have root
access to your machine.
Tip: If you don't have root access to your machine, check out the Installing wg locally section.
cd wg
sudo make install
This section will guide you through installing wg locally. This method
will install wg into ~/.local/bin
.
cd wg
make install-local
This section will guide you through installing wg to a custom location.
cd wg
make DESTDIR=~/path/to/custom/location install
Note: If you choose to install wg to a custom location, you will need to remember where you installed wg if you decide to uninstall it later.
This section will guide you through uninstalling wg either globally or locally.
This section consists of the following subsections:
This section will guide you through uninstalling wg globally. This
method will remove wg from /usr/local/bin
, which requires you to have
root access to your machine.
cd wg
make uninstall
This section will guide you through uninstalling wg locally. This method
will remove wg from ~/.local/bin
.
cd wg
make uninstall-local
This section will guide you through uninstalling wg from a custom location.
cd wg
make DESTDIR=~/path/to/custom/location uninstall
init
- Creates required directories and files in the current
directory.build
copy/
directory into the build/
directory.convert/
directory
to HTML files in the build/
directory.serve
- Serves files in the 'build/' directory on port 8000,
allowing you to see how your website will look locally before it goes
live.clean
- Deletes all contents of the 'build/' directory.help
- Displays the help message.wg init
wg build
wg serve
wg clean
wg help
This section explains each of the default files and directories that are
created after running wg init
.
layout
directory must contain a header.md
file and footer.md
file.The contents in the header.md
file will be used as a header for any
HTML files that were generated from the convert
directory.
The contents in the footer.md
file will be used as a footer for any
HTML files that were generated from the convert
directory.
convert
directory must contain an index.md
file.index.md
can be empty.index.md
file will be used as the landing page.convert
directory should only contain directories, and Markdown
files ending in .md
.convert
directory will be mimicked in
the build
directory.build
directory.build
directory.layout/header.md
and layout/footer.md
.copy
directory must contain a style.css
file.style.css
can be empty.style.css
will be linked to from any HTML files that were
generated from the convert
directory.copy
directory can contain any files or directories.copy
directory will be mimicked in
the build
directory.build
directory.build
directory is used by the build
command.build
directory contains:
convert
directory, or copied from the copy
directory.convert
and copy
directories, and
the style.css
file from the copy
directory.Note: This is the directory you will want to use as your website.