<divclass="col"> <a href="/2021/08/using-variables-in-jekyll-to-define-custom-content"class="post-card"> <divclass="card"> <divclass="card-body"> <h5 class="card-title">Using variables in Jekyll to define custom content</h5> <small class="card-text text-muted">I recently discovered that Jekyll's config.yml can be used to define custom variables for reusing content. I feel like I've been living under a rock all this time. But to err overand over again is human.</small> </div> <divclass="card-footer text-end"> <small class="text-muted">Aug 2021</small> </div> </div> </a> </div>
这是每篇文章在整个页面中重复的部分。我们可以看到 .card-title 包含文章标题,.card-text 包含摘录,.card-footer > small 包含发布日期。
[{'excerpt':"I recently discovered that Jekyll's config.yml can be used to" "define custom variables for reusing content. I feel like I've" 'been living under a rock all this time. But to err over and over' 'again is human.', 'pub_date':'Aug2021', 'title':'Using variables in Jekyll to define custom content'}, {'excerpt':"In this article, I'll highlight some ideas for Jekyll" 'collections, blog categories pages, responsive web-design, and' 'netlify.toml to make static website maintenance a breeze.', 'pub_date':'Jul2021', 'title':'The evolution of ayushsharma.in: Jekyll, Bootstrap, Netlify,' 'static websites, and responsive design.'}, {'excerpt':"These are the top 5 lessons I've learned after 5 years of" 'Terraform-ing.', 'pub_date':'Jul2021', 'title':'5 key best practices for sane and usable Terraform setups'},