| Publish script - a shell script to create your own static site |


What is this

A shell script I cobbled together to create a static website with navigation based on folder structure of your posts. This website is generated using the same script.

The html is created on a lightly modified version of Expose - a wonderful bash script by Jack Qiao Theme is based off Hyde but you can change it easily by just replacing the theme directory.

It's current state is essentially a template of how NOT to write a shell script.
The mess is my own fault but I will keep improving it whenever I can.
In the mean time, it works! Sort of...

More details on this post

Code available on Github page

How does it work

Things it needs:
1. A theme folder essentially containing some css/images/html templates as needed
2. Markdown script and Perl: Optional Only if you need markdown support
3. A folder of your own writing
- Your-Folder
- SubFolder-1
- post1.txt
- post
2.md
- SubFolder-2
- another_post.md
- SubFolder-3
....
- SubFolder-n

Just run the script in Your-Folder and it will generate a static website under Your-Folder/site/_ directory. The subdirectories will be treated as different sections of the website and navigation will be generated accordingly. Empty directories will be ignored.

Current issues