Skip to content

Instantly share code, notes, and snippets.

@pmallol
pmallol / middleman-webpack-demo config.rb
Created July 6, 2020 20:46
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'
@pmallol
pmallol / middleman-webpack-demo index.html.erb
Last active July 6, 2020 20:54
Create an About page in Middleman app hosted in GitHub Pages
<!-- ../souce/about/index.html.erb -->
---
title: About
---
<h1>
Hi there!
</h1>
@pmallol
pmallol / middleman-webpack-demo index.html.erb
Created July 6, 2020 20:54
Add an About link to the Index page in Middleman app hosted in GitHub Pages
<!-- ../source/index.html.erb -->
---
title: Welcome to Middleman
---
<!-- ... -->
<%= link_to 'About', "about/index.html" %>