Jekyll,将 html 作为字符串嵌入
Jekyll, embed html as string
我在 jekyll 的降价文件中有一个 html 片段,问题是当它被解析时,liquid 试图解析它,无论如何我可以告诉 liquid 不要解析特定行或阻止?
public render() {
<ExifOrientationImg markdown="span" src={img} style={{ height: '100%', width: '100%', objectFit: 'cover' }} />
}
投掷:
Liquid Warning: Liquid syntax error (line 25): Expected end_of_string but found colon in "{{ height: '100%', width: '100%', objectFit: 'cover' }}" in /Users/osp/dev/githubpage/_posts/2019-08-27-react-rotating-image.md
Liquid Warning: Liquid syntax error (line 63): Expected end_of_string but found colon in "{{width: '100%', height: '100%', display: 'flex', alignItems: 'center', justifyContent: 'center'}}" in /Users/osp/dev/githubpage/_posts/2019-08-27-react-rotating-image.md
Liquid Warning: Liquid syntax error (line 86): Expected end_of_string but found colon in "{{maxWidth: '100%', maxHeight: '100%'}}" in /Users/osp/dev/githubpage/_posts/2019-08-27-react-rotating-image.md
...done in 0.138611 seconds.```
{% raw %}
liquid tag 禁用 Liquid 解析:
{% raw %}
public render() {
<ExifOrientationImg markdown="span" src={img} style={{ height: '100%', width: '100%', objectFit: 'cover' }} />
}
{% endraw %}
我在 jekyll 的降价文件中有一个 html 片段,问题是当它被解析时,liquid 试图解析它,无论如何我可以告诉 liquid 不要解析特定行或阻止?
public render() {
<ExifOrientationImg markdown="span" src={img} style={{ height: '100%', width: '100%', objectFit: 'cover' }} />
}
投掷:
Liquid Warning: Liquid syntax error (line 25): Expected end_of_string but found colon in "{{ height: '100%', width: '100%', objectFit: 'cover' }}" in /Users/osp/dev/githubpage/_posts/2019-08-27-react-rotating-image.md
Liquid Warning: Liquid syntax error (line 63): Expected end_of_string but found colon in "{{width: '100%', height: '100%', display: 'flex', alignItems: 'center', justifyContent: 'center'}}" in /Users/osp/dev/githubpage/_posts/2019-08-27-react-rotating-image.md
Liquid Warning: Liquid syntax error (line 86): Expected end_of_string but found colon in "{{maxWidth: '100%', maxHeight: '100%'}}" in /Users/osp/dev/githubpage/_posts/2019-08-27-react-rotating-image.md
...done in 0.138611 seconds.```
{% raw %}
liquid tag 禁用 Liquid 解析:
{% raw %}
public render() {
<ExifOrientationImg markdown="span" src={img} style={{ height: '100%', width: '100%', objectFit: 'cover' }} />
}
{% endraw %}