#The Hub: The Digital Content Hub for RubyConf Miami
This is the code which builds the RubyConf Miami Hub. It's built using middleman and is designed for easy contribution. If you're interested in how it works, check out the code which drives the extension.
You don't really need to understand how the whole system works to add talk notes. Simply fork the repo and do this in your fork:
- Copy the notes from our example talk to the directory of the talk your notes
are for (in our case, it's Xavier Shay's talk on profiling ruby)
$ cp source/talks/example-talk/notes/example.md source/talks/profiling-ruby/notes/my-notes.md
- Edit your notes, remembering to change the author name. (everything below the
last
---
is just markdown) - Add the file to git
$ git add source/talks/profiling-ruby/notes/my-notes.md
- Push it up and make a pull request!
After that, we'll look at your notes, and merge them into the hub!
Don't forget, Ninefold are giving away credit to people who contribute to the hub. If you're interested, here are the terms.
It should be pretty simple to get this going:
$ git clone https://github.com/ninefold/rubyconf_miami_hub
$ cd rubyconf_miami_hub
$ bundle install
$ middleman server
From there, go forth and edit. If you have livereload on your browser, then it should automatically refresh when you make changes.
We've aimed to make it as easy to contribute to the hub as possible. For adding content it's simply a matter of adding a file in the right place, or editing one.
All of the content sits inside the source/
directory.
Talks live in the source/talks
directory. They are free text which makes up the content above the talk preview on each of the talk pages. It's in Markdown format. Go ahead and edit as you see fit to make it better.
For more details, look at the README for talks
Events live in the source/events
directory. Just like talks, they're free text. Again, they're in Markdown, and there there to be added to and edited to make them better.
For more details, look at the README.
The magic lives in the lib/the_hub
directory. It's implemented as a Middleman extension. In short, what it does is look at the sitemap and add behaviour to different resources based on where they are in the path (thus a talk, which lives in source/talks
has methods like talk.speaker
and talk.room
.)
To add another kind of resource, copy one of the modules like TheHub::Talk
, replace the SELECTOR
regex with one that will match the paths where you'll be keeping the files for your resource type.
The planner doesn't really hold much data of its own. It uses the metadata of the talks and events to populate its data. Check out the Planner, Day, and Session classes to understand it more fully.
Frontmatter is really what powers the hub. The metadata stored in front matter allows the planner to be built as it is and allows you to attach useful things to rendered content. Check out the READMEs for talks and events for more information about their frontmatter metadata.
If you want to contribute to the hub, then it's much like any other open source prodject:
- Fork the project
- Make your changes
- Make a pull request
Easy, n'est-ce pas?