Skip to content

Instantly share code, notes, and snippets.

@pmallol
Created July 6, 2020 20:46
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save pmallol/9c9d47b23d01b83b49cfa1b2397428c8 to your computer and use it in GitHub Desktop.
Save pmallol/9c9d47b23d01b83b49cfa1b2397428c8 to your computer and use it in GitHub Desktop.
Configure build in Middleman, add a :http_prefix to generate relative links in GitHub Pages
# config.rb
#...
# Build-specific configuration
# https://middlemanapp.com/advanced/configuration/#environment-specific-settings
configure :build do
# Generate relative paths to the repo when deploying to GitHub Pages
config[:http_prefix] = '/middleman-webpack-demo'
config[:css_dir] = ""
config[:js_dir] = ""
# activate :minify_css
# activate :minify_javascript
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment