Warning: file_get_contents(/data/phpspider/zhask/data//catemap/0/assembly/5.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Utf 8 Jekyll说液体异常:documentation.html中US-ASCII的字节序列无效_Utf 8_Jekyll - Fatal编程技术网

Utf 8 Jekyll说液体异常:documentation.html中US-ASCII的字节序列无效

Utf 8 Jekyll说液体异常:documentation.html中US-ASCII的字节序列无效,utf-8,jekyll,Utf 8,Jekyll,我正试图在GitLab CI上运行jekyll build 这是我的.gitlab ci.yml: pages: script: - export LC_ALL=en_US.UTF-8 - export LANG=en_US.UTF-8 - gem install jekyll - jekyll build --destination public artifacts: paths: - public 当任务运行时,我收到以下错误: Gene

我正试图在GitLab CI上运行
jekyll build

这是我的
.gitlab ci.yml

pages:
  script:
  - export LC_ALL=en_US.UTF-8
  - export LANG=en_US.UTF-8
  - gem install jekyll
  - jekyll build --destination public
  artifacts:
    paths:
    - public
当任务运行时,我收到以下错误:

      Generating... 
  Liquid Exception: invalid byte sequence in US-ASCII in documentation.html
jekyll 3.1.2 | Error:  invalid byte sequence in US-ASCII

ERROR: Build failed with: exit code 1

更多信息
documentation.html
是:

---
layout: page
title: Documentation
description: Learn how to create awesome poppers
---
<!-- This page is generated by the grunt doc task of the master branch! Don't edit it! -->
{% markdown documentation.md %}

尝试 如您所见,我已经尝试将
LC\u ALL
LANG
设置为
en\u US.UTF-8

我还将
编码:utf-8
添加到我的
\u config.yml
中,但它仍然不起作用

另一种尝试是在markdown插件中使用
@text=text.encode(“iso-8859-1”).force_编码(“utf-8”).strip


建议?

我删除了markdown插件并使用了以下内容:

---
layout: page
title: Documentation
description: Learn how to create awesome poppers
---
<!-- This page is generated by the grunt doc task of the master branch! Don't edit it! -->
{% capture documentation %}
{% include documentation.md %}
{% endcapture %}
{{ documentation | markdownify }}
---
版面:第页
标题:文件
描述:学习如何创造令人敬畏的波普尔
---
{%capture documentation%}
{%include documentation.md%}
{%endcapture%}
{{文档|标记化}

现在一切似乎都很好。

我也遇到了同样的问题,找到了这个解决方案,对我来说很有效。

---
layout: page
title: Documentation
description: Learn how to create awesome poppers
---
<!-- This page is generated by the grunt doc task of the master branch! Don't edit it! -->
{% capture documentation %}
{% include documentation.md %}
{% endcapture %}
{{ documentation | markdownify }}
image: ruby:2.3

before_script:
  - apt-get update >/dev/null
  - apt-get install -y locales >/dev/null
  - echo "en_US UTF-8" > /etc/locale.gen
  - locale-gen en_US.UTF-8
  - export LANG=en_US.UTF-8
  - export LANGUAGE=en_US:en
  - export LC_ALL=en_US.UTF-8