Octo: The Open Source Static Site Generator
Octo is a tool that creates static HTML pages based off of a template or some raw data provided. Octo is designed to only accept .txt files and create static html documents based off of the content within the text files.
What is a Static Site Generator?
A SSG(static site generator) is a tool that creates static HTML pages based off of a template or some raw data provided. Octo is designed to only accept .txt files and create static html documents based off of the content within the text files. Octo will read the text data and make paragraph elements every time there is a space between content.
This builds Octo so you can access it anywhere on your computer using the
- Clone the repository
- cd into the folder
- run npm i to install all dependencies
- run npm install -g .
-i or --input flag means the input path. This will look for all texts files with the given path. You can give a .txt file as input or a directory. This is a required field for the program to work. Any files/directories with spaces should be entered with quotes:
octo -i "Sherlock Holmes Selected Stories/test.txt"
Only text files work with this program.
This will take the content from the text file and output a HTML file.
octo -i test.txt
This will go though a directory named test and look for all nested .txt files.
octo -i test
The output allows the user to specify the path where the files/directories can be exported.
This is not a required field and will default to './dist' if no option is given.
-o or --output flag means the output path. This will create a folder called htmlFiles outside of the current directory.
octo -i test.txt -o ../hmtlFiles
Recursive File Searching
If a input is a directory, Octo will recursively go through all the child directories and convert all the text files into HTML.
After creating my own open source project, I was able to grow as a software developer! Although it may seem to be not as difficult of a task, the few things that were difficult for me were:
- Publishing my code online for everyone to see
- Submitting code that could possibly be buggy
- Not having a 100% completed software
Those thoughts might have made it difficult at first but, I was able to move past this and understand that these things are okay! Comment some features that you would like to see with this project, I would love to add them to the Github repository. I am also excited to get pull requests from people in the community to help make this tool better! If you want to contribute to the project or check out the link to the sample site, the links will be under here!
SourceLinkGithub Repository: https://github.com/LuigiZaccagnini/octo
Sample Site: https://luigizaccagnini.github.io/octo/
I am a young gentleman who is devoted on working on projects. Building applications and solving programming issues in any programming language.