DEV Community

Cover image for Introducing: Siteit v1.0.6
TD
TD

Posted on

Introducing: Siteit v1.0.6

Users can officially install Siteit using npm and feed it .txt or .md files to generate a static site.


animated-logo


It's my first time releasing a package on npm, so please go easy on me, guys! I have been working on this project for over three months. In the beginning, just a few function calls would do minor things, but with every revision, I have improved the way Siteit is, as a static site generator.
Siteit is a command-line tool that accepts options and arguments, like a typical UNIX command. What makes Siteit different is that it logs coloured feedback, so the user is aware of whether the command was executed successfully. I achieved this using the chalk module. Also, if a user feeds Siteit a directory containing .txt or .md files, it generates an Index file that lists and links all the other files. Siteit currently supports files in .txt and .md format.

I ran into issues making the CSS stylesheet work with Siteit post-release. Therefore, I used Statically to convert Siteit's raw CSS file URL on GitHub into a CDN link.

Also, I adjusted the CSS styles to enhance readability for various viewports.

You can view the demo site generated using Siteit version 1.0.6 here.

Installation

To install siteit run the following command

npm install -g siteit
Enter fullscreen mode Exit fullscreen mode

Usage

siteit [option] <file_path>

Enter fullscreen mode Exit fullscreen mode

Click here to see usage instructions.

I used NP to simplify publishing my package to the npm registry. NP automatically runs checks, bumps the version, pushes the updated code on the GitHub repo associated with the project, and publishes the package on npm.

Won was helpful enough in pointing out that the output directory was not being generated.
I had to rewrite my code using relative paths, as resolving to absolute paths was causing that error.

Overall, it was a great learning experience. I feel more confident publishing packages to NPM in the future.

Sometimes running into errors is more of a blessing than a nuisance. If I had not run into issues publishing my package to NPM, I would have never learned about interesting errors in my code.

Top comments (8)

Collapse
 
gulyapulya profile image
Gulnur Baimukhambetova

Nice logo!

Collapse
 
tdaw profile image
TD

Thank you, Gulnur. 😁 It’s not as great as the logo for your SSG. Given the time constraint, I couldn’t come up with a better logo.

Collapse
 
gulyapulya profile image
Gulnur Baimukhambetova

No, yours is even animated! Good job! 👍🏼

Thread Thread
 
tdaw profile image
TD • Edited

Thank you. 😄

Collapse
 
rmmgc profile image
Ramo Mujagic

Good work, congrats!

Collapse
 
tdaw profile image
TD

Thank you, Ramo. 🙂

Collapse
 
mnosov622 profile image
Maxim Nosov ✪

Wow, that's sooooo cool :)

Collapse
 
tdaw profile image
TD • Edited

Thank you, Maxim.