我开始尝试用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.
结果如下:
很显然,左下项目没有对齐。我该如何解决?
答案 0 :(得分:0)
我喜欢您的Jekyll项目的结构。做得好。你快到了您写道:
{% assign loopindex = forloop.index | modulo: 2 %}
...但是您没有使用此loopindex变量(AFAIK)做任何事情。此自定义loopindex变量可用于确定何时需要开始新行。您需要将以下代码(projects.html中的第9行)替换为:
{% assign loopindex = forloop.index | modulo: 2 %}
{% if loopindex == 1 && forloop.index != 1 %}
</div><div class="row">
{% endif %}
这指示Liquid在每一项(取模)两项之后,如果有第三项,则关闭行。第一项需要例外(我们不想以空行开头)。
PS。您可能想看看JekyllCodex以获得更多出色的代码示例。