A simple Static Site Generator built using Go language.
Lets you generate HTML files from either a single .txt
file or multiple .txt
files in a given directory.
Preview of generated HTML is available at https://devils2ndself.github.io/SSGo.
In order to build the application, you first need to get Go CLI.
To build a binary or executable, run:
git clone https://github.com/devils2ndself/SSGo.git
cd SSGO
go build ssgo.go
Or go install
to install globally.
-
ssgo --input [in] --output [out[
- Generate HTML from .txt file atin
path (can be a single .txt file or directory) toout
path.
--output
is optional, the default out isdist
folder in the current directory -
ssgo --version
- Display installed version of SSGo -
ssgo --help
- Display detailed help message
Please note, that if built locally, some users will need to use ./ssgo
instead of ssgo
.
Also, please be aware that shorthand flags, like -i
, take as the argument everything that follows that character, i.e. -info
will be understood as -i nfo
. It's not me, it's the standards :/
-
Generates HTML files for each .txt file in
input
. -
Encloses every paragraph of text separated by a blank line in
<p>
tag. -
If the first line of the .txt file is followed by 2 empty lines, it will be used as a title. The
<title>
will be assigned to it and it will be enclosed into<h1>
tag instead of regular<p>
- optional feature #1. -
The name of the generated HTML files will be the same as the original .txt files.
-
Also provides a cool style to generate HTML - optional feature #6.
-
Generated files go to
dist
folder unless any other path is specified with--output
flag. If the new output path does not exist, it will create a new directory to accommodate - optional feature #2. -
If the output directory is
path
, each time new text is used for HTML generation, the directory will be wiped completely. Be careful, don't lose valuable files there! -
If
--output
is specified, the directory at path will not be erased like withdist
folder. Just in case someone specifies--output C:\...
Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.
Please make sure to update tests as appropriate.