小编ben*_*ker的帖子

Middleman路径不在子目录中工作

所以,这是我的第一个中间人项目,我正在努力解决中间人管理链接的问题.

实际上,我已经在github页面上进行了设置.我的所有资产都在工作,所以我做对了,但由于网站位于子目录中,导致每个页面的路径都失败了.

基本上root/directoryname/index.html有效但每个链接都返回一个目录,所以我应该有root/directoryname/page.html我得到root/page.html.

在这里,有一个链接可以看到它

这是我的config.rb的样子:

# Reload the browser automatically whenever files change
configure :development do
activate :livereload
end

# Methods defined in the helpers block are available in templates
# helpers do
#   def some_helper
#     "Helping"
#   end
# end

set :css_dir, 'css'

set :js_dir, 'js'

set :images_dir, 'img'

# Build-specific configuration
configure :build do
  # For example, change the Compass output style for deployment
  activate :minify_css

  # Minify Javascript on build
  activate :minify_javascript

  # Enable cache buster …
Run Code Online (Sandbox Code Playgroud)

html ruby path hyperlink middleman

5
推荐指数
1
解决办法
3865
查看次数

标签 统计

html ×1

hyperlink ×1

middleman ×1

path ×1

ruby ×1