From 93dac553a40e95cd4c65add5d3fc0d84de1ce0d2 Mon Sep 17 00:00:00 2001 From: JesseBrault0709 <62299747+JesseBrault0709@users.noreply.github.com> Date: Wed, 26 Apr 2023 21:17:17 +0200 Subject: [PATCH] Working on manual. --- build.gradle | 6 ++++ docs/asciidoc/manual.asciidoc | 53 +++++++++++++++++++++++++++++++++++ 2 files changed, 59 insertions(+) diff --git a/build.gradle b/build.gradle index 663921b..60d821c 100644 --- a/build.gradle +++ b/build.gradle @@ -8,4 +8,10 @@ repositories { asciidoctor { sourceDir = 'docs/asciidoc' +} + +asciidoctorj { + modules { + diagram.use() + } } \ No newline at end of file diff --git a/docs/asciidoc/manual.asciidoc b/docs/asciidoc/manual.asciidoc index 82997f5..fdc2741 100644 --- a/docs/asciidoc/manual.asciidoc +++ b/docs/asciidoc/manual.asciidoc @@ -6,6 +6,59 @@ v0.2.0 *com.jessebrault.ssg* is a static site generator written in Groovy, giving access to the entire JVM ecosystem through its templating system. +== Overview + +`ssg` has two currently functioning sub-commands, `init` and `build`, one of which must be chosen at the command line. + +NOTE: Previous versions of `ssg` contained a `watch` command; this will be re-introduced in future versions in a more abstracted way that will handle not only the file system changes but also database/external events as well. + +=== Sub-command: `init` + +`init` is a simple command which simply creates the expected file and folder structure for `ssg` in the current directory. The resulting directories and file (only `ssgBuilds.groovy`) are empty. + +.resulting project structure after running `init` +[plantuml, width=25%, format=svg] +---- +@startsalt +{ + {T + + <&folder> (project directory) + ++ <&folder> pages + ++ <&folder> parts + ++ <&folder> templates + ++ <&folder> texts + ++ <&file> ssgBuilds.groovy + } +} +@endsalt +---- + +However, with the `--skeleton` option (short form `-s`), a simple text, page, template, and part are generated as well. Additionally, `ssgBuilds.groovy` contains some sample configuration for the site. + +.resulting project structure after running `init --skeleton` +[plantuml, width=25%, format=svg] +---- +@startsalt +{ + {T + + <&folder> (project directory) + ++ <&folder> pages + +++ <&file> page.gsp + ++ <&folder> parts + +++ <&file> head.gsp + ++ <&folder> templates + +++ <&file> hello.gsp + ++ <&folder> texts + +++ <&file> hello.md + ++ <&file> ssgBuilds.groovy + } +} +@endsalt +---- + +=== Sub-command: `build` + + == Program Execution When `ssg` is invoked with a build file (such as `ssgBuilds.groovy` in the working directory), the following will occur: