• Stars
    star
    164
  • Rank 222,864 (Top 5 %)
  • Language
    PHP
  • License
    MIT License
  • Created almost 15 years ago
  • Updated over 13 years ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

Git-based blog/cms for PHP, meant as a replacement for Wordpress

gitblog

A git-based blog/cms platform for PHP, meant as a replacement for Wordpress.

Post-action hooks in git are used to manage an intermediate cache which consist only of structured data (no formatting), allowing dynamic presentation. This is one of the biggest differences tech-wise in comparison to Jekyll and similar tools.

Licensed under MIT means free to use for everyone. See LICENSE for more information.

Features

  • Fully git-based -- no mysql or similar involved
  • Everything is versioned
  • Themes
  • No custom file formats for content (only JSON, Markdown (with Markdown extra) and HTML)
  • High performance
  • Hierarchical comments with optional spam filtering based on Akismet
  • Remote editing (git push/pull)
  • Wordpress import
  • Plugins

(See section "Future features" for a list of possible future features)

Installing & Getting started

Clone a copy of gitblog:

$ cd /path/to/my-blog
$ git clone git://github.com/rsms/gitblog.git

If your web server is not running as yourself, your group, or the root user, you need to change owner. In this example www-data is the web server user. (You will still be able to edit the blog.)

$ chmod -R g+w .
$ sudo chown -R www-data .

Open a web browser and point it to your /my-blog/gitblog. Enter email and your real name -- these will be used for commit messages. Also choose a good pass phrase which in combination with your email will grant you administration privileges in the web administration interface.

When you're done you should see a single "Hello world" post. Okay, all good.

What did just happen? Gitblog initialized a git repository in /path/to/my-blog and added a few standard files and directories. If you ever would like to start over, just delete everything except the gitblog directory and visit /my-blog/gitblog in a browser again.

Let's try editing the hello world post:

