使用以下方法设置 staticMatic 项目/index.html:
@slug = current_page.gsub(/\.html/, '')
返回"/index(.html)",但应该是/index
更改术语更正: -@slug = current_page.gsub("/", "").gsub(".html", "")如发现:
https://github.com/adamstac/staticmatic-bootstrap/blob/master/src/helpers/application_helper.rb