* Each page has ETag and it is checked against the request for client-side
caching
* Pages can be gzip-compressed, depending on Accept-Encoding header
+* Commenting support
CONFIGURATION
-SGBlog is configured via environment variables:
-* SGBLOG_GIT_PATH points to .git directory you want to serve
-* SGBLOG_BRANCH points to the branch in it (refs/heads/master for example)
-* SGBLOG_BASE_URL points to full URL before the possible SGBLOG_URL_PREFIX
-* SGBLOG_TITLE sets the index title
-* SGBLOG_ATOM_ID sets Atom feed's id
-* SGBLOG_ATOM_AUTHOR sets Atom feed's author name
-* If SGBLOG_URL_PREFIX is set, then all link will be prefixed with that URL
-* If SGBLOG_CSS is set, then link to that CSS URL will be generated
-* If SGBLOG_WEBMASTER is set, then "made" link well be generated
-* If SGBLOG_ABOUT is set, then about link is generated at the bottom
-* If SGBLOG_GIT_URLS is set, then links to that vcs-git space-separated
- URLs will be generated
-
-Example lighttpd's configuration:
-
- setenv.add-environment = (
- "SGBLOG_GIT_PATH" => "/home/git/pub/stargrave-blog.git",
- "SGBLOG_BRANCH" => "refs/heads/russian",
- "SGBLOG_BASE_URL" => "http://blog.stargrave.org",
- "SGBLOG_TITLE" => "Russian Stargrave's blog",
- "SGBLOG_ATOM_ID" => "urn:uuid:e803a056-1147-44d4-9332-5190cb78cc3d",
- "SGBLOG_ATOM_AUTHOR" => "Sergey Matveev",
- "SGBLOG_URL_PREFIX" => "/russian",
- "SGBLOG_WEBMASTER" => "webmaster@stargrave.org",
- "SGBLOG_CSS" => "http://blog.stargrave.org/style.css",
- "SGBLOG_GIT_URLS" => "git://git.stargrave.org/stargrave-blog.git https://git.stargrave.org/git/stargrave-blog.git",
- "SGBLOG_ABOUT" => "http://blog.stargrave.org/",
- )
+SGBlog is configured via Hjson configuration file:
+
+ {
+ GitPath: /home/git/pub/stargrave-blog.git
+ Branch: refs/heads/english
+ Title: "English Stargrave's blog"
+
+ BaseURL: http://blog.stargrave.org
+ URLPrefix: /english
+
+ AtomId: "urn:uuid:18e2f27c-a668-4e85-822e-b902376be5e3"
+ AtomAuthor: Sergey Matveev
+
+ # URL to CSS file, optional
+ CSS: /style.css
+ # Email address of the webmaster, optional
+ Webmaster: "webmaster@example.com"
+ # URL to about page, optional
+ AboutURL: /
+ # Optional list of optional Git URLs for corresponding <link rel="vcs-git">
+ GitURLs: [
+ git://git.stargrave.org/stargrave-blog.git
+ https://git.stargrave.org/git/stargrave-blog.git
+ ]
+
+ # If that ref is set, then comments will be loaded from it
+ CommentsNotesRef: refs/notes/comments
+ # Display link for comment writing, if email is set
+ CommentsEmail: something@example.com
+ }
+
+COMMENTS
+
+Each comment is just a plaintext with From and Date headers. They are
+stored in concatenated netstring serialized format as a Git note to
+corresponding commit. They are added through email by feeding email
+message to sgblog-comment-add.
LICENCE