[openspending-dev] Launching OS for Oakland, Calif.
Tryggvi Björgvinsson
tryggvi.bjorgvinsson at okfn.org
Fri Mar 8 09:32:10 UTC 2013
Þann fim 7.mar 2013 03:42, skrifaði Adam Stiles:
> Can someone please point me to the resources needed to set this up? Not
> clear to me if it's more efficient to fork Cameroon and adapt it, or start
> from scratch. (I'm a coding novice that's relying on others for help, hence
> the naive questions.)
Hi,
So I think the best way for you to proceed (given that you consider
yourself a coding novice) is to try and get something up and running and
tweak it around before you go do something fancy.
I think it would just as good for you to fork cameroon and work from
there. Even if you're a coding novice it should be pretty straight
forward. There is no heavy programming involved. There is just some html
you need to edit.
The site is built with software called Jekyll: http://jekyllrb.com/
What the software does is that within a given directory (say 'cameroon')
it puts together all of the html files (and other files) to create a
website. This might seem weird (why not then just write the html files
yourself). There are some benefits. The biggest one in my opinion is the
extension. Every website has a lot of the same stuff so you can just
write that once and extend those "templates" and fill in the new stuff.
In jekyll everything that starts with underscore is ignored when
building the site. So if you take a look at the _layouts directory it
only contains one file: default.html
That's the extendable template. There is some stuff in there in curly
brackets which get filled in based on each file but the interesting
curly brackets are: {{ content }} that's where the content of the
extensions goes. So if we look at some file, e.g. the one you're
interested in: council.html which you can find under the directory en/
at the top you'll see:
---
layout: default
title: Local Council Budget
section: council
---
That's telling this file to extend default.html in _layouts and sets
some other interesting stuff.
Try playing around with these files and get familiar with jekyll. That
would be a great way to start.
One "difficulty" with the cameroon project is that it provides content
in two locales (english and french). That makes the project structure
more complicated than you need.
You can take a look at the files for "Where does my money go":
https://github.com/openspending/wheredoesmymoneygo.org
Where does my money go is also built with Jekyll (you can see the
_layouts folder there) but is only served in one language so the project
structure is more straightforward. When you're feeling really
adventurous you can try and remove French from you forked cameroon
project (you can also go the other way around and fork Where does my
money go and add features from cameroon but there are things in Where
does my money go you don't want if I understood you correctly so it
doesn't really matter which way you go I think).
Hope this helps. I'll try and help you when I can but I'm only
sporadically here so you'll have to be patient :)
/Tryggvi
More information about the openspending-dev
mailing list