Skip to content

jjung99/My-First-SSG

 
 

Repository files navigation

My-First-SSG

A Static Site Generator(SSG) for OSD600

This repo introduces a JavaScript program that convert .txt file into a HTML file

Installation

npm -i yargs

Commands

server.js --input 'filename'

For Example:

After installation of yargs. You can simply run the program by the command:

node server.js -i 'Silver Blaze.txt'

Which will generate a HTML file for the 'Silver Blaze.txt' file into the /dist folder.

Or

node server.js -i .\Sherlock-Holmes-Selected-Stories\

Which will generate a few of HTML files for the Sherlock-Holmes-Selected-Stories directory into the /dist folder.

Options

Options:

  -h, --help     Show help                                             [boolean]
  -v, --version  Show version number                                   [boolean]
  -o, --output                           [string] [required] [default: "./dist"]
  -i, --input    convert .txt file to html file              [string] [required]

Optional Features

  • Get the title of the .txt file and put the name of the title intotitle, also put it into h1 that inside body

  • Personal footer

Index HTML(DEMO)

My-First-SSG-Example

License

MIT License

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • JavaScript 77.9%
  • HTML 15.8%
  • CSS 6.3%