Summary Files Commits Branches @commit @diff @stats
diff options
context:
space:
mode:
Commit1f6cf0254bfbb3c954da84f616c08a09a66932be (patch)
Author
 Syndamia <kamen@syndamia.com>
2023-10-18 07:33:22 +0300
Committer
 Syndamia <kamen@syndamia.com>
2023-10-18 07:33:22 +0300
Files0800e45dd861666d7b01626ff487014d76c97fdc
csg-1f6cf0254bfbb3c954da84f616c08a09a66932be.tar
csg-1f6cf0254bfbb3c954da84f616c08a09a66932be.tar.gz
csg-1f6cf0254bfbb3c954da84f616c08a09a66932be.zip
Parent950d433439f1b4291d02a0041d00d214b27c71e1 (diff)
[README] Simplified contents
1 files changed, 36 insertions, 20 deletions
-rw-r--r--README.md56
diff --git a/README.md b/README.md
index cd769f2..41024b1 100644
--- a/README.md
+++ b/README.md
@@ -10,18 +10,45 @@ The overall design is heavily inspired by [Roman Zolotarev](https://romanzolotar
- support for (multiple) description and title meta tags
- support for custom title format
-## How to use
+## How to use (for the layman)
-Your content is inside a "source" folder, while the resulting website files will be put in a "destination" folder.
-Webpages are written in Markdown, which is then transformed into HTML with the proper edits, and finally `_header.html` and `_footer.html` are stitched on top and bottom.
-Everything else is taken as-is.
+Inside a "source" folder you put your content, structured in any way.
+Your webpages are written in Markdown and must end with `.md`.
+You'll also need to have a `_header.html` and `_footer.html`, both of those will be slapped on the top and bottom of your Markdown pages.
+Then run:
+
+```bash
+csg './source' './destination' '& - You' 'https://you.com'
+```
+
+- './source' is your source folder
+- './destination' is where you want your generated website to go
+- '& - You' is the format of your title, `&` takes the first `h1` from the page and puts it in, with `\\&` you can put an actual ampersand
+- 'https://you.com' is your website
+
+If you want to use awk scripts for extended functionality, put them in a folder and reference it at the end of the command:
+
+```bash
+csg './source' './destination' '& - You' 'https://you.com' './awk-scripts'
+```
+
+### Demo
+
+This repository comes with a small demo setup.
+To test it out, run:
+
+```bash
+./csg ./demo/src ./demo/website '& - Demo' ./demo/awk-edits
+```
+
+You will find your website, ready to be served, inside `./demo/website`.
+
+## Regarding awk
Additional features are available with [awk](TODO).
-By default, the title, description and word count are taken from every Markdown file.
+By default, the title, description, word count, date created and date edited are taken from every Markdown file.
The title and description will be put in place of `[TITLE]` and `[DESCRIPTION]` inside `_header.html`.
-You can also create/use your own awk scripts for further page modification (all three values will also be available inside those scripts).
-
-*Note:* if you don't want the additional features, just use [ssg](https://romanzolotarev.com/ssh.html)
+You can also create/use your own awk scripts for further page modification (all variables will also be available inside those scripts).
### Writing your own scripts
@@ -45,7 +72,7 @@ There are some things you must consider while creating an awk script:
6. Inside your scripts you'll have the `title`, `description`, `words`, `created` and `edited` variables available
The last two will be dates in the format "%d %B %Y", and are only available if your website uses git.
-### Generate website with the script
+## Usage of the script
csg comes with a help message, which contains everything you might want to know for running the script:
@@ -88,17 +115,6 @@ csg - complicated (static) site generator
Created by Syndamia, https://gitlab.com/Syndamia/csg
```
-### Demo
-
-This repository comes with a small demo setup.
-To test it out, run:
-
-```bash
-./csg ./demo/src ./demo/website '& - Demo' ./demo/awk-edits
-```
-
-You will find your website, ready to be served, inside `./demo/website`.
-
## Future features
1. I would love to make it POSIX compatible, however this will require a good amount of work and will introduce inefficiencies, so for now it's left for the future