Commit Graph

24 Commits (1bf8064ac9bb33df400a00718c18432fec5ab01b)
 

Author SHA1 Message Date
Aadhavan Srinivasan 1bf8064ac9 Added section to top of script, briefly describing what it does and how it works
Aadhavan Srinivasan 568050cb53 Added some comments to the top
Aadhavan Srinivasan c82b13f3ca Made all variables inside functions local
Aadhavan Srinivasan 45a136dfc3 Big commit, mostly adding best-practice changes to the script.
1. Added lines at the top to exit the script if any command in
the script fails.
2. Quoted all variable accesses.
3. Redirected error messages to stderr.
4. Used '[[' and ']]' in 'if' statements.
5. Added a debug mode, that can be triggered by setting the TRACE
environment variable to 1.
6. Used 'dirname' instead of 'PWD'. Therefore, in order to use the
script, you must place it in the same directory as your website
files. However, you can run it from anywhere as long as it is in
the correct location.
Aadhavan Srinivasan cc3bdae903 Changed working directory to /home/aadhavan/Programming/Bash/sitegen
Aadhavan Srinivasan 73d608e40f Removed unneccesary space :D
Aadhavan Srinivasan 490ffeb8de Added flag to pandoc, to include lua filters
Aadhavan Srinivasan 958fc8518a Added code to copy over fonts into output directory
Aadhavan Srinivasan f9468282f3 Added flag to 'cp' command so that it would recursively copy directories
Aadhavan Srinivasan 401546e751 Added a function to copy files and folders into the 'output' folder
Aadhavan Srinivasan 8c4862cd05 Renamed 'notitle' to 'noappend', and added 'date = auto' variable to automatically add the date
Aadhavan Srinivasan 506ea63f52 Added code to escape forward slashes in metadata values
Aadhavan Srinivasan 6701f5389b Added code to only add the date to the metadata array if it isn't already present
Aadhavan Srinivasan 93fe404571 Switched to using associative arrays instead of two regular arrays for metadata, and ensured that the site map does not contain any file without a 'date-published' line
Aadhavan Srinivasan 5e8445febf Started working on converting the regular arrays into an associative array
Aadhavan Srinivasan 2ab303fb2e Reversed sorting order so that the site map displays posts from newest to oldest
Aadhavan Srinivasan 1a477a1abf Added option to pandoc, to preserve line wrapping
Aadhavan Srinivasan ad2bc3a3ad Finished code for generating index file; created a separate function for adding header and footer to index file
Aadhavan Srinivasan 7d82d5ece3 Working on generating index page; moved the generation of a sorted file list to a separate function
Aadhavan Srinivasan 84cff5cfac Changed replace_vars to replace every occurence of a variable, not just the first occurence; Started working on generating index page
Aadhavan Srinivasan 7605bd8b78 Removed creation of 'output' directory, as it is deleted and re-created soon after
Aadhavan Srinivasan cc64d4482c Fixed a bug where folder structure of 'source' is not preserved in 'output'
Aadhavan Srinivasan e1cd7ce290 Added more error checking to build script, and deleted 'temp' directory at the end
Aadhavan Srinivasan 141be2c483 First commit