blocks.md - Markdown to amazing forms and web pages
blocks.md is a tool that takes your Markdown files and turns them into amazing forms and web pages. Here are some key features:
- Easy to write and undestand, especially if you know Markdown
- Support for form fields: text, email, choice, select, etc.
- Create form-slides and slides using
---
, or create single pages instead - Logic jumps and page progress
- Save form responses, with support for partial or slide-level submissions
- Google Sheets integration
- Add class names and attributes
- Data-binding
- Highly customizable, including branding
- Set and read data, create reactive blog posts and articles
- Localizable to any language
- Accessibility out of the box
It's quite a lot to take in, but blocks.md is remarkably simple to use and understand in practice. Please check out our website and see the examples there.
Full documentation: How to use
npm install blocksmd
Once you've installed blocks.md, put all of your Markdown files in a src
directory. You can also have your images and media files in src/static
(that is, within the input directory), and this directory will be copied for you. Once you're ready, run the following command in your CLI:
blocksmd
By default, this command will look for a directory called src
and place the resulting output in a new site
directory. It will also create the necessary CSS and JS files in a new site/blocksmd
directory (that is, within the output directory) and copy the static files. However, you can specify the input and output directories, and also set the name of the static directory using the following options:
Options:
--help Show help [boolean]
--version Show version number [boolean]
-i, --input Input directory [string] [required] [default: "src"]
-o, --output Output directory [string] [required] [default: "site"]
-s, --static-dir-name Static directory name (for images, media files, etc.)
[string] [required] [default: "static"]
So for example, if you wanted to convert the Markdown files in the cms/pages
directory and place the output in website
, you would run the following:
blocksmd -i cms/pages -o website
The output folder is a static site with regular HTML files, and you can host them on Github Pages, Netlify, Vercel, etc. For example, you can literally drag and drop an output folder created using blocks.md to Netlify Drop, and your forms and pages will all work properly.
The following list contains upcoming features that have been planned for blocks.md:
- Date time input
- Multi-choice input with dynamic filtering and results
- Rating input ✅
- Opinion scale and Net Promoter Score® ✅
- File/image upload
- Ranking input (maybe)
- Honeypot fields for spam prevention
- Layout options with images and media (also slide level)
- Classic form style
- Payments
- WordPress plugin
- Cloud version
- Go open-source
Run the following to build the project:
npm run build
Make sure you have the dev dependencies installed.
Run the following to test the project:
npm run test
Again, make sure you have the dev dependencies installed.