Build fantastic websites with your favorite template languages.

Views, Partials & Layouts

Serve provides the equivalent of the Views part of the Rails MVC. Partials and layouts make it possible to extract common parts of your website into reusable chunks and templates. Use helper methods to simplify complex logic.

Sass & Compass, built in!

Manage the chaos of your stylesheets with Sass and Compass! Sass adds features like mixins and variables to CSS. Compass provides a “standard library” of sorts or all manner of CSS wizardry.

Static or dynamic – Your choice

Edit and tweak your websites on-the-fly with the Serve server. And when you are ready to deploy, you have two options. Either export to a pure HTML static site or deploy the source on any Ruby-friendly web host.

Great for Rails prototypes

If you use a “Design First” workflow for your web apps you can use Serve to build working HTML prototypes (or mockups) of the finished application to test flow and design decisions, before turning it over to the developers

Serve + Git = The Perfect CMS

Since Serve uses plain text files, you can store a project in Git or any other version control system. Combine it with Textile or Markdown and you’ll achieve the perfect Content Management System for developers.

Made with Rack & Tilt

Serve uses Rack and Tilt under the covers. Rack makes it possible to combine Serve with Rails or Sinatra. Tilt allows you to use Serve with almost any Ruby-based Template library. ERB, Haml, Slim, Liquid, Markdown, or Textile.

Want to get the latest news about Serve? Follow @ServeApp on Twitter.

Getting started

Installation

Getting started with Serve is easy. Because Serve is built with Ruby, you will need to have Ruby installed on your system. Mac OSX ships with Ruby. If you are on Windows you can install Ruby with this easy installation package.

Once Ruby is installed, open up the command prompt, and type:

				
					gem install serve
				
			

Using the serve command

Serve ships with an easy to use command that makes it easy to turn any directory into into a browseable set of web pages. To use it, simply change to the project directory, and type serve:

				
					~$ cd my-project
~/my-project$ serve
				
			

This will start Serve up on your local box on port 4000. To view files with Serve, navigate to http://localhost:4000 in your web browser.

As you navigate around in your browser, Serve will print out a log of it’s activity on the command prompt. When you are ready to stop Serve type: Ctrl+C, or close the command prompt window.

Sub-commands

Serve also includes a number of useful sub-commands:

  • Create – Create a structured Serve project
  • Export – Export a Serve project to regular HTML and CSS
  • Convert – Convert an existing Compass project to a Serve project

Example projects

Reading source code is a great way to improve your coding prowess. You may want to study one or more of the following projects to get a better idea of how to use Serve effectively.

Serve Website Source
Check out the code that is being used for the Serve website. It’s a good example of using Serve to build a static site. We use the Serve export command to generate the site, and a handy rsync rake task to deploy.
Radiant CMS Prototype
The Radiant CMS prototype project is a superb example of using Serve to prototype a Rails application. It’s a fully functional, clickable prototype without the backend. HTML prototypes are a great way to work out design issues before spending a lot of time on the programming.
Adam Stacoviak’s Serve Bootstrap
The Changelog’s very own Adam Stacoviak has put together a Serve bootstrap project with some of his favorite defaults. It comes packed with Haml, Sass, Compass, his own Grid Coordinates CSS grid framework, jQuery and Modernizer. It also comes ready to deploy on Heroku.

Mailing List

Subscribe

The Serve Users List is a great place to learn about how to get the most out of Serve. The mailing list is hosted by Google Groups. To subscribe, you can send an email to [email protected].

Archives

If you have questions about Serve, you may also want to search the mailing list archives.

Preferences / Unsubscribe

If you have a Google account, you can unsubscribe or edit your mailing list preferences by clicking the Preferences button below. If you do not have a Google account, you can unsubscribe from the list by sending an email to [email protected].

Wanna help?

All development for Serve takes place on GitHub. If you are interested in helping out, there are a couple of areas where you can contribute:

Bug Reports
If you run across a bug while using Serve post it to the Github issue tracker. We are passionate about fixing bugs and will try to respond in a timely manner. You can also post about your problem on the mailing list.
Code Contributions
Code contributions are welcome! We have a fairly liberal policy about code contributions. In general if you are fixing a bug or developing a feature to meet a common need your code will be approved. Fork the project and submit a pull request when you are ready for it to be merged. Tests are not required for most things, but helpful. Please note that all pull requests are considered to be freely given and will be licensed under the same license as Serve.
Documentation
Documentation updates and fixes are also welcome. If you discover a typo on the website or in the docs, file an issue on the issue tracker, or update documentation yourself by forking the project and submitting a pull request. Documentation is stored in the website/views/documentation directory.
Web Site Improvements
Improvements to the Serve website are also welcome. Again, just fork the project and submit a pull request. The website is stored in the website directory and is a simple Serve project.

Need help with forking the project or submitting a pull request? Check out these helpful articles:

Сopyright © 2024 get-serve.com. Serve is open-source software. It is completely free for commercial and non-commercial use. Wanna help?