fugitive: README
fugitive is a blog engine running on top of git using hooks to generate static html pages and thus having only git as dependency.
In its hooks, fugitive uses only standard UNIX® tools that are included in
the GNU core-utils package, plus sh as script interpreter. That's it.
Moreover, everything that can be done using git, is.
No dependencies like rack, heroku, or whatever Ruby gems you can think of. No
configuration files. No metadata in your articles files. Hell, if you want to
you could even make a template that use git log as
storage backend, which means no files either, just and only git.
If you want to build fugitive from the source, clone the git repository:
git clone git://gitorious.org/fugitive/fugitive.git fugitive
Then go in the newly created directory: cd fugitive
, and
run the build script: ./build.sh
.
This will generate an executable file "fugitive" which you can use
to create your blog.
There's two install mode for fugitive: local and remote. The local mode
should be used to install a repository where you edit your blog, and the
remote mode for a repository to which you're going to push to publish your
blog.
The local mode can also be used to publish if you edit your file directly on
your server.
To create you blog run the commande:
fugitive --install-mode <dir>
,
where mode is either "local" or "remote"
This will create the git repos with appropriate hooks, config and files in
<dir>.
If <dir> isn't specified then the current working directory is used.
Once you have installed your blog you need to set the blog-url parameter in your git configuration. See configuration for details.
All this settings are in the "fugitive" section of the git config.
You can change them with the command
git config fugitive.parameter value
,
where parameter is one of the following:
* Those paths are relative to the root of the git repository, must be in it and must not start with "." neither have a '/' at the end. Example: "dir/subdir" is valid but "./dir/subdir" and "dir/subdir/" are not.
Article you want to publish should be file without the .html extension in the articles-dir directory (see configuration). The first line of the file will be used as title and the rest of the file as the content of the article.
By default there's a "_drafts" directory in which you can put articles you are writing and you want to version control in your git repository but you don't want to publish yet.
When you commit, *TODO*: explain the process.
When you push to a remote repository installed with fugitive, the same thing will happen but instead of looking only at the last commit, the hooks will analyse every change since the last push and then (re)generate html files accordingly.
Do not create an article file named "archives".
Do not create an article file named "index".
*TODO*