Jekyll 项目不一致

jekyll projects are not aligned

我开始尝试使用 Jekyll 来设置个人页面,但我偶然发现了一个奇怪的问题:添加第 4 个项目时,它没有正确对齐。

这是 projects.yml 文件:

- name: A scalable Grid Computing framework for extensible phylogenetic profile construction
  i18n: name
  url: https://www.researchgate.net/publication/307585591_A_Scalable_Grid_Computing_Framework_for_Extensible_Phylogenetic_Profile_Construction
  img: /static/assets/img/landing/springerLink.png
  desc: Published by SpringerLink, this paper presents my design and implementation of a distributed framework that can exploit Grid infrastructure resources (EGI) to scale-up common genomics workflows. Achieved a 30x speed-up compared to serial implementations.

- name: Robotics Simulation
  i18n: name
  gh_user: steremma
  repo: stdr_simulator
  img: /static/assets/img/landing/stdr.png
  desc: Integrated a new GUI into a robotics application written in C++ and implemented several design and performance optimizations. The project is currently distributed as an official ROS package.

- name: Natural Language Processing
  i18n: name
  gh_user: steremma
  repo: gensim
  img: /static/assets/img/landing/gensim.png
  desc: I have contributed to one of the most popular Python open source packages in Topic Modeling called Gensim. My work includes adding features that made it into a subsequent release, fixing bugs, and improving the documentation of complex model implementations.

- name: GPU accerelated Convolutional Neural Networks 
  i18n: name
  url: https://gist.github.com/steremma/048549de16cc48610233c943ecf495b4
  img: /static/assets/img/landing/google.png
  desc: Designed and implemented a fully functional Convolutional Neural Network library in CUDA currently integrated in ROOT, the data processing framework written by and used at CERN. The library allowes the timely processing of particle physics experimental data. My implementation consistently outperforms the previous CPU version by a factor of 3, as its performance and memory footprint is comparable to those of Keras.

结果如下:

很明显左下角的项目没有对齐。我该如何解决?

我喜欢你的 Jekyll 项目的结构。很好。你快到了。您写道:

{% assign loopindex = forloop.index | modulo: 2 %}

...但是您对这个循环索引变量(AFAIK)没有做任何事情。此自定义循环索引变量可用于确定何时需要开始新行。您需要将上面的代码(projects.html 中的第 9 行)替换为:

{% assign loopindex = forloop.index | modulo: 2 %}
{% if loopindex == 1 && forloop.index != 1 %}
  </div><div class="row">
{% endif %}

这指示 Liquid 在每(模数)两个项目之后关闭该行(如果有第三个项目)。第一项需要例外(我们不想从空行开始)。

PS。您可能想查看 JekyllCodex 以获得更多优秀的代码示例。