[
https://issues.apache.org/jira/browse/FLINK-18496?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17166374#comment-17166374
]
Zhilong Hong commented on FLINK-18496:
--------------------------------------
I think in fact the plugin is conflict with the excerpt rather than the
{{_post}} folder.
1. After upgrading to Jekyll 4.0.1, I get errors:
[https://gist.github.com/Thesharing/a4681dcef6229903088fb9eb49eaea6f] . The
build stuck in endless loop when it comes to:
{code:bash}
/srv/flink-web/.rubydeps/ruby/2.5.0/gems/jekyll-multiple-languages-2.0.3/lib/jekyll-multiple-languages/multilang.rb:55:in
`append_data_for_liquid'
/srv/flink-web/.rubydeps/ruby/2.5.0/gems/jekyll-multiple-languages-2.0.3/lib/jekyll-multiple-languages/document.rb:71:in
`to_liquid'
{code}
The function {{append_data_for_liquid}} calls {{deep_merge_hashes!}} in
jekyll/utils.rb, and the implementation of {{deep_merge_hashes!}} is different
between Jekyll 3 and 4.
In Jekyll 3:
{code:ruby}
def deep_merge_hashes!(target, overwrite)
overwrite.each_key do |key|
if overwrite[key].is_a? Hash and target[key].is_a? Hash
target[key] = Utils.deep_merge_hashes(target[key], overwrite[key])
next
end
target[key] = overwrite[key]
end
if target.default_proc.nil?
target.default_proc = overwrite.default_proc
end
target
end
{code}
In Jekyll 4:
{code:ruby}
def deep_merge_hashes!(target, overwrite)
merge_values(target, overwrite)
merge_default_proc(target, overwrite)
duplicate_frozen_values(target)
target
end
{code}
The loop gets stuck at {{duplicate_frozen_values}}.
I try to remove {{duplicate_frozen_values}} and build the doc. The build
succeeds. However, the blogs without excerpts in markdown have no automatically
generated excerpts in the web page.
2. I renamed the folder {{_posts}} to other names like {{articles}}. The build
succeeds. But the reference of {{_posts}} in {{index.md}} is broken. Then I try
to upgrade Jekyll to 4.1.1 and setting {{page_excerpts}} to {{true}}, which
enables excerpts for every page. The build fails like above. So in my opinion,
the issue is related to the process of generating excerpts with
"jekyll-multiple-language".
I'm not familiar with Ruby, and I have no idea how to debug Jekyll with IDE. I
think I'm stuck here right now, and I'd really appreciate it if anyone could
help me with this issue.
> Anchors are not generated based on ZH characters
> ------------------------------------------------
>
> Key: FLINK-18496
> URL: https://issues.apache.org/jira/browse/FLINK-18496
> Project: Flink
> Issue Type: Bug
> Components: Project Website
> Reporter: Zhu Zhu
> Assignee: Zhilong Hong
> Priority: Major
> Labels: starter
>
> In ZH version pages of flink-web, the anchors are not generated based on ZH
> characters. The anchor name would be like 'section-1', 'section-2' if there
> is no EN characters. An example can be the links in the navigator of
> https://flink.apache.org/zh/contributing/contribute-code.html
> This makes it impossible to ref an anchor from the content because the anchor
> name might change unexpectedly if a new section is added.
> Note that it is a problem for flink-web only. The docs generated from the
> flink repo can properly generate ZH anchors.
--
This message was sent by Atlassian Jira
(v8.3.4#803005)