]> Sergey Matveev's repositories - sgblog.git/blobdiff - README
Leave comments link on gopher page
[sgblog.git] / README
diff --git a/README b/README
index 41ce3ca014ba836a613771c37b02116af9f36acd..282be72f157f9b8fcb2ab31e0d4e408735953c0f 100644 (file)
--- a/README
+++ b/README
@@ -1,12 +1,12 @@
-                SGBlog -- Git-based CGI blogging engine
-                =======================================
+            SGBlog -- Git-based CGI/inetd blogging/phlogging engine
+            =======================================================
 
 DESCRIPTION
 
-SGBlog is a simple blogging engine with a Git-based storage and CGI
-interface with HTTP-server. It can be used as a cgit replacement for
-readonly Git repository viewing and Atom feed generation. But it has
-better features:
+SGBlog is a simple blogging engine with a Git-based storage, CGI
+interface for HTTP-server, inetd interface for serving as Gopher server.
+It can be used as a cgit replacement for readonly Git repository viewing
+and Atom feed generation. But it has better features:
 
 * URLs are tried to be converted to clickable links
 * SHA1 hashes are tried to be converted to blog links itself
@@ -14,38 +14,64 @@ better features:
 * 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
+* Gopher protocol support for phlog creation
+* 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
+    }
+
+Gopher mode can use the same configuration file, but it requires much
+less options:
+
+    {
+      GitPath: /home/git/pub/stargrave-blog.git
+      Branch: refs/heads/english
+      Title: "English Stargrave's blog"
+
+      AboutURL: http://blog.stargrave.org/
+
+      CommentsNotesRef: refs/notes/comments
+      CommentsEmail: something@example.com
+
+      GopherDomain: phlog.stargrave.org
+    }
+
+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