Lupo is a basic static website generator written in Bash. It will copy a hierarchy of files and folders, converting any markdown files into HTML files.
Once configured, you can write / edit pages locally; build the new pages, or do a full website build; then deploy straight to your server.
You can even run the live
command and Lupo will watch your source files
for changes and automatically convert and push those files to your
remote server.
git clone https://github.com/davidpeach/lupo
cd ./lupo
./install
cd ../
rm -rf ./lupo
- Pandoc is required for convert markdown files into html. This is quite a hefty requirement along with its own dependancies, I am looking for alternatives.
- rsync is required for using the
push
command. - inotifywait is required for using the watch command.
Examples are for Linux-based systems, but can be altered for Mac / Windows based ones.
- Install
lupo
as per the directions above. - run
mkdir my-website && cd my-website
. - Run
lupo init
. - Create a file in your
src
directory calledindex.md
. - Add the following content to it:
---
title: My Website
---
Welcome to my website!
- Run
lupo build
from the root of your project. - A new file should now be present at
./html/index.html
. - That html directory is the one to deploy to a remote server.
The steps above can be used to create any size website.
Any website structure you create will be replicated in the output html. Images / CSS / JavaScript files will be copied across as they are in your source directory. Your markdown files will be converted to html before being copied across.
for example:
src/
|-- index.md
|-- style.css
|-- about/
|-- index.md
|-- me.jpg
|-- blog/
|-- my-post-one.md
|-- my-post-two.md
will create:
html/
|-- index.html
|-- style.css
|-- about/
|-- index.html
|-- me.jpg
|-- blog/
|-- my-post-one.html
|-- my-post-two.html
You are completely free to structure your website exactly how you want to.
You can set Lupo up to easily deploy to a remote server that you control.
lupo push
Setting the following configuration items in your .config
file will allow you to do this:
- remote_user - This is the user who owns the directory where the html files will be sent to.
- ssh_identity_key - This is the path to the private key file on your computer that pairs with the public key on your remote server.
- domain_name - The domain name pointing to your server.
- remote_directory - The full path to the directory where your html files are served from on your server.
lupo watch
lupo live