Users can officially install Siteit using npm and feed it .txt
or .md
files to generate a static site.
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
Usage
siteit [option] <file_path>
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)
Nice logo!
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.
No, yours is even animated! Good job! 👍🏼
Thank you. 😄
Good work, congrats!
Thank you, Ramo. 🙂
Wow, that's sooooo cool :)
Thank you, Maxim.