Yay!! I finally have my own open source project😋🙈
Here is some intro to it:
Glazed Donut is a static website generator. Basically what it does it that it generates HTML files from text files.
You can view the project here.
Currently, it has the following features:
- It allows you to specify a URL to a CSS stylesheet of your choice that will be used to style the generated HTML files.
- You can specify a destination folder where you want your HTML files to be stored. By default, it will store it in the dist folder.
- Accepts a text file that will be converted to a static HTML page.
- Can convert multiple text files into HTML files at once if you provide a path to a folder with text files that you want to use.
- You can check program's version by typing -v or --version in the terminal.
- Displays a help message with the command usage instructions if you type -h or --help.
It is very easy to use it. You just have to follow the installation process provided in the README.md.
Then, you can do start playing around!
Firstly, you probably want to know what commands it supports.
go to the terminal and type this:
Let's say you have a text file named page1.txt that's located in the C:\Users\You\Dir1 and you want to convert into an HTML page.
- Go to the terminal and type:
You will get a page1.html file generated in the dist folder (full path: C:\Users\UserName\glazed-donut\glazed-donut\bin\Debug\netcoreapp3.1\dist)
What if you decided to go crazy and convert a bunch of files at once? You have now 4 text files you want to convert into HTML pages (page1.txt, page2.txt, page3.txt, page4.txt) that are located in the C:\Users\You\Dir2 folder. Suddenly, you want to also have them placed in the C:\Users\You\MyWebsite folder.
Here is how you can do it:
-i C:\Users\You\Dir2 -o C:\Users\You\MyWebsite
--input C:\Users\You\Dir2 --output C:\Users\You\MyWebsite
Now, you can find the generated HTML files (page1.html, page2.html, page3.html, page4.html) inside the MyWebsite Folder.
You can also combine all the commands like -i, -o, and -s.
Imagine you have a Data folder with page1.txt and page2.txt and you want them to be styled with this stylesheet: https://cdnjs.cloudflare.com/ajax/libs/tufte-css/1.8.0/tufte.min.css and then placed under the StaticWebsite folder.
You would do the following:
-i C:\Users\You\Data -o C:\Users\StaticWebsite -s https://cdnjs.cloudflare.com/ajax/libs/tufte-css/1.8.0/tufte.min.css
Here you go, you now have 3 HTML files inside the StaticWebsite folder, styled with this CSS stylesheet.
Lastly, thanks to this awesome open source project, I didn't have to worry too much about implementing the command line parser😁
You are welcome to fork my project and use it or give any feedback! It is still in the process of development, so expect to have more exciting features coming up soon😊