# Middleman Integration
# Create a new Middleman site
To start a new site on middleman, you can run the following command to build a Middleman site in the current folder:
$ middleman init my-middleman-site
cd into my-middleman-site to open folder and run the following command to start a local dev server:
$ bundle exec middleman server
Middleman will start a development environment accessible by default at localhost:4567
.
# Add a Contact Section to your Middleman site
Middleman uses a file-based routing system. For example, source/contact.html.erb will be mywebsite.com/contact.html/
.
Create a new file called contact.html.erb
under source directory and copy the code block below to add a contact section.
<form accept-charset="UTF-8" action="https://getform.io/{your-form-endpoint}" method="POST" enctype="multipart/form-data" target="_blank">
<input type="email" name="email" placeholder="Your Email">
<input type="text" name="name" placeholder="Your Name">
<input type="text" name="message" placeholder="Your Message">
<button type="submit">Send</button>
</form>
# Run your Middleman site locally to finalize setup
Run the following command to see your Middleman form in action at localhost:4567/contact.html/
:
bundle exec middleman server
That's it! Your Middleman site is now running Getform.