Nanoc:在github上部署时无法将图像路径更改为绝对URL

时间:2018-10-15 15:33:27

标签: ruby-on-rails github nanoc

这是我的项目https://github.com/mynukeviet/aztest-docs,我看到内容图像有问题。我正在导入过滤器:relativize_paths,在规则文件中输入:html,但在网站上查看时仅更改了CSS路径,并且图像路径未更改。

#!/usr/bin/env ruby

compile '/index.*' do
  layout '/main.*'
end

compile '/**/*.html' do
  layout '/default.*'
end

compile '/**/*.md' do
  filter :kramdown  
  layout '/default.*'
  filter :relativize_paths, type: :html
end

route '/**/*.{html,md}' do
  if item.identifier =~ '/index.*'
    '/index.html'
  else
    item.identifier.without_ext + '/index.html'
  end
end

compile '/**/*' do
  write item.identifier.to_s
end

layout '/**/*', :erb

这是我的内容https://github.com/mynukeviet/aztest-docs/blob/master/content/start.md

请帮我修复它,谢谢!

0 个答案:

没有答案