Hand-crafted frontend development
Go to file
dependabot[bot] 9833b46820
Bump rack from 2.2.3 to 2.2.4 (#2578)
Bumps [rack](https://github.com/rack/rack) from 2.2.3 to 2.2.4.
- [Release notes](https://github.com/rack/rack/releases)
- [Changelog](https://github.com/rack/rack/blob/main/CHANGELOG.md)
- [Commits](https://github.com/rack/rack/compare/2.2.3...2.2.4)

---
updated-dependencies:
- dependency-name: rack
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-10-21 14:38:43 -07:00
.devcontainer Update devcontainer 2022-01-30 18:18:33 +00:00
.github Add notstale tag 2022-07-18 10:42:23 -07:00
middleman bundle update and ruby 3.1+ 2022-01-30 17:59:48 +00:00
middleman-cli Minify JS: migrate from Uglifier to Terser gem to support ES6 (#2532) 2022-01-30 19:37:53 +00:00
middleman-core Update support for haml 6 (#2571) 2022-09-21 13:07:43 -07:00
.editorconfig Support dark mode color scheme (#2481) 2021-07-28 08:05:12 -07:00
.gitignore Fix issue with to_json on data proxies. For #2228 2019-02-26 09:36:03 -08:00
.rubocop.yml Bump rubocop from 0.93.1 to 1.0.0 (#2391) 2020-10-21 16:40:44 -07:00
.yardopts Improve documentation for Middleman::Extension 2014-05-11 00:35:15 -07:00
CHANGELOG.md reflect new default js compressor in changelog [ci skip] (#2537) 2022-02-21 12:33:11 -08:00
CODE_OF_CONDUCT.md Create CODE_OF_CONDUCT.md 2018-11-11 14:52:31 -08:00
Gemfile External pipeline manifest helpers (#2528) 2022-01-30 09:44:54 -08:00
Gemfile.lock Bump rack from 2.2.3 to 2.2.4 (#2578) 2022-10-21 14:38:43 -07:00
ISSUE_TEMPLATE.md
LICENSE.md WIP Dependencies (#2220) 2018-11-17 11:29:37 -08:00
README.md Update README.md 2022-07-19 11:05:30 -07:00
Rakefile Update rubocop + use enable-frozen-string-literal (#2354) 2020-08-16 12:08:50 -07:00
gem_rake_helper.rb 2018 cleanup 2018-09-11 11:43:07 -07:00

README.md

Middleman - Makes developing websites simple

Gem Version License

Middleman is a static site generator using all the shortcuts and tools available in modern web development. Check out middlemanapp.com for detailed tutorials, including a getting started guide. You can also follow @middlemanapp for updates.

Why Middleman?

These days, many websites are built with an API in mind. Rather than package the frontend and the backend together, both can be built and deployed independently using the public API to pull data from the backend and display it on the frontend. Static websites are incredibly fast and require very little RAM. A front-end built to stand-alone can be deployed directly to the cloud or a CDN. Many designers and developers simply deliver static HTML/JS/CSS to their clients.

  • Uses Sass for DRY stylesheets.
  • Bring your own asset pipeline (WebPack, Babel, Sprockets or any other).
  • Easy templating with ERb or Haml.

Middleman gives the stand-alone developer access to all these tools and many, many more.

Installation

Middleman is built on Ruby and uses the RubyGems package manager for installation. These are usually pre-installed on Mac OS X and Linux. Windows users can install both using RubyInstaller. For windows RubyInstaller-Devkit is also required.

gem install middleman

Getting Started

Once Middleman is installed, you will have access to the middleman command. First, let's create a new project. From the terminal:

middleman init MY_PROJECT

This will create a new Middleman project located in the "MY_PROJECT" directory. This project contains a config.rb file for configuring Middleman and a source directory for storing your pages, stylesheets, javascripts and images.

Change directories into your new project and start the preview server:

cd MY_PROJECT
middleman server

The preview server allows you to build your site, by modifying the contents of the source directory, and see your changes reflected in the browser at: http://localhost:4567/

To get started, simply develop as you normally would by building HTML, CSS, and JavaScript in the source directory. When you're ready to use more complex templates, simply add the templating engine's extension to the file and start writing in that format.

For example, say I am working on a stylesheet at source/stylesheets/site.css and I'd like to start using Sass. I would rename the file to source/stylesheets/site.css.scss and Middleman will automatically begin processing that file as Sass. The same would apply to CoffeeScript (.js.coffee), Haml (.html.haml) and any other templating engine you might want to use.

Finally, you will want to build your project into a stand-alone site. From the project directory:

middleman build

This will compile your templates and output a stand-alone site which can be easily hosted or delivered to your client. The build step can also compress images, employ JavaScript & CSS dependency management, minify JavaScript & CSS and run additional code of your choice. Take a look at the config.rb file to see some of the most common extensions which can be activated.

Learn More

A full set of in-depth instructional guides are available on the official website at: https://middlemanapp.com

Additionally, up-to-date generated code documentation is available on RubyDoc

Community

The official community forum is available at: https://forum.middlemanapp.com

Contributing to Middleman

Contributions are welcomed! To get started, please see our contribution guidelines, which include information on submitting bug reports, and running the tests.

Donate

Click here to lend your support to Middleman

Versioning

This library aims to adhere to Semantic Versioning 2.0.0. Violations of this scheme should be reported as bugs. Specifically, if a minor or patch version is released that breaks backward compatibility, that version should be immediately yanked and/or a new version should be immediately released that restores compatibility. Breaking changes to the public API will only be introduced with new major versions. As a result of this policy, you can (and should) specify a dependency on this gem using the Pessimistic Version Constraint with two digits of precision. For example:

spec.add_dependency 'middleman-core', '~> 4.0'

License

Copyright (c) 2010-today Thomas Reynolds. MIT Licensed, see LICENSE for details.