Skip to content

A simple SSG generator made with Python 3.8.5

License

Notifications You must be signed in to change notification settings

Kevan-Y/cool_ssg_generator

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

57 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

cool_ssg_generator

A simple SSG generator made with Python. Current version is 0.1.0

Dependencies

Installation

Make sure you have installed Python version 3.8.5 or above. No other dependencies is currently needed.

To clone this project, use:

git clone https://github.com/lmpham1/cool_ssg_generator.git

Then, you'll probably want to navigate to the project's root folder:

cd cool_ssg_generator

For Anaconda users (optional)

If you want to quickly set up a virtual development environment with Anaconda, use the following commands in the project's root folder:

conda env create -f environment.yml
conda activate ssg_env

For more information on Anaconda, please refer to their official documentation


Basic Usage

Navigate to the project folder (if you haven't done so already):

cd cool_ssg_generator

Generate a website from a file or folder:

python main.py --input <INPUT_FILE_OR_FOLDER>

Default output folder is ./dist/, to specify a custom output folder:

python main.py --input <INPUT_FILE_OR_FOLDER> --output <OUTPUT_FOLDER>

CSS can be used via the --stylesheet flag:

python main.py --input <INPUT_FILE_OR_FOLDER> --stylesheet <STYLESHEET_URL>

For more usage, please refer to:

python main.py -h

Cool Features

Wanna know what make the cool_ssg_generator so cool? Aside from the totally-intentional doubled 'generator' in the name, it offers the following awesome features:

  • Support multiple stylesheets! Simply use the -s or --stylesheet flags and separate each stylesheet link with space ' ', i.e.:
python main.py -i index.txt -s sheet1.css sheet2.css sheet3.css
  • Markdown (.md files) support for bold (**example** or __example__), italics (*example* or _example_), and links ([Example](www.example.com))
  • Language for the output HTML documents can be configured with -l or --lang flag (default is en-CA):
python main.py -i test.txt -l en-UK

Note: No validation for --lang/-l option is implemented yet. See issue #14 for more information

  • You can save your command-line options in a config file! No need to manually type all the options everytime, just use --config/-c flag with a json file:
python main.py -c config.json

Note: Using --config/-c option will ignore/override other options


License

MIT

About

A simple SSG generator made with Python 3.8.5

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • Python 100.0%