Let's see if netlify can handle this
Tom Rutgers
committed Aug 18, 2018
commit 129a72ea6c4c6274f524847660895d508e76929b
Showing 2
changed files with
4 additions
and 6 deletions
config.rb
+3
-5
| @@ | @@ -31,13 +31,11 @@ ignore '/product.html' |
| ignore '/product/index.html' | |
| activate :blog do |blog| | |
| - | blog.permalink = "posts/{title}.html" |
| + | blog.permalink = "news/{title}.html" |
| + | |
| blog.sources = "posts/{title}.html" | |
| end | |
| - | #Use pretty urls |
| - | activate :directory_indexes |
| - | |
| # With alternative layout | |
| # page '/path/to/file.html', layout: 'other_layout' | |
| @@ | @@ -45,7 +43,7 @@ activate :directory_indexes |
| # https://middlemanapp.com/advanced/dynamic-pages/ | |
| data.products.each do |product| | |
| - | proxy "/products/#{product[1].title.parameterize}", "/product.html", locals: {product: product[1]}, layout: 'layout', :ignore => true |
| + | proxy "/products/#{product[1].title.parameterize}.html", "/product.html", locals: {product: product[1]}, layout: 'layout', :ignore => true |
| end | |
| # Helpers | |
source/partials/products/_product.slim
+1
-1
| @@ | @@ -1,6 +1,6 @@ |
| //link to product by converting the title to a slug | |
| .product | |
| - | = link_to '/products/' + product.title.parameterize + '/' |
| + | = link_to '/products/' + product.title.parameterize + '.html' |
| .product-image | |
| = image_tag product.image | |
| .product-content | |