Working on manual.

This commit is contained in:
JesseBrault0709 2023-04-26 21:17:17 +02:00
parent 07228050cb
commit 93dac553a4
2 changed files with 59 additions and 0 deletions

View File

@ -8,4 +8,10 @@ repositories {
asciidoctor {
sourceDir = 'docs/asciidoc'
}
asciidoctorj {
modules {
diagram.use()
}
}

View File

@ -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: