[Infra][help needed]The magic character "-"

Hi all, There are 2 issues are related with the character "-". If anyone has experience on this, please help to solve. Thanks in advance. [1] https://gitee.com/openeuler/website/issues/I1DSYL [2] https://gitee.com/openeuler/blog/issues/I1AZGV -- Regards Fred Li (李永乐)

第一个问题跟默认的markdown引擎相关,2个dash被转成了1个dash,可以考虑在markdown文件中添加反斜杠,防止被转义, 类似于: ``` 原来内容: 默认情况下,date命令显示本地时间。要显示UTC时间,添加--utc或-u参数: 修改为: 默认情况下,date命令显示本地时间。要显示UTC时间,添加\-\-utc或-u参数: ``` 第二个是因为url路径中的空格被转成了dash,所以过滤逻辑失效l,可以在list模板中修改相应的逻辑,类似于 ``` 原来内容(见链接1): {{ range $key, $value := .Site.Taxonomies.tags }}{{ if eq $key $tag }}{{ range $value.Pages }} 修改为: {{ range $key, $value := .Site.Taxonomies.tags }}{{ if eq $key ($tag | urlize) }}{{ range $value.Pages }} ``` archieve是一样的问题 参考链接: 1. https://gohugo.io/functions/urlize/ 2. https://gitee.com/openeuler/blog/blob/master/themes/hugo-blog-jeffprod/layou... On Tue, Apr 7, 2020 at 9:50 PM Fred Li <yongle.li@gmail.com> wrote:
Hi all,
There are 2 issues are related with the character "-". If anyone has experience on this, please help to solve.
Thanks in advance.
[1] https://gitee.com/openeuler/website/issues/I1DSYL [2] https://gitee.com/openeuler/blog/issues/I1AZGV
-- Regards Fred Li (李永乐) _______________________________________________ Infra mailing list -- infra@openeuler.org To unsubscribe send an email to infra-leave@openeuler.org

Thanks a lot. Tomorrow we will try and fix. On Tue, Apr 7, 2020, 23:29 TommyLike Hu <tommylikehu@gmail.com> wrote:
第一个问题跟默认的markdown引擎相关,2个dash被转成了1个dash,可以考虑在markdown文件中添加反斜杠,防止被转义, 类似于: ``` 原来内容: 默认情况下,date命令显示本地时间。要显示UTC时间,添加--utc或-u参数: 修改为: 默认情况下,date命令显示本地时间。要显示UTC时间,添加\-\-utc或-u参数: ``` 第二个是因为url路径中的空格被转成了dash,所以过滤逻辑失效l,可以在list模板中修改相应的逻辑,类似于 ``` 原来内容(见链接1): {{ range $key, $value := .Site.Taxonomies.tags }}{{ if eq $key $tag }}{{ range $value.Pages }} 修改为: {{ range $key, $value := .Site.Taxonomies.tags }}{{ if eq $key ($tag | urlize) }}{{ range $value.Pages }} ``` archieve是一样的问题
参考链接: 1. https://gohugo.io/functions/urlize/ 2. https://gitee.com/openeuler/blog/blob/master/themes/hugo-blog-jeffprod/layou...
On Tue, Apr 7, 2020 at 9:50 PM Fred Li <yongle.li@gmail.com> wrote:
Hi all,
There are 2 issues are related with the character "-". If anyone has experience on this, please help to solve.
Thanks in advance.
[1] https://gitee.com/openeuler/website/issues/I1DSYL [2] https://gitee.com/openeuler/blog/issues/I1AZGV
-- Regards Fred Li (李永乐) _______________________________________________ Infra mailing list -- infra@openeuler.org To unsubscribe send an email to infra-leave@openeuler.org
participants (2)
-
Fred Li
-
TommyLike Hu