Using nanoc for static site generation. Jekyll/Octopress are hard-coded for blogging, while Nanoc is much simpler, doesn't take any assumptions and allows to build whatever type of content (not just blogs).
To start developing,
- Clone this repository
- Forget about whatever present in the root folder
- Worry only about the
generatorfolder cd generatorand dobundle install. You'll need RVM + Ruby 2.0- Make changes (see below folder structure). Mostly you'll be dealing with
generator/content - Run
nanocto compile the website - Run
nanoc viewto start a server and browse tolocalhost:3000
For ease, there is a Guardfile. You can run bundle exec guard, it will keep watching for changes and re-compile the site whenever any file is changed.
generator- this is the main source code, rest are all generated source code that can be ignoredgenerator/assets- contains all assetsgenerator/assets/app.sass- contains the main stylesheetgenerator/assets/img/speakers- contains speaker imagesgenerator/content- content for each geek nightgenerator/layouts- layouts for default and archive versionsgenerator/Rules- routing rules
- Pure HTML/CSS/Javascript website. No JQuery.
- Used HTML5 Boilerplate to generate the skeleton.
- Used colourlovers.com for the color swatches.
- Using SASS and Foundation for all the Styling.
- Icon fonts were generated and downloaded from Fontello. Only icons from the Modern Pictogram set were used for consistency.
To update the website:
- clone the github repository and cd into it:
git clone https://github.com/twkampala/geeknight.git && cd geeknight, - Once inside the repository,
cd generator(This is the content generator that usesnanoc)
- once inside the generator directory, you will notice that its a ruby application, thus we need to install a few gems most importantly 'nanoc'
- To achieve this we need to run:
bundle install(all required gems are listed in theGemfile) - If for some reason you get an error here, it could be bacsue you don't have bundler, If thats the case, then just run
gem install bundler - Once this finishes, you should be able to run
nanocto compile andnanoc viewto serve the static website on http:://localhost:3000. You may also just double click the index.html in the root directory ("geeknight")
Adding a new edition is really easy, three simple steps:
cp generator/content/index.html [Year - previous months].htmle.g If last edition was in July 2015,cp generator/content/ndex.html generator/content/2015-07.html. This makes sure that the previous months is available in the flashback section/Previous editions.- Now, Open
generator/content/index.htmland edit it with the up-coming edtions details.