Skip to content

nguyenhung15913/OSD600-SSG

Repository files navigation

OSD600 Static Site Generator

Create a command line tool to convert user's text input file(s) into hmtl file(s).

Note: A new dist folder will be created to contain all files generated

Features

  • Generating an HTML file from user's file input.
  • Generating HTML file(s) from user's folder input (Each file inside the directory will generate 1 HTML file).
  • File(s) generated will be stored inside new created "dist" directory.
  • If the input file is an .md file, the application will transfer bold, itatlics,h1->h4 text to html elements "---: will transfer into hr tag
  • "dist" folder will renew every time a new command-line executed (Old file(s) will be deleted and new file(s) will be added).
  • Creating a title inside head tag and transforming the first line of the text to h1 tag.
  • Creating stylesheet link tag if users use --stylesheet or -s flag.

Installation

npm i osd600-ssg --save

Usage

osdssg -i <file's location>
osdssg --input <directory's location> // Read all files inside and creates html files for each
 // Note: file's name and folder's name that contains whitespaces have to be placed inside double quote ("")

Flags

 -h,--help: See help list
 -v,--version: Version of current osdssg
 -i,--input: input a file or a folder
 -s,--stylesheet: Add a stylesheet link into <head>
 -l,--language: Modify the lang="" in HTML tag

Built With

  • JavaScript
  • Node
  • NPM
  • HTML

Example

Go to the following link to see examples of the tool

Author

Hung Nguyen

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published