是否可以在 jekyll 中附加数组

Is that possible to append array in jekyll

是否可以在 jekyll 中追加数组?

喜欢,将 {{ site.tweets }} 附加到 {{ site.posts }}?

数据如下:

- name: "日本語"
  prog_num: 10
  prog: "10%"
  img: ""
  type: "language"
- name: "中文"
  prog_num: 100
  prog: "100%"
  img: ""
  type: "language"

concat 无效:

{% assign hl = site.data.skills_human_languages %}
{% assign pl = site.data.skills_programming_languages %}
{% assign fw = site.data.skills_frameworks %}
{% assign dt = site.data.skills_design_tools %}
{% assign all_skills = (hl | concat: pl | concat: fw | concat: dt) %}

我正在使用 3.3.1

版本的 jekyll b 命令

试试这个:

{% assign tweetsAndPosts = site.tweets | concat: site.posts %}

然后你可以使用tweetsAndPosts变量来做任何你需要做的事情。

Liquid Templates Reference.

提供了有关串联工作原理的文档