Vim Underground is a couchapp, that is, a web application served from CouchDB itself. While most of the application makes use of CouchDB’s awesome features, it uses node.js and ruby sparingly to overcome certain limitations of CouchDB and to speed up development.
CouchDB displays most of the data for the site through several views and lists. Templates, inside the templates
directory, provide the underlying HTML. The lib
directory contains modules that one can use inside of lists, shows, views, and updates. Speaking of which, the db
folder houses those functions, along with filters that the app consumes to notify of new articles and to keep up to date with the latest script activity from the vim-scripts atom feed.
VU uses soca for pushing changes to CouchDB. Additionally, seeding the database requires thor, along with compass for the look and feel of the site. See the Gemfile
for other ruby dependencies.
The Jimfile
lists all JavaScript dependencies. Rather than letting soca concatenate all our scripts into one big file, VU uses yepnope.js instead to load them asynchronously. Scripts are divided into three sections: core, plugins, and application. Core includes all mandatory scripts, such as Sammy.js and jquery.couch. Plugins includes scripts like sammy.mustache and h5validate. Lastly, application contains helpers, models and app.js.
VU uses CouchDB external processes for things like sending emails and new article submission notifications. In addition, there’s a screen scraper script in data/tasks
for scraping vim plugin information from the vim site.
VU is a subscriber to the vim-scripts atom feed. To subscribe, follow the instructions here. Make sure to specify the callback as http://yourapp.com/feeds/feed-name
.
- Layout for mobile
- Search functionality
The Vim Underground logo is licensed under Creative Commons Attribution-NonCommercial-ShareAlike 3.0 Unported. All code is licensed under the wtfpl , reproduced here for convenience:
DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE Version 2, December 2004 Copyright (C) 2004 Sam Hocevar <[email protected]> Everyone is permitted to copy and distribute verbatim or modified copies of this license document, and changing it is allowed as long as the name is changed. DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION 0. You just DO WHAT THE FUCK YOU WANT TO.