Rundown of ssg

February 5, 2025

This is a basic rundown/usage of the program ssg from the terminal

# Step 1

Generate a config file by running sh main.sh config. Then edit the config.txt file on your own. For an example config file, you can see here. Make sure to add a base.md page on your first entry to every new page except for about and index page. The need for base.md page is to hold records of the different posts and display them on a dedicated page. For more info about basepage syntax please refer to here

# Step 2

If you're done editing config.txt file, initialize everything that you've declared on your config file by running sh main.sh init. This will create all the files, directories and whatnot

# Step 3

Now, generate navigation section by running sh main.sh navgen. This navigation part just adds home, roam and base buttons on your navigation section

# Step 4

Now, edit your index.md page. Open your favorite text editor and edit the index.md file. For example index.md reference, see here and for syntax help please refer to this documentation, here After done editing the index.md file, just run sh main.sh index index.md, which will generate a index.html file.

# Step 5

Now Edit the base.md page if your article is going to be in a directory such as blog/firstblog.md. In such case, first edit blog/base.md page with your text editor. For an example see here and for syntax documentation, please refer to here Just run sh main.sh post and when it asks for the filename, just add blog/base.md as the filename

# Step 6

If you've completed everything above correctly, you can start writing your posts. You can either run sh main.sh post and add manual entries to config.txt, blog/base.md file or you could just run sh main.sh add and let all your entries by added automatically. It's your choice, depends on use case hence, added both post and add option for for variance.

# Step 7

Now since you've added all posts and everything, now run sh main.sh all. This will generate html pages for all the files mentioned in config.txt.

# Step 8

For convenience you can also run sh main.sh final which will copy all the generated html files into a separate sub-directory

# Step 9

Last but not least, you can also generate rss.xml feeds of all your posts. Just run sh main.sh rss

Video: Here's a video reference showcasing CLI usage

Made with <3 by samiuljoy

rss | about | go to top