4 ms·
Fugitive, blogging for hackers
- guruz 15y agoThe integration with git hooks is an awesome idea.
- guruz 15y agoHm, I want to do --install-remote on my server but I am getting: There's already a git repository here, aborting install. Why? I already have my site in a git repo, I want to install fugitive onto it instead of a new one? :)
- p4bl0 15y agoIf your git repos already exists, use `--install-hooks` and `--install-config`. Since it's the remote repository, you may also need to `git config receive.denyCurrentBranch "ignore"` depending on your configuration. :-)
- guruz 15y agoAh, thanks. Had to do some more stuff, e.g. copy default_files to _templates. Also the fugitive-install macro wasn't set. Still have problems with some CSS I think.. will look into it later.
- p4bl0 15y agoThe fugitive.css and print.css files should be in the "_public" directory (or whatever the value of `git config fugitive.public-dir` is). You know what it would be easier to have fugitive only warn and ask for confirmation if there's already a git repos. Doing that right now. EDIT: Done. You can update fugitive source using `git pull` and then rebuild the install script with `./build.sh`.
- guruz 15y agoCool :) Have you thought of supporting what Wordpress calls "pages"? That way it could be used for more generic CMS tasks, having one template file for both pages and articles.
- p4bl0 15y agoYep, and it would be easy to add, but I never needed it. I don't think that's coming into fugitive itself but a few users with different needs already forked the project to adapt the hooks, not to do that though, but you could fork it to and make it manage pages (which would be like articles except that they won't go into the previous/next chain, and not in the archives or the rss feed either). If you need some help to do it I'll be glad to help.
- guruz 15y agoI'm a bit repelled by the fact that it's .sh .. oh well.
- dfc 15y agoWhy not use ikiwiki? Much more mature, more features, git/svn/hg/bzr support and its written by joey. http://ikiwiki.info http://ikiwiki.info
- p4bl0 15y agoBecause ikiwiki has editing via a web ui (less is more), because fugitive does not "support" git but embraces it and integrates within its workflow[1], and because it's written by me ;-). Edit: [1] by that I mean that once you have used fugitive to setup your repository, you don't need fugitive anymore, you just use git as usual.
- dfc 15y agoSure ikiwiki has a web interface, but if you do not want to use it you do not have to. In fact it makes setting it up that much easier. As far as "embracing git" goes I am not sure what you think ikiwiki does not embrace: $ ikiwiki --setup /etc/ikiwiki/auto-blog.setup $ git clone $BLOGREPO foo $ cd foo $ emacs index.mdwn $ git add index.mdwn $ git commit -m "this blog fully embraces git" Gitit is another option especially appealing if you like pandoc and/or haskell.
- dfc 15y agoNB: When I said it was written by joey I did not mean to imply anything negative about you or your code. All I meant was that it was yet another great piece of software written by joey: * etckeeper (/etc under git) * git-annex (dark git magic that i am only starting to fully appreciate) * moreutils (growing collection of the Unix tools that nobody thought to write long ago, when Unix was young) * tons of trivial debian infrastructure like debian-installer, tasksel, debhelper:) http://kitenet.net/~joey/code/ http://kitenet.net/~joey/code/
- pimeys 15y agoThe name is misleading. It reminds me of this git vim plugin: http://www.vim.org/scripts/script.php?script_id=2975 http://www.vim.org/scripts/script.php?script_id=2975
- p4bl0 15y agoYep, there's a link to fugitive.vim on fugitive's gitorious page for this reason.
- leif 15y agobuild.sh is broken on my machine (os x, with coreutils installed through homebrew), requires this fix: diff --git a/build.sh b/build.sh index 854aeb6..4e1c80f 100755 --- a/build.sh +++ b/build.sh @@ -2,11 +2,12 @@ include_file() { f=`echo -n $2 | sed 's/\//\\\\\//g'` - tmp=`mktemp` + tmp=`mktemp helloXXXXXX` cat "$2" | gzip | base64 > "$tmp" cat "$1" | sed "/#INCLUDE:$f#/ { r $tmp - d }" + d + }" rm "$tmp" }
- p4bl0 15y agoIt's really sad that even those small utils are not perfectly compatible from one platform to another. The `mktemp` from GNU coreutils don't require the model :-(. Luckily the changes you suggest seems to also work with the GNU coreutils, so I'll apply them everywhere (there's a lot of call to mktemp and another similar sed call in the hooks). Thanks :-). Edit: It's done, I credited you as the author of the commit (see here: http://gitorious.org/fugitive/fugitive/commit/006260555956124bf11997e59dca4ee9e1351841 http://gitorious.org/fugitive/fugitive/commit/00626055595612...).
- leif 15y agoYeah, you really have to read the posix specs carefully to catch all these bizarre inconsistencies (or, if you're like me, wait until you find a system something breaks on and then fix it). It's a shame. Thanks :) I'd have sent you a merge request but I don't have a gitorious account.