$ $EDITOR content/posts/*/*-*-hello-world.html

Make some changes, be creative!

To demonstrate that the "working tree" is indeed a working area and not the live stage, reload your web browser and see that the "Hello world" post is still not modified.

Tip: You can view your work in progress by being signed in and appending ?preview to the url.

Now, let's commit the changes, pusing them live:

$ git commit -m 'Updated my awesome hello-world post' content

Reload your web browser and... voila!

Warnings when committing? If you see error: Could not access 'HEAD@{1}' on stderr when committing, do not worry. This is an issue that currently do not affect gitblog, but we're looking into what causes it.

Importing a Wordpress blog

If you have a Wordpress blog you would like to import, there is a built-in tool which does it for you! Just visit /my-blog/gitblog/admin/import-wordpress.php and follow the simple instructions.

Documentation

The docs directory contains a number of documents covering different parts of Gitblog.

Requirements

  • PHP 5.2 or newer (only standard modules are needed though)
  • Git 1.6 or newer
  • POSIX system

Further play

The gb-config.php file (present in your site root) contains site-specific configuration. A default gb-config.php file, as it looks just after a blog has been setup, contains only the minimum set of paramters. There are a bunch of other paramters which might do something you whish.

Have a look in the file gitblog/gitblog.php -- scroll down a few lines and you'll find a class called gb which houses documentation and a list of all available configuration parameters, as well as their default values.

Known bugs and issues

  • Post-hook system is a bit shaky because of the nature of itself. Running scripts directly instead of POSTing to a URL would be better but many systems does not have CLI PHP or have another version than the web PHP.

Future features

Work in progress

  • Web administration

Planned

  • Pingback
  • Search

Under consideration

  • Configure what parts are versioned (e.g. disable versioning of comments)
  • Alternate storage
  • Caching (memcached, redis, etc)

Authors

  • Rasmus Andersson <rasmus notion.se>

History

A strangely cold morning in june 2009 Mattias Arrelid pressed the "Yeah, upgrade Wordpress". What happened seconds later still brings me down sometimes... Every file on our server--removable by the web server--was deleted in an instant. Many years worth of photos, audio recordings and not to mention the 30+ web sites which disappeared into the void of an unrecoverable ext3 file system.

We swore to never again use Wordpress and to do backups.

As we all like Git--this pretty little creation of the open source community--the blog tool of our future was of course based on Git. But after giving a few days of research we had not found any tool that suited our taste. (The closest match was Jekyll, however we wanted something more flexible, like Word...euhm). So what the heck, after all we are software engineers so why not write something ourselves?

Gitblog was born.

More Repositories

1

inter

The Inter font family
Python
16,727
star
2

peertalk

iOS and Mac Cocoa library for communicating over USB
Objective-C
3,363
star
3

fb-mac-messenger

โšก๏ธ Mac app wrapping Facebook's Messenger for desktop
Objective-C
2,860
star
4

kod

Programmers' editor for OS X [DEAD PROJECT]
Objective-C
2,296
star
5

node-imagemagick

Imagemagick module for NodeJS โ€” NEW MAINTAINER: @yourdeveloper
JavaScript
1,807
star
6

markdown-wasm

Very fast Markdown parser and HTML generator implemented in WebAssembly, based on md4c
C
1,446
star
7

gotalk

Async peer communication protocol & library
Go
1,193
star
8

estrella

Lightweight and versatile build tool based on the esbuild compiler
TypeScript
1,098
star
9

raster

Raster โ€” simple CSS grid system
CSS
806
star
10

js-lru

A fast, simple & universal Least Recently Used (LRU) map for JavaScript
JavaScript
774
star
11

sol

A sunny little virtual machine
C
516
star
12

scrup

Take a screenshot (in OS X) โ€” paste the URL somewhere a second later
Objective-C
405
star
13

chromium-tabs

[historical] Chromium tabs for cocoa applications (project no longer maintained)
Objective-C
388
star
14

wasm-util

WebAssembly utilities
TypeScript
353
star
15

figplug

Figma plugin builder
TypeScript
336
star
16

cocui

Cocoa meets WebKit for more rapid UI development
Objective-C
329
star
17

ec2-webapp

A template I use to quickly set up Node.js-backed web apps on Amazon EC2
324
star
18

llvmbox

Self contained, fully static llvm tools & libs
C
317
star
19

move

A simple, functional-biased, prototypal and powerful programming language that runs on any ES3 (or better) JavaScript platform, aimed toward people new to programming
JavaScript
302
star
20

immutable-cpp

Persistent immutable data structures for C++
C++
281
star
21

rsm

Virtual computer
C
267
star
22

compis

Contemporary systems programming language in the spirit of C
C
196
star
23

uilayer

CALayer-style API for building rich, high-performance UI graphics in WebKit
JavaScript
192
star
24

sublime-theme

My Sublime Text theme
Python
187
star
25

scripter

The Scripter Figma plugin
JavaScript
178
star
26

hue

A functional programming language
C++
170
star
27

co

A programming language in early development
TypeScript
147
star
28

graphviz

Graphviz web app
JavaScript
118
star
29

LazyDispatch

Thin API and concept on top of libdispatch (aka Grand Central Dispatch) for Cocoa Objective-C code.
Objective-C
102
star
30

afcgi

Asynchronous/multiplexing FastCGI for nginx (incl. ref server implementation)
C
101
star
31

rsms-utils

Collection of CLI programs to help with everyday computer life
Shell
99
star
32

colang

Programming language and compiler โ€”WORK IN PROGRESSโ€”
C
71
star
33

xsys

A well-defined system API for abstracting the OS platform
C
68
star
34

figma-plugins

Collection of Figma plugins
TypeScript
67
star
35

mkweb

simple static website generator
JavaScript
63
star
36

fontkit

JS & WASM library for working with fonts
C
62
star
37

js-object-merge

3-way JavaScript Object merging -- Object.merge(v1, v1a, v1b) -> v2
JavaScript
54
star
38

smolmsg

Simple messages
Go
54
star
39

tc

Tokyo Cabinet Python bindings โ€” In need of a new maintainer
C
54
star
40

js-wasmc

Simplifies building of WebAssembly modules in C/C++ and JS
JavaScript
53
star
41

sigi-pixel-font

Sigi pixel fonts [archived]
52
star
42

WebView-OSX-Screensaver

WebKit web view as a screensaver on OS X
Objective-C
52
star
43

Go.tmbundle

TextMate bundle for the Go programming language
51
star
44

oui

Web-app client-server framework developed as part of dropular.net
JavaScript
49
star
45

wlang

Programming language in development
C
47
star
46

smisk

High performance web service framework, written in C but controlled by Python. Used by Spotify infra 2009โ€“2015.
Python
45
star
47

memex

Software for archiving my digital stuff like tweets
Go
45
star
48

ckit

The little C kit
C
44
star
49

workenv

My personal work environment
Emacs Lisp
44
star
50

dropub

DroPub โ€” drop and publish. Simple OS X MenuItem managing secure transfer of files in the background
Objective-C
42
star
51

serve-http

Simple, safe single-file local web server
JavaScript
42
star
52

ghp

Go Hypertext Preprocessor
Go
38
star
53

go-uuid

Binary sortable universally unique identifier
Go
38
star
54

TypoFig

Mac app for assisting type design in Figma
Objective-C
38
star
55

opencv-face-track-basics

Basic code for tracking faces and eyes using OpenCV
C++
37
star
56

qemu-macos-x86-arm64

Run arm64 Linux Alpine virtualized on macOS x86_64 with QEMU
Shell
35
star
57

tspkg

Create small, fast and easily-distributable packages from TypeScript projects
JavaScript
34
star
58

go-immutable

Immutable data structures for Go
Go
34
star
59

webkit-editor

Experimental text editor which runs in the browser
JavaScript
32
star
60

html5-video

Video player in HTML5
JavaScript
30
star
61

jo

Go-style JavaScript ES6 compiler and packager, based on Babel
JavaScript
30
star
62

hovden-stitch

A typeface weekend project from 2002 with a classic "stitching"/"embroidery" look
30
star
63

libcss-osx

Building libcss as Mac OS X universal binary. Developed as part of Kod (rsms/kod)
Objective-C
29
star
64

tumblr-theme-hunch

The theme used on my blog
28
star
65

dawn-lib

Builds Dawn on Linux and macOS as one single easier-to-use library
Shell
28
star
66

browser-require

CommonJS module require() for web browsers
JavaScript
25
star
67

jsont

A minimal and portable JSON tokenizer for building highly effective and strict parsers (in C and C++)
C
25
star
68

prog-lang-tutorial

JavaScript
25
star
69

node-fsdocs

Simple, ACID and versioned file-system based document database
JavaScript
25
star
70

js-fragment

Client-side templating for modern thinkers
JavaScript
24
star
71

node-couchdb-min

Simplistic CouchDB client with a minimal level of abstraction and connection pooling.
JavaScript
24
star
72

fontctrl

Font manager, keeping font files up to date with a distributed repository model
Go
23
star
73

web-clipboard-promise

Demonstrates lazily-evaluated clipboard data on the Web platform
JavaScript
22
star
74

bezier-tangent

Bรฉzier curve toy
JavaScript
22
star
75

twitter-icon

Alternative icon for Twitter.app
21
star
76

dropular-2010

Redacted snapshot of dropular.net, May 2010
JavaScript
21
star
77

dawn-wire-example

[WIP] Demo of a minimal but functional Dawn-based WebGPU client and server
C++
21
star
78

phpab

Abstract Base โ€“ universal PHP runtime library
PHP
18
star
79

NodeCocoa

Embed node.js in Cocoa or write whole Cocoa apps in node.js
Objective-C
17
star
80

ortho-remote

Some code for playing with the Teenage Engineering Ortho Remote
Objective-C
16
star
81

ml-kern

Kerning done by machines (a project to learn more about ML)
JavaScript
16
star
82

asl-logging

Convenience functions and example code for using ASL (Apple System Log facility)
C
14
star
83

js-miniglob

Minimal glob JavaScript implementation ported from Go's path/filepath
JavaScript
13
star
84

hunch-cocoa

An assortment of Cocoa โ€” mixed extensions and additions to Cocoa
Objective-C
13
star
85

wasm-loader

WebAssembly module loader with import resolution
TypeScript
12
star
86

cmdr

Helps writing command-line programs with subcommands in Go
Go
12
star
87

spotifycocoa

Cocoa framework of libspotify
Objective-C
12
star
88

cgui

super duper simple gui for C, wrapping imgui and stb
C
12
star
89

macfusion

Fork of http://svn.macfusionapp.org/macfusion2/trunk/ โ€” With mainly UI changes like menu item icon and OS-standard volume icons) โ€” Download latest release build: http://cloud.github.com/downloads/rsms/Macfusion/Macfusion.zip
Objective-C
12
star
90

hunch-upload

Multiple concurrent files uploads with progress in pure HTML
JavaScript
11
star
91

functional.js

Work in a functional style with JavaScript and TypeScript
JavaScript
11
star
92

coxlang

Programming language w/ subproject that implements the Go scheduler in C++
C++
11
star
93

lolcatos

The lolcat operating system
Assembly
11
star
94

cometps

Simple comet pub/sub
C
9
star
95

node-imgdb

Image fingerprinting
C++
8
star
96

ssl-client-auth-demo

Demonstrates "client-authenticated TLS handshake"
Shell
8
star
97

connect_facebook

Facebook session support for Connect
8
star
98

mode

Node module manager and repository
JavaScript
8
star
99

flup

Drag-and-drop to quickly put images on Flickr
Objective-C
8
star
100

ipvec

Educational persistent vector implementation in C
C
8
star