A Static Site Generator(SSG) for OSD600
This repo introduces a JavaScript program that convert .txt file into a HTML file
npm -i yargs
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:
-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]
-
Get the title of the .txt file and put the name of the title into
title
, also put it intoh1
that insidebody
-
Personal
footer