Is it possible to have more than one page in the root folder?

Seems like middleman creates a separate folder for each page that is not index.html.

In addition, trying to access the pages shows broken links to all css.

Is there a way around this?

What I want:

index.html
about.html

All links to, css, images, etc. should be relative

What I end up with:

index.html
about/index.html     << this page has incorrect paths to all css and images

How can I achieve what I need?

You could turn of Directory Indexes - which does the about/index.html part

Also understanding sprockets use with middleman is important:

ie css id brought in with - = stylesheet_link_tag :all, media: “all” which should then be relative I believe

Hello @andreimoment

In the config.rb file try to

  activate :relative_assets
  set :relative_links, true

You can found a live axample here

Cheers!

Thank you!

Switched off directory_indexes for build and things work as intended.

There were a few missing images which were due to inlining some of the CSS using stylesheet_inline_tag and forgetting to change the image references to be relative to the page vs. relative to the stylesheets.

You can use a helper for that :wink:

.m-header {
  background-image: url(image-path('logo.png'));
}

Thank you. This was a tiny image so I ended inlining it…