Wget更改域名

时间:2018-11-09 04:07:57

标签: wget ghost-blog

我正在尝试转换在localhost:2368上运行的幽灵网站。我正在使用buster,它使用wget从localhost:2368下载文件,并将其变成静态网站。我的问题是wget将所有引用都引用为localhost:2368。

<link rel="stylesheet" type="text/css" 
href="http://localhost:2368/assets/styles/style.css">

我已经确定生成静态网站时调用wget的无效代码:

if arguments['generate']:
    command = ("wget "
               "--recursive "             # follow links to download entire site
               "--convert-links "         # make links relative
               "--page-requisites "       # grab everything: css / inlined images
               "--no-parent "             # don't go to parent level
               "--directory-prefix {1} "  # download contents to static/ folder
               "--no-host-directories "   # don't create domain named folder
               "--restrict-file-name=unix "  # don't escape query string
               "{0}").format(arguments['--domain'], static_path) 

我使用py -m buster generate --domain = localhost:2368生成网站。有什么办法可以通过引用我的网站来生成这些文件?示例应该是abc.com,而不是localhost:2368。

1 个答案:

答案 0 :(得分:1)

破坏性的GitHub回购有两个问题,不能解决这个问题。我在原始回购中找到了一个经过修复的拉回购和一些非常特定的拉取请求。将合并请求与合并请求中的文件合并有助于为我解决此问题。对于那些对Ghost静态页面有效的克星回购感兴趣的人,请参考以下内容:

请参阅此pull request,此拉取请求解决了Windows的css版本控制问题。 GitHub Repo可以解决已解决的问题。此修复程序使我们可以传入用于创建链接的--new-domain选项。

显然,不再支持现有的仓库。

相关问题