Introducing: Siteit v1.0.6
TD

TD @tdaw

About: Working on writing better code with each revision

Location:
Neverland
Joined:
Sep 5, 2022

Introducing: Siteit v1.0.6

Publish Date: Dec 7 '22
5 8

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.

Comments 8 total

  • Maxim Nosov ✪
    Maxim Nosov ✪Dec 7, 2022

    Wow, that's sooooo cool :)

  • TD
    TDDec 7, 2022

    Thank you, Maxim.

  • Ramo Mujagic
    Ramo MujagicDec 7, 2022

    Good work, congrats!

    • TD
      TDDec 7, 2022

      Thank you, Ramo. 🙂

  • Gulnur Baimukhambetova
    Gulnur BaimukhambetovaDec 8, 2022

    Nice logo!

    • TD
      TDDec 8, 2022

      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.

Add comment