Skip to content
Snippets Groups Projects
Commit f25e00a3 authored by Stan Hu's avatar Stan Hu
Browse files

Document how to use the --glob parameter

This makes it easier to debug a single page, especially when it fails to
build.
parent 98d93650
No related branches found
No related tags found
No related merge requests found
Loading
Loading
@@ -194,3 +194,29 @@ or to execute the last two commands just run:
```sh
bin/run
```
## Building a single file
If you only want Middleman to build a single file, you can do that via the `--glob` parameter.
Here are a few things to keep in mind:
* The glob parameter must match the **destination** file.
* The `--no-clean` option should be included or Middleman will wipe out
files that do not match the glob parameter.
For example, here's how to rebuild the Contribute page. Note how
`source/company/culture/index.html.md.erb` is mapped to
`company/culture/contribute/index.html`:
```sh
bundle exec middleman build --glob={company/culture/contribute/index.html} --no-clean
```
For blog posts,
`source/posts/2017-05-23-attributes-of-successful-development-teams.html.md`
maps to `2017/05/23/attributes-of-successful-development-teams/index.html`:
```sh
bundle exec middleman build --glob={2017/05/23/attributes-of-successful-development-teams/index.html} --no-clean
```
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment