SSGo – a Static Site Generator built with Go

Yeah… I know, the name isn’t that creative, but this is actually a new project I just published on GitHub! Come check it out at https://github.com/devils2ndself/SSGo

So… what does it actually do?

SSGo is a simple Static Site Generator (…


This content originally appeared on DEV Community 👩‍💻👨‍💻 and was authored by Artem Tanyhin

Yeah... I know, the name isn't that creative, but this is actually a new project I just published on GitHub! Come check it out at https://github.com/devils2ndself/SSGo

So... what does it actually do?

SSGo is a simple Static Site Generator (SSG) that can turn .txt files into proper and styled HTML files. You can either pass a single .txt file or a path to a folder, where SSGo will search and turn every .txt file into HTML.

You can find setup and usage instructions in the GitHub repository :)

Usage

  • ssgo --input [in] --output [out[ - Generate HTML from .txt file at in path (can be a single .txt file or directory) to out path.

    --output is optional, default out is dist folder in 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.

Features

  • 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> - optinal feature #1.

  • The name of the generated HTML files will be the same as the original .txt files.

  • Also provides a cool style to generated HTML - optinal 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 accomodate - optinal feature #2.

  • If output directory is path, each time new text is used for HTML generation, the directory will be wiped completely. Careful, don't lose valuable files there!

  • If --output is specified, the directory at path will not be erased like with dist folder. Just in case someone specifies --output C:\...


This content originally appeared on DEV Community 👩‍💻👨‍💻 and was authored by Artem Tanyhin


Print Share Comment Cite Upload Translate Updates
APA

Artem Tanyhin | Sciencx (2022-09-18T01:42:04+00:00) SSGo – a Static Site Generator built with Go. Retrieved from https://www.scien.cx/2022/09/18/ssgo-a-static-site-generator-built-with-go/

MLA
" » SSGo – a Static Site Generator built with Go." Artem Tanyhin | Sciencx - Sunday September 18, 2022, https://www.scien.cx/2022/09/18/ssgo-a-static-site-generator-built-with-go/
HARVARD
Artem Tanyhin | Sciencx Sunday September 18, 2022 » SSGo – a Static Site Generator built with Go., viewed ,<https://www.scien.cx/2022/09/18/ssgo-a-static-site-generator-built-with-go/>
VANCOUVER
Artem Tanyhin | Sciencx - » SSGo – a Static Site Generator built with Go. [Internet]. [Accessed ]. Available from: https://www.scien.cx/2022/09/18/ssgo-a-static-site-generator-built-with-go/
CHICAGO
" » SSGo – a Static Site Generator built with Go." Artem Tanyhin | Sciencx - Accessed . https://www.scien.cx/2022/09/18/ssgo-a-static-site-generator-built-with-go/
IEEE
" » SSGo – a Static Site Generator built with Go." Artem Tanyhin | Sciencx [Online]. Available: https://www.scien.cx/2022/09/18/ssgo-a-static-site-generator-built-with-go/. [Accessed: ]
rf:citation
» SSGo – a Static Site Generator built with Go | Artem Tanyhin | Sciencx | https://www.scien.cx/2022/09/18/ssgo-a-static-site-generator-built-with-go/ |

Please log in to upload a file.




There are no updates yet.
Click the Upload button above to add an update.

You must be logged in to translate posts. Please log in or register.