DEV Community

irenejoeunpark
irenejoeunpark

Posted on

Static Site Generator

Built a static site generator (SSG) using Java.

Feel free to check it out:
https://github.com/irenejoeunpark/ssgApplication

Example:
Given text file textFile.txt

Sample Text File


This is a sample text file to test the ssg created by Irene
Enter fullscreen mode Exit fullscreen mode

Run:


java -jar out\artifacts\ssgApplication_jar\ssgApplication.jar -i sources/textFile.txt

Enter fullscreen mode Exit fullscreen mode

textFile.html will be generated in the folder called "dist"

<!doctype html>
<html lang="en">
<head>
  <meta charset="utf-8">
<STYLE type="text/css">
   H1 {border-width: 1; border: solid; text-align: center; font-family: Arial, Helvetica, sans-serif}
   p{font-family: Arial, Helvetica, sans-serif;}
    body {background-color: #d6ecf3;padding-left: 10%;padding-right:10%; padding-top: 0.5%;line-height: 1.5;text-align: center;}
 </STYLE>  <title>TextFile</title>
  <meta name="viewport" content="width=device-width, initial-scale=1">
</head>
<body>
<h1>Sample Text File</h1><br/><br/><p></p><br/>
<p></p><br/>
<p>This is a sample text file to test the ssg created by Irene</p><br/></body>
</html>
Enter fullscreen mode Exit fullscreen mode

Option

-v or --version : display version of the application
-h or --help : display the list of options and its description
-i or --input : allow to pass input file(s)

Remark

More features will be added. I am considering to create more argument options by using picocli.

Sentry image

Hands-on debugging session: instrument, monitor, and fix

Join Lazar for a hands-on session where you’ll build it, break it, debug it, and fix it. You’ll set up Sentry, track errors, use Session Replay and Tracing, and leverage some good ol’ AI to find and fix issues fast.

RSVP here →

Top comments (0)

Billboard image

The Next Generation Developer Platform

Coherence is the first Platform-as-a-Service you can control. Unlike "black-box" platforms that are opinionated about the infra you can deploy, Coherence is powered by CNC, the open-source IaC framework, which offers limitless customization.

Learn more

👋 Kindness is contagious

Please leave a ❤️ or a friendly comment on this post if you found it helpful!

Okay