Socket
Socket
Sign inDemoInstall

io.github.trangntt-016:jssg

Package Overview
Dependencies
Maintainers
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

io.github.trangntt-016:jssg

A simple Static Site Generator (SSG) for generating a complete HTML website from raw data and files, without having to author any HTML by hand.


Version published
Maintainers
1
Source

Java Static Site Generator (JSSG)

A simple Static Site Generator (SSG) for generating a complete HTML website from raw data and files, without having to author any HTML by hand.

Built with

  • Picocli 4.6.1
  • Java 11
  • Maven
  • JUnit5

Getting Started

Prerequisites

Executing program

  • clone this github

git clone https://github.com/trangntt-016/static-site-generator.git

  • Install jssg
cd ./static-site-generator

Config the .bat file

Right click on jssg.bat -> edit -> change D:\SchoolWork\OSD600\static-site-generator\target\jssg-0.0.1-SNAPSHOT.jar to your absolute path where the jssg-0.0.1-SNAPSHOT.jar locates 
Save

Config the system environment

Start -> Edit system environment variables -> Environment variables -> User variables: Path -> New -> (Absolute path where your jssg.bat file locates)-> ok

Then, look at the 2nd block: system variables: Path -> New -> (Absolute path where your jssg.bat file locates)-> ok

Ok -> Apply -> Ok
  • Run jssg Open Windows Terminal -> jssg -h

Features

  • Display the version of the tool and a list of command lines by using (--h, --v, --help, --v)

  • Allow the user to specify an input file or folder to be processed, using --input or -i . Then it generates one .html output file for each input file and the filename is based on the title of the story’s header. For example: jssg -i '.\src\main\resources\Sherlock Holmes Selected Stories'

  • jssg places all output into a ./dist folder by default. Each time the tool is run, an existing dist folder should first be removed so that dist always contains the last output.

  • If --output or -o werent’s specified, dist will be used. If the user specifies a different output path (--output or -o), jssg will use that, it also prints an error if the specified output path is not a valid directory.

  • If the user specifies a folder for the input, Jssg automatically generates an index.html file, which has relative links to each of the generated HTML files.

  • Add an optional -l, --lang, which indicates the language to use when generating the lang attribute on the root element. For example, --lang fr would mean that the HTML documents are in French, and would include , while -l pt-BR would mean the text is using Brazilian Portuguese: . By default, use en-CA for Canadian English.

  • Add support for inline <code> blocks. In Markdown, enclosing text in a single backtick causes the text to HTML to get rendered as <code>...text...</code>.

  • Add an optional -c, --config which indicates the path to a JSON config file. For example: jssg -c '.\src\main\resources\Sherlock Holmes Selected Stories'

    // ssg-config.json
    {
      "input": ".\\src\\main\\resources\\Sherlock Holmes Selected Stories\\",
      "output": "./build",
      "randomKey": "nullptr",
      "missing-lang": "fr-CA",
    }
    

Demo

Output: https://trangntt-016.github.io/static-site-generator/

Features:

  • Display version of the tool:

  • Automatically generate various HTML files from .txt files based on the argument

License

This project is licensed under the [MIT] License - see the LICENSE.md file for details

Author

Trang Nguyen (Tracy)

Acknowledgment

FAQs

Package last updated on 28 Nov 2021

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc